Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Update examples for Crunch 0.3.0. #43

Closed
wants to merge 1 commit into from

2 participants

@mafr

Fix package name in example code and documentation.
Clean up example POM.

@mafr mafr Update the examples for Crunch 0.3.0.
Fix package name in example code and documentation.
Clean up example POM.
8e64ffe
@jwills
Owner

Mathias-- thank you for this; unfortunately, I committed a similar change on the Apache branch yesterday, which I'm periodically syncing with this one while we move the infrastructure over.

BTW, I'm a huge fan of the maven archetype you defined for creating hadoop jobs, and have used it in several of my projects-- thank you!

@mafr

No worries, bad timing on my end.

@mafr mafr closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 8, 2012
  1. @mafr

    Update the examples for Crunch 0.3.0.

    mafr authored
    Fix package name in example code and documentation.
    Clean up example POM.
This page is out of date. Refresh to see the latest.
View
6 README.md
@@ -56,7 +56,7 @@ Here is the classic WordCount application using Crunch:
import com.cloudera.crunch.Pipeline;
import com.cloudera.crunch.impl.mr.MRPipeline;
import com.cloudera.crunch.lib.Aggregate;
- import com.cloudera.crunch.type.writable.Writables;
+ import com.cloudera.crunch.types.writable.Writables;
public class WordCount {
public static void main(String[] args) throws Exception {
@@ -116,8 +116,8 @@ in the output PCollection is serialized. While Crunch takes advantage of Java Ge
compile-time type safety, the generic type information is not available at runtime. Crunch needs to know
how to map the records stored in each PCollection into a Hadoop-supported serialization format in order
to read and write data to disk. Two serialization implementations are supported in crunch via the
-`PTypeFamily` interface: a Writable-based system that is defined in the com.cloudera.crunch.type.writable
-package, and an Avro-based system that is defined in the com.cloudera.crunch.type.avro package. Each
+`PTypeFamily` interface: a Writable-based system that is defined in the com.cloudera.crunch.types.writable
+package, and an Avro-based system that is defined in the com.cloudera.crunch.types.avro package. Each
implementation provides convenience methods for working with the common PTypes (Strings, longs, bytes, etc.)
as well as utility methods for creating PTypes from existing Writable classes or Avro schemas.
View
14 examples/pom.xml
@@ -4,16 +4,14 @@
<groupId>com.cloudera.crunch</groupId>
<artifactId>crunch-examples</artifactId>
<packaging>jar</packaging>
- <version>0.2.0</version>
+ <version>0.3.0</version>
<name>crunch-examples</name>
- <dependencies>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- <version>r09</version>
- </dependency>
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+ <dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-core</artifactId>
@@ -24,7 +22,7 @@
<dependency>
<groupId>com.cloudera.crunch</groupId>
<artifactId>crunch</artifactId>
- <version>0.2.0</version>
+ <version>0.3.0</version>
</dependency>
</dependencies>
View
2  examples/src/main/java/com/cloudera/crunch/examples/AverageBytesByIP.java
@@ -33,7 +33,7 @@
import com.cloudera.crunch.Pair;
import com.cloudera.crunch.Pipeline;
import com.cloudera.crunch.impl.mr.MRPipeline;
-import com.cloudera.crunch.type.writable.Writables;
+import com.cloudera.crunch.types.writable.Writables;
@SuppressWarnings("serial")
public class AverageBytesByIP extends Configured implements Tool, Serializable {
View
2  examples/src/main/java/com/cloudera/crunch/examples/TotalBytesByIP.java
@@ -32,7 +32,7 @@
import com.cloudera.crunch.Pair;
import com.cloudera.crunch.Pipeline;
import com.cloudera.crunch.impl.mr.MRPipeline;
-import com.cloudera.crunch.type.writable.Writables;
+import com.cloudera.crunch.types.writable.Writables;
@SuppressWarnings("serial")
public class TotalBytesByIP extends Configured implements Tool, Serializable {
View
2  examples/src/main/java/com/cloudera/crunch/examples/WordCount.java
@@ -21,7 +21,7 @@
import com.cloudera.crunch.Pipeline;
import com.cloudera.crunch.impl.mr.MRPipeline;
import com.cloudera.crunch.lib.Aggregate;
-import com.cloudera.crunch.type.writable.Writables;
+import com.cloudera.crunch.types.writable.Writables;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.util.GenericOptionsParser;
Something went wrong with that request. Please try again.