Hadoop格式化namenode时候,出现Java异常:URI has an authority component问题的解决
2017-07-06 10:26
591 查看
在执行命令:
时候,出现错误,提示:
这个问题是因为配置hdfs-site.xml文件出现错误时候产生的:
默认的hdfs-site.xml的配置文件参数是:
将其改为具体的hadoop文件路径,想必这个大家也都知道,是在core-site.xml中配置的,默认的路径是在tmp文件夹下的,我们都会更改这个路径,很重要,也很基础的。
对于我的机器,改为
这里file://原来是双斜杠,我仿照网上的博文改为单斜杠,双斜杠能不能用,我也不知道,大家可以自己试一试。
hdfs namenode -formate
时候,出现错误,提示:
17/07/06 10:07:39 INFO metrics.TopMetrics: NNTop conf: dfs.namenode.top.num.users = 10 17/07/06 10:07:39 INFO metrics.TopMetrics: NNTop conf: dfs.namenode.top.windows.minutes = 1,5,25 17/07/06 10:07:39 INFO namenode.FSNamesystem: Retry cache on namenode is enabled 17/07/06 10:07:39 INFO namenode.FSNamesystem: Retry cache will use 0.03 of total heap and retry cache entry expiry time is 600000 millis 17/07/06 10:07:39 INFO util.GSet: Computing capacity for map NameNodeRetryCache 17/07/06 10:07:39 INFO util.GSet: VM type = 64-bit 17/07/06 10:07:39 INFO util.GSet: 0.029999999329447746% max memory 966.7 MB = 297.0 KB 17/07/06 10:07:39 INFO util.GSet: capacity = 2^15 = 32768 entries 17/07/06 10:07:39 ERROR namenode.NameNode: Failed to start namenode. java.lang.IllegalArgumentException: URI has an authority component at java.io.File.<init>(File.java:423) at org.apache.hadoop.hdfs.server.namenode.NNStorage.getStorageDirectory(NNStorage.java:329) at org.apache.hadoop.hdfs.server.namenode.FSEditLog.initJournals(FSEditLog.java:276) at org.apache.hadoop.hdfs.server.namenode.FSEditLog.initJournalsForWrite(FSEditLog.java:247) at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:986) at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1434) at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1559)
这个问题是因为配置hdfs-site.xml文件出现错误时候产生的:
默认的hdfs-site.xml的配置文件参数是:
<property> <name>df 4000 s.namenode.name.dir</name> <value>file://${hadoop.tmp.dir}/dfs/name</value> <description>Determines where on the local filesystem the DFS name node should store the name table(fsimage). If this is a comma-delimited list of directories then the name table is replicated in all of the directories, for redundancy. </description> </property>
将其改为具体的hadoop文件路径,想必这个大家也都知道,是在core-site.xml中配置的,默认的路径是在tmp文件夹下的,我们都会更改这个路径,很重要,也很基础的。
对于我的机器,改为
<property> <name>dfs.namenode.name.dir</name> <value>file:/~/hadoop_tmp/dfs/name</value> <description>Determines where on the local filesystem the DFS name node should store the name table(fsimage). If this is a comma-delimited list of directories then the name table is replicated in all of the directories, for redundancy. </description> </property>
这里file://原来是双斜杠,我仿照网上的博文改为单斜杠,双斜杠能不能用,我也不知道,大家可以自己试一试。
相关文章推荐
- 初始化namenode失败,java.lang.IllegalArgumentException: URI has an authority component
- Spark:Hadoop:NameNode:ERROR:URI has an authority component
- hadoop格式化namenode时报异常: URI has an authority component
- cocos2d-x打包的时候出现空指针的问题,An error has occurred. See error log for more details. java.lang.NullPointerE
- java混淆时间出现 An exception has occurred in the compiler (1.5.0_07)异常解决
- hadoop报异常java.lang.IllegalArgumentException: URI has an authority component
- hadoop多次格式化namenode造成datanode无法启动问题解决
- Linux出现java.net.UnknownHostException异常问题的解决办法
- sbt 0.13.8 URI has an authority component
- hadoop 安装出现的几种异常的处理方法,hadoop无法启动,no namenode to stop问题的解决方法,no datanode
- Linux出现java.net.UnknownHostException异常问题的解决办法
- Eclipse出现An error has occurred问题解决方案
- 前台使用js的encodeURIComponent编码后,java解析乱码问题的解决方法
- Linux出现java.net.UnknownHostException异常问题的解决办法
- hadoop多次格式化namenode造成datanode无法启动问题解决
- hadoop集群格式化namenode出现异常
- Hadoop 在格式化 namenode 时出现以下问题:
- 在HttpClient请求的时候,返回结果解析时出现java.io.IOException: Attempted read from closed stream. 异常,解决
- Java import导包的时候出现Access Restriction问题的解决方法
- 解决Eclipse中运行WordCount出现 java.lang.ClassNotFoundException: org.apache.hadoop.examples.WordCount$TokenizerMapper问题【转】