赞
踩
1. Name node is in safe mode
- # 强制离开安全模式
- hadoop dfsadmin -safemode leave
-
- 参数value的说明如下:
-
- enter - 进入安全模式
- leave - 强制NameNode离开安全模式
- get - 返回安全模式是否开启的信息
- wait - 等待,一直到安全模式结束。
2. spark thrift mysql: Specified key was too long; max key length is 767 bytes
数据库使用的字符集为utf8,改为latin1,重建表
3. spark hdfs:Caused by: java.io.IOException: Filesystem closed
- 解决办法:
-
- 第一种方法:
-
- 源代码:FileSystem fs = FileSystem.get(URI.create(hdfsFilePath), config);
-
- 改为: FileSystem fs = FileSystem.newInstance(URI.create(hdfsFilePath), config);
-
- 第二种方法:
-
- 在hdfs core-site.xml里把fs.hdfs.impl.disable.cache设置为true
- 多个datanode在getFileSystem过程中,由于Configuration一样,会得到同一个FileSystem。
- 如果有一个datanode在使用完关闭连接,其它的datanode在访问就会出现上述异常
4. Neither spark.yarn.jars nor spark.yarn.archive is set, falling back to uploading libraries under SPA
- 每次提交spark任务到yarn的时候,总会出现uploading resource(打包spark jars并上传)到hdfs上。
-
- 恶劣情况下,会在这里卡住很久。
-
- 17/01/13 17:21:47 INFO Client: Preparing resources for our AM container
- 17/01/13 17:21:47 WARN Client: Neither spark.yarn.jars nor spark.yarn.archive is set, falling back to uploadi
- ng libraries under SPARK_HOME.
- 17/01/13 17:21:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。