上一页 1 2 3 4 5 6 ··· 10 下一页
摘要: 方法一:项目目录下,找到存放jar包的目录(一般为lib),将里面的jar包全选中,右键,add as library 方法二:File-Project Structure,按照图二的红色放款添加依赖,点击+号后,选择JARs or directories,开始选择项目中存放jar包的目录,全选中j 阅读全文
posted @ 2021-05-22 14:18 快乐的张小凡 阅读(1075) 评论(0) 推荐(0) 编辑
摘要: 文件数目过多,会给HDFS带来压力,并且会影响处理效率,可以通过合并Map和Reduce的结果文件来消除这样的影响: set hive.merge.mapfiles = true ##在 map only 的任务结束时合并小文件 set hive.merge.mapredfiles = false 阅读全文
posted @ 2021-05-22 14:13 快乐的张小凡 阅读(523) 评论(0) 推荐(0) 编辑
摘要: #!/bin/bash id=`hive -e "set hive.cli.print.header=false;select id,name from test.test where name = 'wangwu' group by id,name;"` echo echo $id echo 阅读全文
posted @ 2021-05-22 14:09 快乐的张小凡 阅读(600) 评论(0) 推荐(0) 编辑
摘要: yyyy-MM-dd与yyyyMMdd000000转换的三种方法 方法一:date_format(只支持yyyy-MM-dd -> yyyyMMdd000000) select date_format('2019-10-07', 'yyyyMMdd000000') -- 20191007000000 阅读全文
posted @ 2021-04-21 10:56 快乐的张小凡 阅读(1841) 评论(0) 推荐(0) 编辑
摘要: import java.util.concurrent.{LinkedBlockingQueue, ThreadPoolExecutor, TimeUnit} object ReadToSpark { //程线程池 private val threadpool = new ThreadPoolExe 阅读全文
posted @ 2021-02-20 14:35 快乐的张小凡 阅读(988) 评论(0) 推荐(0) 编辑
摘要: 1. hadoop (1)指定 HDFS 中 NameNode 的地址 <!-- 指定 HDFS 中 NameNode 的地址 --> <!-- core-site.xml --> <property> <name>fs.defaultFS</name> <value>hdfs://hadoop10 阅读全文
posted @ 2021-02-05 11:26 快乐的张小凡 阅读(96) 评论(0) 推荐(0) 编辑
摘要: /** * 获取本机ip地址 */ public class IpUtil { public static String getIpAddress() { try { return InetAddress.getLocalHost().getHostAddress(); } catch (Unkno 阅读全文
posted @ 2021-01-26 16:20 快乐的张小凡 阅读(222) 评论(0) 推荐(0) 编辑
摘要: public class DateUtil { public static String dateFromString(Date date){ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); return 阅读全文
posted @ 2021-01-26 16:18 快乐的张小凡 阅读(44) 评论(0) 推荐(0) 编辑
摘要: public class SortUtil { /** * 对集合中是对象的排序 * * @param list * @param param 需要排序的参数名 * @param sort 排序字段 desc代表倒序 * @return */ public static List<?> listSo 阅读全文
posted @ 2021-01-26 16:14 快乐的张小凡 阅读(477) 评论(0) 推荐(0) 编辑
摘要: public class UUIDUtils { /** * 获得一个随机UUID * @return String UUID */ public static String getUUID() { return UUID.randomUUID().toString().replace("-", " 阅读全文
posted @ 2021-01-26 16:10 快乐的张小凡 阅读(234) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 10 下一页