使用hadoop-yarn-server-nodemanager编译错误

时间:2014-04-01 09:04:30

标签: java maven hadoop

我正在尝试在windows7上安装hadoop 2.3.0

使用windows sdk 7.1

maven命令: mvn package -Pdist,native-win -DskipTests -Dtar

我收到以下错误:

我搜索了这个错误,但我找不到任何解决方案

[ERROR] location: class ApplicationImpl
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\application\ApplicationImpl.java:[391,6] error: cannot find symbol
[ERROR] symbol:   class ApplicationContainerFinishedEvent
[ERROR] location: class AppFinishTransition
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\application\ApplicationImpl.java:[392,11] error: cannot find symbol
[ERROR] symbol:   class ApplicationContainerFinishedEvent
[ERROR] location: class AppFinishTransition
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\application\ApplicationImpl.java:[416,14] error: cannot find symbol
[ERROR] symbol:   class LogHandlerAppFinishedEvent
[ERROR] location: class AppCompletelyDoneTransition
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\localizer\LocalizedResource.java:[224,14] error: cannot find symbol
[ERROR] symbol:   class LocalizerResourceRequestEvent
[ERROR] location: class FetchResourceTransition
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\localizer\LocalizedResource.java:[254,6] error: cannot find symbol
[ERROR] symbol:   class ResourceFailedLocalizationEvent
[ERROR] location: class FetchFailedTransition
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\localizer\LocalizedResource.java:[255,11] error: cannot find symbol
[ERROR] symbol:   class ResourceFailedLocalizationEvent
[ERROR] location: class FetchFailedTransition
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\localizer\security\LocalizerTokenSelector.java:[45,34] error: package
 LocalizerTokenIdentifier does not exist
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\localizer\security\LocalizerTokenSelector.java:[46,22] error: cannot
find symbol
[ERROR] symbol:   class LocalizerTokenIdentifier
[ERROR] location: class LocalizerTokenSelector
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\localizer\ResourceLocalizationService.java:[275,26] error: cannot fin
d symbol
[ERROR] symbol:   class LocalizerTokenSecretManager
[ERROR] location: class ResourceLocalizationService
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\localizer\ResourceLocalizationService.java:[308,12] error: cannot fin
d symbol
[ERROR] symbol:   class ApplicationLocalizationEvent
[ERROR] location: class ResourceLocalizationService
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\localizer\ResourceLocalizationService.java:[311,36] error: cannot fin
d symbol
[ERROR] symbol:   class ContainerLocalizationRequestEvent
[ERROR] location: class ResourceLocalizationService
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\localizer\ResourceLocalizationService.java:[317,39] error: cannot fin
d symbol
[ERROR] symbol:   class ContainerLocalizationCleanupEvent
[ERROR] location: class ResourceLocalizationService
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\localizer\ResourceLocalizationService.java:[321,12] error: cannot fin
d symbol
[ERROR] symbol:   class ApplicationLocalizationEvent
[ERROR] location: class ResourceLocalizationService
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\localizer\ResourceLocalizationService.java:[579,8] error: cannot find
 symbol
[ERROR] symbol:   class LocalizerResourceRequestEvent
[ERROR] location: class ResourceLocalizationService.LocalizerTracker
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\localizer\ResourceLocalizationService.java:[580,11] error: cannot fin
d symbol
[ERROR] symbol:   class LocalizerResourceRequestEvent
[ERROR] location: class ResourceLocalizationService.LocalizerTracker
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\localizer\ResourceLocalizationService.java:[581,33] error: strings in
 switch are not supported in -source 1.6
[ERROR] (use -source 7 or higher to enable strings in switch)
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\localizer\ResourceLocalizationService.java:[582,13] error: cannot fin
d symbol
[ERROR] symbol:   variable PUBLIC
[ERROR] location: class ResourceLocalizationService.LocalizerTracker
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\localizer\ResourceLocalizationService.java:[585,13] error: cannot fin
d symbol
[ERROR] symbol:   variable PRIVATE
[ERROR] location: class ResourceLocalizationService.LocalizerTracker
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\localizer\ResourceLocalizationService.java:[586,13] error: cannot fin
d symbol
[ERROR] symbol:   variable APPLICATION
[ERROR] location: class ResourceLocalizationService.LocalizerTracker
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\localizer\ResourceLocalizationService.java:[642,36] error: cannot fin
d symbol
[ERROR] symbol:   class LocalizerResourceRequestEvent
[ERROR] location: class ResourceLocalizationService.PublicLocalizer
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\localizer\ResourceLocalizationService.java:[703,12] error: cannot fin
d symbol
[ERROR] symbol:   class LocalizerResourceRequestEvent
[ERROR] location: class ResourceLocalizationService.PublicLocalizer
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\localizer\ResourceLocalizationService.java:[719,36] error: cannot fin
d symbol
[ERROR] symbol:   class ResourceFailedLocalizationEvent
[ERROR] location: class ResourceLocalizationService.PublicLocalizer
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\localizer\ResourceLocalizationService.java:[762,44] error: cannot fin
d symbol
[ERROR] symbol:   class LocalizerResourceRequestEvent
[ERROR] location: class ResourceLocalizationService.LocalizerRunner
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\localizer\ResourceLocalizationService.java:[764,44] error: cannot fin
d symbol
[ERROR] symbol:   class LocalizerResourceRequestEvent
[ERROR] location: class ResourceLocalizationService.LocalizerRunner
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\localizer\ResourceLocalizationService.java:[778,22] error: cannot fin
d symbol
[ERROR] symbol:   class LocalizerResourceRequestEvent
[ERROR] location: class ResourceLocalizationService.LocalizerRunner
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\localizer\ResourceLocalizationService.java:[780,9] error: cannot find
 symbol
[ERROR] symbol:   class LocalizerResourceRequestEvent
[ERROR] location: class ResourceLocalizationService.LocalizerRunner
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\localizer\ResourceLocalizationService.java:[868,8] error: cannot find
 symbol
[ERROR] symbol:   class LocalizerResourceRequestEvent
[ERROR] location: class ResourceLocalizationService.LocalizerRunner
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\localizer\ResourceLocalizationService.java:[918,26] error: cannot fin
d symbol
[ERROR] symbol:   class ResourceFailedLocalizationEvent
[ERROR] location: class ResourceLocalizationService.LocalizerRunner
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\localizer\ResourceLocalizationService.java:[931,26] error: cannot fin
d symbol
[ERROR] symbol:   class ResourceFailedLocalizationEvent
[ERROR] location: class ResourceLocalizationService.LocalizerRunner
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\localizer\ResourceLocalizationService.java:[1000,13] error: cannot fi
nd symbol
[ERROR] symbol:   class LocalizerResourceRequestEvent
[ERROR] location: class ResourceLocalizationService.LocalizerRunner
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\localizer\ResourceLocalizationService.java:[1025,10] error: cannot fi
nd symbol
[ERROR] symbol:   class LocalizerTokenIdentifier
[ERROR] location: class ResourceLocalizationService.LocalizerRunner
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\localizer\ResourceLocalizationService.java:[1026,16] error: cannot fi
nd symbol
[ERROR] symbol:   class LocalizerTokenIdentifier
[ERROR] location: class ResourceLocalizationService.LocalizerRunner
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\localizer\ResourceLocalizationService.java:[1027,24] error: cannot fi
nd symbol
[ERROR] symbol:   class LocalizerTokenIdentifier
[ERROR] location: class ResourceLocalizationService.LocalizerRunner
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\localizer\ContainerLocalizer.java:[149,39] error: cannot find symbol
[ERROR] symbol:   variable LocalizerTokenIdentifier
[ERROR] location: class ContainerLocalizer
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\api\im
pl\pb\service\LocalizationProtocolPBServiceImpl.java:[49,15] error: cannot find
symbol
[ERROR] symbol:   class LocalizerHeartbeatResponsePBImpl
[ERROR] location: class LocalizationProtocolPBServiceImpl
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\logaggregation\LogAggregationService.java:[411,8] error: cannot find
symbol
[ERROR] symbol:   class LogHandlerAppStartedEvent
[ERROR] location: class LogAggregationService
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\logaggregation\LogAggregationService.java:[412,13] error: cannot find
 symbol
[ERROR] symbol:   class LogHandlerAppStartedEvent
[ERROR] location: class LogAggregationService
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\logaggregation\LogAggregationService.java:[419,8] error: cannot find
symbol
[ERROR] symbol:   class LogHandlerContainerFinishedEvent
[ERROR] location: class LogAggregationService
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\logaggregation\LogAggregationService.java:[420,13] error: cannot find
 symbol
[ERROR] symbol:   class LogHandlerContainerFinishedEvent
[ERROR] location: class LogAggregationService
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\logaggregation\LogAggregationService.java:[425,8] error: cannot find
symbol
[ERROR] symbol:   class LogHandlerAppFinishedEvent
[ERROR] location: class LogAggregationService
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\logaggregation\LogAggregationService.java:[426,13] error: cannot find
 symbol
[ERROR] symbol:   class LogHandlerAppFinishedEvent
[ERROR] location: class LogAggregationService
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\api\im
pl\pb\client\LocalizationProtocolPBClientImpl.java:[62,17] error: cannot find sy
mbol
[ERROR] symbol:   class LocalizerHeartbeatResponsePBImpl
[ERROR] location: class LocalizationProtocolPBClientImpl
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\loghandler\NonAggregatingLogHandler.java:[104,8] error: cannot find s
ymbol
[ERROR] symbol:   class LogHandlerAppStartedEvent
[ERROR] location: class NonAggregatingLogHandler
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\loghandler\NonAggregatingLogHandler.java:[105,13] error: cannot find
symbol
[ERROR] symbol:   class LogHandlerAppStartedEvent
[ERROR] location: class NonAggregatingLogHandler
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\loghandler\NonAggregatingLogHandler.java:[116,8] error: cannot find s
ymbol
[ERROR] symbol:   class LogHandlerAppFinishedEvent
[ERROR] location: class NonAggregatingLogHandler
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\loghandler\NonAggregatingLogHandler.java:[117,13] error: cannot find
symbol
[ERROR] symbol:   class LogHandlerAppFinishedEvent
[ERROR] location: class NonAggregatingLogHandler
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\container\ContainerImpl.java:[446,28] error: cannot find symbol
[ERROR] symbol:   class ApplicationContainerFinishedEvent
[ERROR] location: class ContainerImpl
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\container\ContainerImpl.java:[450,28] error: cannot find symbol
[ERROR] symbol:   class LogHandlerContainerFinishedEvent
[ERROR] location: class ContainerImpl
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\container\ContainerImpl.java:[469,12] error: cannot find symbol
[ERROR] symbol:   class ContainerLocalizationCleanupEvent
[ERROR] location: class ContainerImpl
[ERROR] C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-s
erver-nodemanager\src\main\java\org\apache\hadoop\yarn\server\nodemanager\contai
nermanager\container\ContainerImpl.java:[574,18] error: cannot find symbol
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExc
eption
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command

[ERROR]   mvn <goals> -rf :hadoop-yarn-server-nodemanager

它与pom有关吗?

我怀疑它与软件包版本有关,所以我尝试编辑C:\hdfs\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-server-nodemanager\pom.xml,但没有运气!

1 个答案:

答案 0 :(得分:0)

使用winrar提取hadoop jar时遇到了同样的问题。路径太长的文件将不会被提取,这就是为什么在编译源代码时,你会发现自己遗漏了一些文件。

尝试将jar移动到D:\或E:\等目录,然后将其解压缩。问题将消失。

另请尝试http://www.srccodes.com/p/article/38/build-install-configure-run-apache-hadoop-2.2.0-microsoft-windows-os

祝你好运。