在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):patrickangeles/cdh-maven-archetype开源软件地址(OpenSource Url):https://github.com/patrickangeles/cdh-maven-archetype开源编程语言(OpenSource Language):Java 93.3%开源软件介绍(OpenSource Introduction):Cloudera Maven ArchetypeThis 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
MapReduce in < 100 KeystrokesYou can create a template MapReduce executable jar using the 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. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论