java—在eclipse上运行基本wordcount程序时出错

aemubtdh  于 2021-06-02  发布在  Hadoop
关注(0)|答案(1)|浏览(355)

让我告诉你,我是hadoop领域的初学者。所以,我指的是https://developer.yahoo.com/hadoop/tutorial/module3.html 辅导的。我完成了所有的设置,并将所有代码复制到我的eclipse map reduce项目中。就wordcountmapper、wordcountreducer和wordcount.java文件而言,没有显示任何错误。
现在,当我单击runonhadoop并选择vmplayer上已经设置好的服务器并单击next时,之后什么也没有发生。同样的“用选定的服务器页面在hadoop上运行”仍然像被绊倒一样。进度信息面板的跨度非常短,因此无法检查它实际显示的内容。
不过,这是我每次完成所有这些步骤后在日志文件中得到的结果。请帮帮我。从过去两天开始,我就一直在努力解决这个问题。至于必需的库,我已经从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)
r7knjye2

r7knjye21#

这个错误似乎与hadoop无关。在该页中,我也找不到任何对swt表或列的引用。
您可以启动一个普通的java应用程序,看看它是否一切正常,然后从终端运行wordcount($hadoop\u home/share/hadoop/mapreduce/hadoop mapreduce examples),以测试您的hadoop安装。在那之后,您应该回到eclipse来看看它是否一切正常(在hadoop中,从终端运行东西而不是直接从eclipse运行东西的问题总是比较少)

相关问题