crunch-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gr...@apache.org
Subject [1/5] git commit: Make PType extend Serializable
Date Fri, 06 Jul 2012 16:43:44 GMT
Updated Branches:
  refs/heads/master 9367826ee -> 0607de6ec


Make PType extend Serializable

Make PType extend Serializable so that PTypes can be passed within
a DoFn to be used with map side joins.


Project: http://git-wip-us.apache.org/repos/asf/incubator-crunch/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-crunch/commit/8b64b84f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-crunch/tree/8b64b84f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-crunch/diff/8b64b84f

Branch: refs/heads/master
Commit: 8b64b84f880abeabf09c6958306de20b6202d758
Parents: 6d701c1
Author: Gabriel Reid <gabriel.reid@gmail.com>
Authored: Sun Jun 24 22:27:05 2012 +0200
Committer: Gabriel Reid <gabriel.reid@gmail.com>
Committed: Fri Jul 6 17:56:57 2012 +0200

----------------------------------------------------------------------
 .../com/cloudera/crunch/types/avro/AvroType.java   |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/8b64b84f/src/main/java/com/cloudera/crunch/types/avro/AvroType.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/cloudera/crunch/types/avro/AvroType.java b/src/main/java/com/cloudera/crunch/types/avro/AvroType.java
index 0489fb6..8ce4177 100644
--- a/src/main/java/com/cloudera/crunch/types/avro/AvroType.java
+++ b/src/main/java/com/cloudera/crunch/types/avro/AvroType.java
@@ -57,7 +57,7 @@ public class AvroType<T> implements PType<T> {
 			MapFn outputMapFn, PType... ptypes) {
 		this.typeClass = typeClass;
 		this.schema = Preconditions.checkNotNull(schema);
-    this.schemaString = schema.toString();
+		this.schemaString = schema.toString();
 		this.baseInputMapFn = inputMapFn;
 		this.baseOutputMapFn = outputMapFn;
 		this.subTypes = ImmutableList.<PType> builder().add(ptypes).build();
@@ -79,9 +79,9 @@ public class AvroType<T> implements PType<T> {
 	}
 
 	public Schema getSchema() {
-    if (schema == null) {
-      schema = new Schema.Parser().parse(schemaString);
-    }
+	  if (schema == null){
+	    schema = new Schema.Parser().parse(schemaString);
+	  }
 		return schema;
 	}
 


Mime
View raw message