首页 \ 问答 \ Wordcount示例hadoop(Wordcount example hadoop)

Wordcount示例hadoop(Wordcount example hadoop)

我是Hadoop的新手,并试图通过其网站上提供的示例进行探索。因此,这听起来像是一个非常基本的问题。

在Eclipse IDE中,我简单地创建了一个java项目,导入了必要的hadoop jar和核心jar。 然后,我运行了一个可下载的WordCount示例,它可以成功运行。

但是,我没有设置任何Hadoop安装或单个节点群集。

因此,我无法弄清楚,即使没有在我的系统中配置hadoop,该作业如何运行。

我最初的理解是,我需要在Ubuntu Linux上安装像hadoop Hadoop这样的hadoop才能开始,但显然这不是必需的。 为什么?


I am new to Hadoop and trying to explore it via examples available on their website.So this might sound like a very basic question.

In Eclipse IDE I simply created a java project ,imported necessary hadoop jars and the core jar. I then ran a WordCount example that comes with downloadable and it ran successfully.

However, I didn't setup any Hadoop installation or a single node cluster.

Hence I am unable to figure out how can that job run even without hadoop being configured in my system.

My initial understanding was I will need to install hadoop following something like Running Hadoop on Ubuntu Linux to get going, but apparently that was not necessary. Why?


原文:https://stackoverflow.com/questions/32641683
更新时间:2022-11-10 13:11

最满意答案

我读过这个答案,但是在程序集输出中没有看到... ..._rot0cw_closure

你需要命名你的模块。 例如添加module Main where在开始处*在生成的程序Main_rot0cw_closure获取Main_rot0cw_closure

*严格来说,您的模块需要导出该功能。


I've read this answer, but I don't see any ..._rot0cw_closure in the assembly output.

You need to name your module. e.g. add module Main where at the beginning* to get Main_rot0cw_closure in the generated assembly.

* Strictly speaking, your module needs to export the function.

相关问答

更多
  • 以下代码需要以下扩展名: {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeFamilies #-} 首先,您可以使用GHCi来找出您的人员类型的通用表示形式: λ> :kind! Rep Person () Rep Person () :: * = M1 ...
  • 真的有点傻 GHC随附的每个图书馆均提供不少于4种口味的图书馆: 静态的 动态 异形 GHCI GHCi版本只是在一个.o文件中链接在一起的静态版本。 其他三个版本都有自己的接口文件集( .hi文件)。 分析版本似乎是未成功版本大小的两倍(这有点可疑,我应该研究一下)。 记住, GHC本身是一个图书馆 ,所以你得到4份GHC。 不仅如此,GHC二进制本身也是静态链接的,所以这是GHC的5个拷贝。 我们最近做了这样,GHCi可以使用静态.a文件。 这将使我们摆脱这些风味之一。 长期来说,我们应该动态地链接GH ...
  • 这个GHC Trac页面也很好地解释了传球。 这个页面解释了优化顺序,尽管如同Trac的大多数Wiki一样,它已经过时了。 对于具体细节,最好的做法可能是看一下特定的程序是如何编译的。 查看哪些优化正在执行的最好方法是使用-v标志详细地编译程序。 以我的电脑为例我可以找到第一块Haskell: Glasgow Haskell Compiler, Version 7.4.2, stage 2 booted by GHC version 7.4.1 Using binary package database: ...
  • 所以,你没有在这个bug本身给我足够的信息,但我将尝试使用我的通灵调试能力来回答你的问题。 您试图编译依赖于包p和q的GHC程序。 您可能使用-package p和-package q指定它们。 您的包数据库可能看起来像这样(或者传递看起来像这样): id: p-0.1-8aa5d403c45ea59dcd2c39f123e27d57 depends: unix-2.6.0.1-9ce33138f4fcfb9c37f6e6c300bcc367 id: q-0.1-d5221a8c8a269b66ab9a0 ...
  • 你可以随时写 import Prelude hiding (fromRight) 即使在Prelude中不存在fromRight也是有效的。 因此,如果你想编写一个兼容旧版和新版Prelude的模块,你可以简单地选择忽略新的fromRight函数,并且始终使用库中的一个。 You can always write import Prelude hiding (fromRight) which is valid even if fromRight does not exist in Prelude. Th ...
  • 这些消息(技术上甚至不是警告)表明GHC可以进行进一步的优化(可能会或可能不会导致性能提高),但是由于构造函数专门化的限制没有。 您也可以通过将-fspec-constr-count=n与足够大的n (默认值为3)或-fno-spec-constr-count传递给编译器来消除它们。 结果将是更大的代码(更多的特化),这可能更快,同样快,或者在不幸的情况下更慢。 如果性能至关重要,您应该尝试比较。 These messages (technically not even warnings) indicate ...
  • 我读过这个答案,但是在程序集输出中没有看到... ..._rot0cw_closure 。 你需要命名你的模块。 例如添加module Main where在开始处*在生成的程序Main_rot0cw_closure获取Main_rot0cw_closure 。 *严格来说,您的模块需要导出该功能。 I've read this answer, but I don't see any ..._rot0cw_closure in the assembly output. You need to name yo ...
  • ghc是一个编译器,因此需要一个入口点来运行你的代码。 这是main功能,它应该具有类型IO ()并且存在于Main模块中(顶部没有module声明的module自动命名为Main )。 WinHugs是一个解释器 - 你可以用你喜欢的任何参数运行你喜欢的任何函数。 如果你想使用这样的ghc,你应该使用ghci - 它是ghc的解释器。 (WinHugs会更快地加载你的代码,而ghc会更快地运行你的代码。) ghc is a compiler, so needs a single entry point t ...
  • GHC使用/usr/lib/ghc/settings确定编译器和链接器选项,并使用/var/lib/ghc/package.conf.d/builtin_rts.conf等每个包文件来确定特定于包的链接器选项。 (自定义目录安装将分别在${GHC}/lib/ghc-${VERSION}/settings和${GHC}/lib/ghc-${VERSION}/package.conf.d 。) 以下是我为RTS找到的内容: ld-options: -u ghczmprim_GHCziTypes_Izh_stat ...
  • 如果在stack exec执行makefile,它将设置GHC_PACKAGE_PATH环境变量。 它还将适当地扩展PATH 。 或者,要在shell中设置此设置,您可以这样做 export GHC_PACKAGE_PATH=`stack path --ghc-package-path` If you execute the makefile within stack exec, it will set the GHC_PACKAGE_PATH environment variable. It will ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。