- 博客(10)
- 收藏
- 关注
原创 小文件处理
HDFS小文件处理1)会有什么影响 (1)1个文件块,占用namenode多大内存150字节1亿个小文件*150字节 1 个文件块 * 150字节128G能存储多少文件块? 128 * 1024*1024*1024byte/150字节 = 9亿文件块2)怎么解决(1)采用har归档方式,将小文件归档(2)采用CombineTextInputFormat(3)有小文件场景开启JVM重用;如果没有小文件,不要开启JVM重用,因为会一直占用使用到的task卡槽,直到任务完成才释放。JVM重
2021-02-26 09:28:34
465
原创 数据倾斜与解决办法
1)提前在map进行combine,减少传输的数据量在Mapper加上combiner相当于提前进行reduce,即把一个Mapper中的相同key进行了聚合,减少shuffle过程中传输的数据量,以及Reducer端的计算量。如果导致数据倾斜的key大量分布在不同的mapper的时候,这种方法就不是很有效了。2)导致数据倾斜的key 大量分布在不同的mapper(1)局部聚合加全局聚合。第一次在map阶段对那些导致了数据倾斜的key 加上1到n的随机前缀,这样本来相同的key 也会被分到多个Re
2021-02-25 19:48:39
804
原创 hive建表错误
Cannot validate serde: org.openx.data.jsonserde.JsonSerDe由于有很多数据,比如行为数据,内容数据都是json格式的,我们需要json的serde- jar,存储方式有以下三种: 1. jar包可以存储到linux上的一个固定目录,使用add jar指令加载到classpath下。2. 也可以将jar包上传到hdfs中, 使用add jar指令加载到classpath下。3. 也可以将jar包存储到hive的lib目录下,咱们选择..
2021-01-12 19:56:25
795
原创 presto自动断开连接
错误:Error running command: java.net.ConnectException: Failed to connect to /192.168.10.101:8080查看在node.properties文件中配置的日志文件地址,查看日志文件Presto requires Java 8u151+ (found 1.8.0_141)需要java 8u151 以上版本的jdk重新安装了一个jdk,完美解决!...
2021-01-07 10:16:21
771
原创 Hive的Permission denied: user=anonymous, access=WRITE, inode=错误
错误:FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:Got exception: org.apache.hadoop.security.AccessControlException Permission denied: user=anonymous, access=WRITE, inode="/user/hive/warehouse":ro
2021-01-06 20:34:02
2952
转载 (null) entry in command string: null chmod 0644
在WIndows操作系统中本地运行spark程序,报以下错误:....(null) entry in command string: null chmod 0644 ..(后面是目的目录)解决方法:下载hadoop.dll文件并拷贝到c:\windows\system32目录中然后重新运行代码程序即可hadoop.dll文件下载地址:链接:https://pan.baidu.com/s/1Rb5ROUQMSqp7SeQINlLZkA提取码:n8t6...
2021-01-04 20:38:59
377
1
原创 hive远程连接错误
Could not open connection to the HS2 server. Please check the server URI and if the URI is correct, then ask the administrator to check the server status.Error: Could not open client transport with JDBC Uri: jdbc:hive2://qianfeng01:10000: java.net.Connect
2021-01-04 19:16:11
2688
原创 hive建表错误
代码:create external table if not exists ods_nshop_203.ods_nshop_01_useractlog(action string comment ‘行为类型:install安装|launch启动|interactive交互|page_enter_h5页面曝光|page_enter_native页面进入|exit退出’,event_type string comment ‘行为类型:click点击|view浏览|slide滑动|input输入’,cu
2020-12-24 14:01:45
1062
原创 使用sqoop将mysql中的数据导入hive中错误
报错:Could not load org.apache.hadoop.hive.conf.HiveConf. Make sure HIVE_CONF_DIR is set correctly.原因:缺失hive的连接jar包解决方法:去hive的lib目录中将hive-common-XXX.jar复制到sqoop中的lib目录中
2020-12-23 21:54:53
211
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅