首页 \ 问答 \ 执行hadoop-mapreduce-examples-2.2.0.jar时出错(Error while executing hadoop-mapreduce-examples-2.2.0.jar)

执行hadoop-mapreduce-examples-2.2.0.jar时出错(Error while executing hadoop-mapreduce-examples-2.2.0.jar)

作为hadoop的初学者,我开始尝试在ubuntu中配置单节点hadoop集群。 在安装和配置之后,我使用hadoop处理示例部分,它抛出了以下错误

hduser1@ubuntu:/usr/local/hadoop$ hadoop jar ./share/hadoop/mapreduce/hadoop-mapreduce-   examples-2.2.0.jar pi 2 5
java.lang.NoSuchMethodError: org.apache.hadoop.util.ProgramDriver.run([Ljava/lang/String;)I
    at org.apache.hadoop.examples.ExampleDriver.main(ExampleDriver.java:74)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:156)

我使用过Java-7-oracle和Ubuntu 12.04并按照这篇文章来安装和配置hadoop: http//codesfusion.blogspot.in/2013/10/setup-hadoop-2x-220-on-ubuntu.html


Being a beginner to hadoop,I started to try out configuring a single node hadoop cluster in ubuntu. After installation and configuration, I worked with the example part with hadoop and it have thrown the following error

hduser1@ubuntu:/usr/local/hadoop$ hadoop jar ./share/hadoop/mapreduce/hadoop-mapreduce-   examples-2.2.0.jar pi 2 5
java.lang.NoSuchMethodError: org.apache.hadoop.util.ProgramDriver.run([Ljava/lang/String;)I
    at org.apache.hadoop.examples.ExampleDriver.main(ExampleDriver.java:74)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:156)

I have used Java-7-oracle and Ubuntu 12.04 and followed this post to install and configure hadoop: http://codesfusion.blogspot.in/2013/10/setup-hadoop-2x-220-on-ubuntu.html


原文:https://stackoverflow.com/questions/22283412
更新时间:2023-09-29 15:09

最满意答案

MVC从不做回传。 因此, IsPostBack将始终正确地为假。 你认为回传的东西实际上是一个POST,因为MVC不会回发。 您不应该在MVC中使用ASP.NET服务器控件。


MVC never does postbacks. Therefore, IsPostBack will always, correctly, be false. The thing you think is a postback is actually a POST, because MVC doesn't do postbacks. You should not be using the ASP.NET server controls at all in MVC.

相关问答

更多
  • 多少糟糕的情况取决于网站流量,如果您在高流量网站上工作,我会说不要使用它,并删除不需要的模块。 How bad it is depends on the site traffic, if you are working on a high traffic website I'd say don't use it, and remove unneeded modules.
  • 您是否尝试将以下属性添加到控制器? [OutputCache(Location = OutputCacheLocation.None)] Have you tried adding the following attribute to your controller? [OutputCache(Location = OutputCacheLocation.None)]
  • 这就是我为一个体面的应用程序做的事情。 我会返回一个通用的错误视图return View("Error"); 如果用户没有任何访问权限,那么您不需要在每个View上处理错误消息。 从概念上讲,这个( Controller )是确定要返回的View的逻辑所在。 它会阻止业务逻辑流入View 。 您可以将页面中某些与角色相关的部分抽象为部分视图以保持混乱: <% if (User.IsInRole("Admin")) { %> Html.RenderPartial("AdminPanel"); ...
  • 我假设您使用WhoCanHelpMe / S#arp架构,基于我看到的命名约定? 如果是这样,我强烈推荐看看这篇文章 ,它介绍了一个更干净的应用程序服务层的实现。 查看从服务层返回的ActionConfirmation结果; 我们发现这是一种理想的方式,可以从Tasks图层返回一个不太令人讨厌的错误结果。 I'm assuming you're using WhoCanHelpMe / S#arp Architecture based on the naming conventions I see? If ...
  • 实现这种类型功能的“正确”方法是在共享视图文件夹中使用局部视图 - 不存在隐藏代码 - 并为数据提供视图模型。 例如: <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>