• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

patrickangeles/cdh-maven-archetype: Cloudera Maven Archetypes

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

patrickangeles/cdh-maven-archetype

开源软件地址(OpenSource Url):

https://github.com/patrickangeles/cdh-maven-archetype

开源编程语言(OpenSource Language):

Java 93.3%

开源软件介绍(OpenSource Introduction):

Cloudera Maven Archetype

This project is a collection of Maven archetype templates. That is, the projects are intended to be read by the maven-archetype-plugin to produce an archetype.

Archetypes are published to Cloudera's Maven repository at

RELEASES https://repository.cloudera.com/content/repositories/releases/
SNAPSHOTS https://repository.cloudera.com/content/repositories/snapshots/

MapReduce in < 100 Keystrokes

You can create a template MapReduce executable jar using the mapred-driver-archetype.

Here's how you do it (you'll need a recent version of Maven installed):

$ mvn archetype:generate -DarchetypeCatalog=http://repository.cloudera.com/archetype-catalog.xml
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:2.0:generate (default-cli) @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:2.0:generate (default-cli) @ standalone-pom <<<
[INFO]
[INFO] --- maven-archetype-plugin:2.0:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Interactive mode
[INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
Choose archetype:
1: http://repository.cloudera.com/archetype-catalog.xml -> mapred-driver-archetype (mapred-driver-archetype)
Choose a number: : 1
Define value for property 'groupId': : foo
Define value for property 'artifactId': : foo
Define value for property 'version':  1.0-SNAPSHOT: : <enter>
Define value for property 'package':  foo: : <enter>
Confirm properties configuration:
groupId: foo
artifactId: foo
version: 1.0-SNAPSHOT
package: foo
 Y: : <enter>
 [INFO] ------------------------------------------------------------------------
 [INFO] BUILD SUCCESS
 [INFO] ------------------------------------------------------------------------
 [INFO] Total time: 10.501s
 [INFO] Finished at: Wed Apr 27 22:20:16 EDT 2011
 [INFO] Final Memory: 7M/81M
 [INFO] ------------------------------------------------------------------------

Now you've got a Maven-based Hadoop MapReduce project that links to CDH3 artifacts.

Building and running

$ cd foo
$ mvn package
$ hadoop jar target/foo-1.0-SNAPSHOT-driver.jar

Running unit tests

$ mvn test

Importing your project in Eclipse

$ mvn eclipse:eclipse -DdownloadSources

Then, in Eclipse, go: Import... > Existing Projects... > select the 'foo' directory (or parent thereof) > done! The nice thing about using Maven here is that it links the sources for you.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
wesley5201314/dubbo: spring+maven+dubbo整合发布时间:2022-08-17
下一篇:
springframeworkguru/mb2g-lombok: Maven Lombok Example发布时间:2022-08-17
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap