在Eclipse上运行基本wordcount程序时出错

时间:2015-06-01 00:43:54

标签: java eclipse hadoop installation

让我通知你,我是hadoop域名的初学者。所以,我指的是https://developer.yahoo.com/hadoop/tutorial/module3.html教程。我完成了所有设置,只是将所有代码复制到我的eclipse map-reduce项目中。就wordcountmapper,wordcountreducer和wordcount.java文件而言,没有出现任何错误。

现在,当我点击在hadoop上运行并在VM播放器上选择已设置的服务器并单击下一步时,之后就没有任何事情发生了。同样的“在选定的服务器页面上运行hadoop”就像被卡住了一样。进度信息面板的跨度非常短,因此无法检查其实际内容。

但是,这是我在完成所有这些步骤后每次都获得的日志文件。请帮帮我。自从过去2天以来,我一直在努力。至于所需的库,我已经从hadoop安装路径添加了所有必需的.jar文件。

.log文件内容---

!ENTRY org.eclipse.ui 4 0 2015-05-31 16:56:39.849
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.ClassCastException: org.eclipse.swt.widgets.Table cannot be cast to org.eclipse.swt.widgets.TableColumn
    at org.eclipse.swt.widgets.Table.getColumn(Table.java:766)
    at org.eclipse.swt.widgets.Table.releaseChildren(Table.java:1532)
    at org.eclipse.swt.widgets.Widget.release(Widget.java:816)
    at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:840)
    at org.eclipse.swt.widgets.Widget.release(Widget.java:816)
    at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:840)
    at org.eclipse.swt.widgets.Widget.release(Widget.java:816)
    at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:840)
    at org.eclipse.swt.widgets.Widget.release(Widget.java:816)
    at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:840)
    at org.eclipse.swt.widgets.Widget.release(Widget.java:816)
    at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:840)
    at org.eclipse.swt.widgets.Widget.release(Widget.java:816)
    at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:840)
    at org.eclipse.swt.widgets.Widget.release(Widget.java:816)
    at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:840)
    at org.eclipse.swt.widgets.Canvas.releaseChildren(Canvas.java:120)
    at org.eclipse.swt.widgets.Decorations.releaseChildren(Decorations.java:501)
    at org.eclipse.swt.widgets.Shell.releaseChildren(Shell.java:932)
    at org.eclipse.swt.widgets.Widget.release(Widget.java:816)
    at org.eclipse.swt.widgets.Widget.dispose(Widget.java:445)
    at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:282)
    at org.eclipse.swt.widgets.Shell.dispose(Shell.java:566)
    at org.eclipse.jface.window.Window.close(Window.java:330)
    at org.eclipse.jface.dialogs.Dialog.close(Dialog.java:971)
    at org.eclipse.jface.dialogs.TrayDialog.close(TrayDialog.java:143)
    at org.eclipse.jface.wizard.WizardDialog.hardClose(WizardDialog.java:797)
    at org.eclipse.jface.wizard.WizardDialog.close(WizardDialog.java:427)
    at org.eclipse.jface.wizard.WizardDialog.cancelPressed(WizardDialog.java:414)
    at org.eclipse.jface.wizard.WizardDialog$1.widgetSelected(WizardDialog.java:293)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1006)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2413)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2164)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
    at org.eclipse.jface.window.Window.open(Window.java:796)
    at org.apache.hadoop.eclipse.launch.HadoopApplicationLaunchShortcut.findLaunchConfiguration(HadoopApplicationLaunchShortcut.java:110)
    at org.eclipse.jdt.internal.debug.ui.launcher.JavaLaunchShortcut.launch(JavaLaunchShortcut.java:109)
    at org.eclipse.jdt.internal.debug.ui.launcher.JavaLaunchShortcut.searchAndLaunch(JavaLaunchShortcut.java:74)
    at org.eclipse.jdt.internal.debug.ui.launcher.JavaLaunchShortcut.launch(JavaLaunchShortcut.java:227)
    at org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension.launch(LaunchShortcutExtension.java:429)
    at org.eclipse.debug.internal.ui.actions.LaunchShortcutAction.run(LaunchShortcutAction.java:66)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:546)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1006)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2413)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2164)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
    at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1173)

1 个答案:

答案 0 :(得分:0)

该错误似乎与hadoop无关。我也找不到该页面中SWT表或列的任何引用。

你可以启动一个普通的java应用程序来查看它是否正常工作,然后从终端运行wordcount($ HADOOP_HOME / share / hadoop / mapreduce / hadoop-mapreduce-examples)来测试你的hadoop安装。在那之后你应该回到eclipse看看它是否正常工作(在hadoop中从终端运行东西的问题总是少,而不是直接从eclipse运行)