Fix for SpecificAvroGroupByIT tests that were left out from previous commit

Signed-off-by: Josh Wills <[email protected]>


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

Branch: refs/heads/master
Commit: 6531106621730d8e527ecbf78245a023a05b8e34
Parents: b8891e5
Author: jwills <[email protected]>
Authored: Fri Aug 17 23:14:56 2012 -0700
Committer: Josh Wills <[email protected]>
Committed: Tue Aug 21 18:54:29 2012 -0700

----------------------------------------------------------------------
 .../apache/crunch/lib/SpecificAvroGroupByIT.java   |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/65311066/crunch/src/it/java/org/apache/crunch/lib/SpecificAvroGroupByIT.java
----------------------------------------------------------------------
diff --git 
a/crunch/src/it/java/org/apache/crunch/lib/SpecificAvroGroupByIT.java 
b/crunch/src/it/java/org/apache/crunch/lib/SpecificAvroGroupByIT.java
index 553ba7e..7b61813 100644
--- a/crunch/src/it/java/org/apache/crunch/lib/SpecificAvroGroupByIT.java
+++ b/crunch/src/it/java/org/apache/crunch/lib/SpecificAvroGroupByIT.java
@@ -35,7 +35,6 @@ import org.apache.crunch.Pair;
 import org.apache.crunch.impl.mr.MRPipeline;
 import org.apache.crunch.io.At;
 import org.apache.crunch.test.Person;
-import org.apache.crunch.test.Person.Builder;
 import org.apache.crunch.test.TemporaryPath;
 import org.apache.crunch.test.TemporaryPaths;
 import org.apache.crunch.types.avro.Avros;
@@ -100,7 +99,7 @@ public class SpecificAvroGroupByIT implements Serializable {
 
       @Override
       public Pair<String, Person> map(Person input) {
-        String key = input.getName().toString();
+        String key = input.name.toString();
         return Pair.of(key, input);
 
       }
@@ -117,20 +116,20 @@ public class SpecificAvroGroupByIT implements 
Serializable {
 
   private void createPersonAvroFile(File avroFile) throws IOException {
 
-    Builder person = Person.newBuilder();
-    person.setAge(40);
-    person.setName("Bob");
+    Person person = new Person();
+    person.age = 40;
+    person.name = "Bob";
     List<CharSequence> siblingNames = Lists.newArrayList();
     siblingNames.add("Bob" + "1");
     siblingNames.add("Bob" + "2");
-    person.setSiblingnames(siblingNames);
+    person.siblingnames = siblingNames;
 
     FileOutputStream outputStream = new FileOutputStream(avroFile);
     SpecificDatumWriter<Person> writer = new 
SpecificDatumWriter<Person>(Person.class);
 
     DataFileWriter<Person> dataFileWriter = new DataFileWriter<Person>(writer);
     dataFileWriter.create(Person.SCHEMA$, outputStream);
-    dataFileWriter.append(person.build());
+    dataFileWriter.append(person);
     dataFileWriter.close();
     outputStream.close();
   }

Reply via email to