Hi Everyone,

I have been using hadoop for some time and now I would like to start and stop it from Java. To do so, firstly, I have tried to run NameNode.java from my IDE but get the following error:

/************************************************************///
//13/09/30 08:51:59 INFO impl.MetricsConfig: loaded properties from hadoop-metrics2.properties// //13/09/30 08:51:59 INFO impl.MetricsSourceAdapter: MBean for source MetricsSystem,sub=Stats registered.// //13/09/30 08:51:59 INFO impl.MetricsSystemImpl: Scheduled snapshot period at 10 second(s).// //13/09/30 08:51:59 INFO impl.MetricsSystemImpl: NameNode metrics system started// //13/09/30 08:51:59 ERROR namenode.NameNode: java.lang.IllegalArgumentException: Does not contain a valid host:port authority: file:///// // at org.apache.hadoop.net.NetUtils.createSocketAddr(NetUtils.java:164)// // at org.apache.hadoop.hdfs.server.namenode.NameNode.getAddress(NameNode.java:212)// // at org.apache.hadoop.hdfs.server.namenode.NameNode.getAddress(NameNode.java:244)// // at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:280)// // at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:569)// // at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1479)// // at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1491)//
//    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)//
// at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)// // at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)//
//    at java.lang.reflect.Method.invoke(Method.java:606)//
// at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)//
//
//13/09/30 08:51:59 INFO namenode.NameNode: SHUTDOWN_MSG: //
///************************************************************//
/
Most probably, it tries to read the configurations from some files such as core-site.xml, mapred-site.xml and hdfs-site.xml. I have placed those files into many different directories but still get the same error. The content of these configuration files are as follows:

--------------------------------------------------
*core-site.xml:*
<configuration>
<property>
         <name>fs.default.name</name>
         <value>hdfs://localhost:8020</value>
     </property>
</configuration>
*hdfs-site.xml*
<configuration>
<property>
         <name>dfs.replication</name>
         <value>1</value>
     </property>
</configuration>
*mapred-site.xml:*
<configuration>
<property>
         <name>mapred.job.tracker</name>
         <value>localhost:9000</value>
     </property>
</configuration>
*masters:*
localhost
*slaves:*
localhost
--------------------------------------------------

Kind Regards,

Furkan Bicak.

Reply via email to