摘要:
UDF分为两大类: UDAF:自定义聚合函数 、 UDTF:自定义生成表函数 hive有两个不同接口实现UDF-- UDF、GenericUDF 阅读全文
摘要:
''' 闭包函数: 1. 函数内部定义的函数 2. 对外部作用域而非全局作用域的引用 ! '''def x(): r = 1 def y(): print("Test text:{test}".format(test=r)) print("yys") return y''' 闭包作用: 1. 自带作用域 2. 延迟计算 '''from usrlib.urlrequest i... 阅读全文
摘要:
Hadoop-httpfs: client向httpfs提交文件操作,由httpfs和集群交互; 优势:client不必访问集群 WebHDFS API: https://archive.cloudera.com/cdh5/cdh/5/hadoop/hadoop-project-dist/hadoo 阅读全文
摘要:
(1) 将日志记录模式修改为异步 Hdfs-site.xml中添加 <property> <name>dfs.namenode.audit.log.async</name> <value>true</value> </property> <property> <name>dfs.namenode.e 阅读全文
摘要:
dict.pop('key') set.remove(sas) sorted(dict.items(), key= lambda x : x[1]) sorted(dict.items(), key= lambda x : x[0], reverse=True) 字典按key、value排序 con 阅读全文
摘要:
根据hdfs的auditlog以及fsimage分析,yarn的日志文件占用了10%-20%的rpc请求以及文件量,这对namenode的性能有比较大的影响,特别是当集群规模越来越大,会影响生产业务。故下面的方案对yarn日志进行拆分,将日志写入一个独立的hdfs集群 运行yarn的集群(pascd 阅读全文
摘要:
安装jdk1.8 vi pom.xml CDH版本编译添加: pom.xml <repositories> <repository> <id>central</id> <!-- This should be at top, it makes maven try the central repo fi 阅读全文
摘要:
spark推测执行:当成功的Task数超过总Task数的75%(可通过参数spark.speculation.quantile设置)时,再统计所有成功的Tasks的运行时间,得到一个中位数,用这个中位数乘以1.5(可通过参数spark.speculation.multiplier控制)得到运行时间门 阅读全文