为仅用于地图的作业运行Hadoop Map Reduce时出错(Error when running Hadoop Map Reduce for map-only job)
我想在
Hadoop MapReduce
运行仅限地图的作业,以下是我的代码:Configuration conf = new Configuration(); Job job = new Job(conf); job.setJobName("import"); job.setMapperClass(Map.class);//Custom Mapper job.setInputFormatClass(TextInputFormat.class); job.setNumReduceTasks(0); TextInputFormat.setInputPaths(job, new Path("/home/jonathan/input"));
但我得到的错误:
13/07/17 18:22:48 ERROR security.UserGroupInformation: PriviledgedActionException as: jonathan cause:org.apache.hadoop.mapred.InvalidJobConfException: Output directory not set. Exception in thread "main" org.apache.hadoop.mapred.InvalidJobConfException: Output directory not set.
然后我试着用这个:
job.setOutputFormatClass(org.apache.hadoop.mapred.lib.NullOutputFormat.class);
但它给我一个编译错误:
java: method setOutputFormatClass in class org.apache.hadoop.mapreduce.Job cannot be applied to given types; required: java.lang.Class<? extends org.apache.hadoop.mapreduce.OutputFormat> found: java.lang.Class<org.apache.hadoop.mapred.lib.NullOutputFormat> reason: actual argument java.lang.Class <org.apache.hadoop.mapred.lib.NullOutputFormat> cannot be converted to java.lang.Class<? extends org.apache.hadoop.mapreduce.OutputFormat> by method invocation conversion
我究竟做错了什么?
I want to run a map-only job in
Hadoop MapReduce
, here's my code:Configuration conf = new Configuration(); Job job = new Job(conf); job.setJobName("import"); job.setMapperClass(Map.class);//Custom Mapper job.setInputFormatClass(TextInputFormat.class); job.setNumReduceTasks(0); TextInputFormat.setInputPaths(job, new Path("/home/jonathan/input"));
But I get the error:
13/07/17 18:22:48 ERROR security.UserGroupInformation: PriviledgedActionException as: jonathan cause:org.apache.hadoop.mapred.InvalidJobConfException: Output directory not set. Exception in thread "main" org.apache.hadoop.mapred.InvalidJobConfException: Output directory not set.
Then I tried to use this:
job.setOutputFormatClass(org.apache.hadoop.mapred.lib.NullOutputFormat.class);
But it gives me a compilation error:
java: method setOutputFormatClass in class org.apache.hadoop.mapreduce.Job cannot be applied to given types; required: java.lang.Class<? extends org.apache.hadoop.mapreduce.OutputFormat> found: java.lang.Class<org.apache.hadoop.mapred.lib.NullOutputFormat> reason: actual argument java.lang.Class <org.apache.hadoop.mapred.lib.NullOutputFormat> cannot be converted to java.lang.Class<? extends org.apache.hadoop.mapreduce.OutputFormat> by method invocation conversion
What am I doing wrong?
原文:https://stackoverflow.com/questions/17710606
更新时间:2022-05-10 14:05
最满意答案
Found all the information I needed here:
相关问答
更多-
多个站点上的透明用户会话(单点登录+单点登录)(Transparent user session over several sites (single sign-on + single sign-off))[2022-07-04]
那么,让我进一步解释一下。 (所有网址都是虚构的!)正如我所说的,访问者访问http://www.yourwebpage.com并表示他想登录。他被重定向到http://your.loginpage.org?return=http: //www.yourwebpage.com/Authenticated他将不得不提供他的用户名和密码。 当他的帐户信息有效时,他将返回到登录URL中提供的页面,但具有将用作ID的附加参数。 因此,他去http://www.yourwebpage.com/Authenticate ... -
为.NET应用程序实现SSO有多种选择。 在线查看以下教程: 2012年7月 单身登录基础知识 http://www.codeproject.com/Articles/429166/Basics-of-Single-Sign-on-SSO GaryMcAllisterOnline:ASP.NET MVC 4,ADFS 2.0和第三方STS集成(IdentityServer2) , 2013年1月 http://garymcallisteronline.blogspot.com/2013/01/aspnet- ...
-
没有Windows登录的胖客户端(“胖客户端”)的单点登录(Single Sign-On for Rich Clients (“Fat Client”) without Windows Logon)[2023-10-25]
与AD帐户一起是通用解决方案。 Kerberos无处不在。 这是唯一一次会在登录时要求您提供凭据的机制。 这一切都是可行的,你需要: KDC 正确的DNS条目 KDC帐户 正确的SPN条目 配置为与KDC通信的客户端计算机 Java应用程序使用JAAS和JGSS来获取服务票据 GSS-API与您的GTK +应用程序一起获取服务票据 你自己弄清楚了什么? Going with AD account IS the generic solution. Kerberos is ubiquitous. This is ... -
事实证明这种方法是完全错误的! 如果有人正在考虑如何做到这一点,那么请看看这个精彩的博客 http://usingnat.net/sharepoint/2011/2/23/how-to-programmatically-authenticate-to-uag-protected-sharep.html Turns out this approach is completely wrong! IF someone is looking on how to do the above, then please l ...
-
找到我需要的所有信息: http://technet.microsoft.com/en-us/library/ee921441.aspx Found all the information I needed here: http://technet.microsoft.com/en-us/library/ee921441.aspx
-
单点登录或通过PHP登录(Single Sign-on or login via in PHP)[2023-07-19]
以下是可靠和/或可行且非常简单的实施解决方案 https://www.simpleauth.com/ https://rpxnow.com/signup_landing_basic (免费基本版) http://openid.net/developers/ http://www.gigya.com/public/platform/Register.aspx (非免费) Following are the reliable and/or viable and very simple to implement ... -
通过单点登录(CAS)登录?(Log in via single sign-on (CAS)?)[2022-01-11]
有一个选项。 进入CAS模块的配置页面(/ admin / config / people / cas)。 在字段集重定向下,选中此复选框: 检查CAS服务器以查看用户是否已登录? There is an option for that. Go to the configuration page of CAS module (/admin/config/people/cas). Under the fieldset Redirection, check this checkbox: Check with t ... -
显然,iOS 8包含一个证书支持,允许用户使用基于证书的单点登录来对企业应用程序进行身份验证。 账户框架 Accounts框架(Accounts.framework)为某些用户帐户提供单一登录模型。 单点登录消除了为多个帐户单独提示用户的需要,从而改善了用户体验。 它还通过管理应用程序的帐户授权过程,简化了您的开发模型。 您将此框架与Social框架结合使用。 所以你应该看看帐户框架参考 Apparently iOS 8 includes a certificate-support that allows ...
-
cPanel特定产品区域显示的模板存储在: 模块/服务器/的cPanel /模板/ 您可以使用主题中的自定义文件覆盖它: http://docs.whmcs.com/Working_with_Module_Templates 侧栏链接可以用钩子隐藏: http://docs.whmcs.com/Client_Area_Sidebars_Cheatsheet 希望这些细节有所帮助 The template for the cPanel specific product area display is stor ...
-
Laravel单点登录(Laravel Single Sign-On)[2022-01-11]
与此相关的最佳途径可能是寻找与框架无关的东西,即可以与任何PHP框架一起使用的东西,但仍然可以为您完成所有艰苦的工作。 看看Packagist的很多内容,包括一些优秀的多提供商OpenID包和OAuth包。 它们都可以用作曲家安装,你可以在Laravel 3(和4)的start.php文件中为它们做很多设置。 希望这可以帮助! The best route to go down with this is probably to look for something that's framework agno ...