一、下載hadoop、hbasejava
二、安裝jdk(環境變量/etc/profile)node
三、配置hadoop/conf/hadoop-env.sh 修改JAVA_HOMEapache
四、hadoop/conf/目錄下配置文件ide
一、slaves svn
二、mastersoop
五、cp hadoop/hadoop-0.20.2-core.jar to hbase/lib/ui
六、cp hbase/hbase-0.90.5.jar to hadoop/libspa
七、修改/etc/hosts.net
八、hadoop-damen.sh start datanodeserver
出錯:
- /************************************************************
- STARTUP_MSG: Starting DataNode
- STARTUP_MSG: host = SC-048.cfind.com/192.168.15.48
- STARTUP_MSG: args = []
- STARTUP_MSG: version = 0.20.2
- STARTUP_MSG: build = https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20 -r 911707; compiled by 'chrisdo' on Fri Feb 19 08:07:34 UTC 2010
- ************************************************************/
- 2012-06-27 10:45:44,651 ERROR org.apache.hadoop.hdfs.server.datanode.DataNode: java.lang.NoClassDefFoundError: javax/net/SocketFactory
- at java.lang.ClassLoader.defineClass1(Native Method)
- at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
- at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
- at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
- at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
- at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
- at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
- at java.security.AccessController.doPrivileged(Native Method)
- at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
- at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
- at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
- at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
- at java.lang.Class.forName0(Native Method)
- at java.lang.Class.forName(Class.java:247)
- at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:762)
- at org.apache.hadoop.net.NetUtils.getSocketFactoryFromProperty(NetUtils.java:109)
- at org.apache.hadoop.net.NetUtils.getDefaultSocketFactory(NetUtils.java:93)
- at org.apache.hadoop.ipc.RPC.getProxy(RPC.java:383)
- at org.apache.hadoop.ipc.RPC.waitForProxy(RPC.java:314)
- at org.apache.hadoop.ipc.RPC.waitForProxy(RPC.java:291)
- at org.apache.hadoop.hdfs.server.datanode.DataNode.startDataNode(DataNode.java:269)
- at org.apache.hadoop.hdfs.server.datanode.DataNode.<init>(DataNode.java:216)
- at org.apache.hadoop.hdfs.server.datanode.DataNode.makeInstance(DataNode.java:1283)
- at org.apache.hadoop.hdfs.server.datanode.DataNode.instantiateDataNode(DataNode.java:1238)
- at org.apache.hadoop.hdfs.server.datanode.DataNode.createDataNode(DataNode.java:1246)
- at org.apache.hadoop.hdfs.server.datanode.DataNode.main(DataNode.java:1368)
- Caused by: java.lang.ClassNotFoundException: javax.net.SocketFactory
- at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
- at java.security.AccessController.doPrivileged(Native Method)
- at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
- at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
- at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
- at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
- ... 26 more
解決方法:
jdk/jre/lib缺乏 jsse.jar