分享

hdfs 源始碼編譯問題

mexiang 发表于 2013-10-25 10:44:40 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 1 5290
由於研究需要,我需要開發hdfs原始碼,架的環境是在Ubuntu 9.04,IDE用Eclipse jave EE 1.3.1
我將hadoop官方網站的hadoop-0.20.2下載下來後,取出我要的hdfs部分的原始碼複製到Eclipse裡,
接著把相關的.jar檔載入,包括原來hadoop-0.20.2/lib下的所有Jar檔,和hadoop-0.hadoop-0.20.2-tools.jar20.2-ant.jar,hadoop-0.20.2-core.jar,
這時候在build原始碼上沒有顯示錯誤,於是我用export的指令將這些原始碼包成jar檔時,跑出了以下錯誤訊息,
JAR creation failed. See details for additional information.
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/HftpFileSystem.java
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/protocol/AlreadyBeingCreatedException.java
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/protocol/UnregisteredDatanodeException.java
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/protocol/DatanodeID.java
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/server/balancer/Balancer.java
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/server/common/IncorrectVersionException.java
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/server/common/InconsistentFSStateException.java
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/server/common/Storage.java
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/server/datanode/DataBlockScanner.java
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/server/datanode/DataNode.java
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/server/datanode/DataStorage.java
  Class files on classpath not found or not accessible for: 'hadoop/src/org/apache/hadoop/hdfs/server/datanode/metrics/DataNodeStatisticsMBean.java'
  Class files on classpath not found or not accessible for: 'hadoop/src/org/apache/hadoop/hdfs/server/datanode/metrics/DataNodeStatistics.java'
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/server/namenode/FileDataServlet.java
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/server/namenode/PendingReplicationBlocks.java
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/server/namenode/StreamFile.java
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/server/namenode/ReplicationTargetChooser.java
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/server/namenode/PermissionChecker.java
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/server/namenode/FSImage.java
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/server/namenode/NotReplicatedYetException.java
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/server/namenode/DatanodeDescriptor.java
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/server/namenode/LeaseExpiredException.java
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/server/namenode/NameNode.java
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/server/namenode/SafeModeException.java
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/server/namenode/UpgradeObjectNamenode.java
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/server/namenode/FileChecksumServlets.java
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/server/namenode/JspHelper.java
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/server/namenode/ListPathsServlet.java
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/server/namenode/FsckServlet.java
  Class files on classpath not found or not accessible for: 'hadoop/src/org/apache/hadoop/hdfs/server/namenode/metrics/NameNodeStatistics.java'
  Class files on classpath not found or not accessible for: 'hadoop/src/org/apache/hadoop/hdfs/server/namenode/metrics/NameNodeStatisticsMBean.java'
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/server/protocol/NamespaceInfo.java
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/server/protocol/DisallowedDatanodeException.java
  Exported with compile warnings: hadoop/src/org/apache/hadoop/hdfs/tools/DFSck.java
主要是以下這幾段的
Class files on classpath not found or not accessible for: 'hadoop/src/org/apache/hadoop/hdfs/server/datanode/metrics/DataNodeStatisticsMBean.java'
  Class files on classpath not found or not accessible for: 'hadoop/src/org/apache/hadoop/hdfs/server/datanode/metrics/DataNodeStatistics.java'\
Class files on classpath not found or not accessible for: 'hadoop/src/org/apache/hadoop/hdfs/server/namenode/metrics/NameNodeStatistics.java'
  Class files on classpath not found or not accessible for: 'hadoop/src/org/apache/hadoop/hdfs/server/namenode/metrics/NameNodeStatisticsMBean.java'
請問這邊是什麼錯造成的嗎?
感謝大大幫忙
All the best,
文峰

已有(1)人评论

跳转到指定楼层
shihailong123 发表于 2013-10-25 10:44:40
我剛剛看了~~原來是那四個java檔理沒有code,所以才無法編譯
應該沒問題了
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条