Skip to content

Commit

Permalink
PIG-2732: Let's get rid of the deprecated Tuple methods (PIG-2732-fix…
Browse files Browse the repository at this point in the history
…-compiliation-errors.patch)

git-svn-id: https://svn.apache.org/repos/asf/pig/trunk@1346737 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Jianyong Dai committed Jun 6, 2012
1 parent c422206 commit 7b43cf0
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,6 @@ private Linebreaks canonicalizeEOLTreatmentRequest (String theEolTreatmentStr) {
@Override
public void putNext(Tuple tupleToWrite) throws IOException {

if (tupleToWrite.isNull()) {
logger.warn("putNext() called with null for a tuple.");
return;
}
ArrayList<Object> mProtoTuple = new ArrayList<Object>();
int embeddedNewlineIndex = -1;
String fieldStr = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,6 @@ public void xtestReadNeg1() throws IOException, ParseException {
scanner.getValue(RowValue);
System.out.println("row: " + RowValue.toString());
System.out.println("row1: " + RowValue.get(0));
Assert.assertEquals(false, RowValue.isNull());
Assert.assertEquals(null, RowValue.get(0));
Assert.assertEquals(1, RowValue.size());
reader.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,15 +240,13 @@ public void testRead3() throws IOException, ParseException {
scanner.getKey(key);
Assert.assertEquals(key, new BytesWritable("k11".getBytes()));
scanner.getValue(RowValue);
Assert.assertEquals(false, RowValue.isNull());
Assert.assertEquals(null, RowValue.get(0));
Assert.assertEquals(1, RowValue.size());

scanner.advance();
scanner.getKey(key);
Assert.assertEquals(key, new BytesWritable("k12".getBytes()));
scanner.getValue(RowValue);
Assert.assertEquals(false, RowValue.isNull());
Assert.assertEquals(null, RowValue.get(0));
Assert.assertEquals(1, RowValue.size());
reader.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,15 +276,13 @@ public void testRead3() throws IOException, ParseException {
scanner.getKey(key);
Assert.assertEquals(key, new BytesWritable("k11".getBytes()));
scanner.getValue(RowValue);
Assert.assertEquals(false, RowValue.isNull());
Assert.assertEquals(null, RowValue.get(0));
Assert.assertEquals(1, RowValue.size());

scanner.advance();
scanner.getKey(key);
Assert.assertEquals(key, new BytesWritable("k12".getBytes()));
scanner.getValue(RowValue);
Assert.assertEquals(false, RowValue.isNull());
Assert.assertEquals(null, RowValue.get(0));
Assert.assertEquals(1, RowValue.size());
reader.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,15 +237,13 @@ public void testRead3() throws IOException, ParseException {
scanner.getKey(key);
Assert.assertEquals(key, new BytesWritable("k11".getBytes()));
scanner.getValue(RowValue);
Assert.assertEquals(false, RowValue.isNull());
Assert.assertEquals(null, RowValue.get(0));
Assert.assertEquals(1, RowValue.size());

scanner.advance();
scanner.getKey(key);
Assert.assertEquals(key, new BytesWritable("k12".getBytes()));
scanner.getValue(RowValue);
Assert.assertEquals(false, RowValue.isNull());
Assert.assertEquals(null, RowValue.get(0));
Assert.assertEquals(1, RowValue.size());
reader.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ public void testRead2() throws IOException, ParseException {
// Assert.assertEquals(key, new BytesWritable("k11".getBytes()));
scanner.getValue(RowValue);
// RowValue is an emplty record
Assert.assertEquals(false, RowValue.isNull());
Assert.assertEquals(null, RowValue.get(0));
Assert.assertEquals(1, RowValue.size());
reader.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,6 @@ public void testReadNeg1() throws IOException, ParseException {
System.out.println(RowValue);
row++;
if (row == 1) {
Assert.assertEquals(false, RowValue.isNull());
Assert.assertEquals(null, RowValue.get(0));
Assert.assertEquals(1, RowValue.size());
}
Expand All @@ -417,15 +416,13 @@ public void testNeg2() throws IOException, ParseException {
scanner.getKey(key);
Assert.assertEquals(key, new BytesWritable("k11".getBytes()));
scanner.getValue(RowValue);
Assert.assertEquals(false, RowValue.isNull());
Assert.assertEquals(null, RowValue.get(0));
Assert.assertEquals(1, RowValue.size());

scanner.advance();
scanner.getKey(key);
Assert.assertEquals(key, new BytesWritable("k12".getBytes()));
scanner.getValue(RowValue);
Assert.assertEquals(false, RowValue.isNull());
Assert.assertEquals(null, RowValue.get(0));
Assert.assertEquals(1, RowValue.size());
reader.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,6 @@ public void testReadNeg1() throws IOException, ParseException {
System.out.println(RowValue);
row++;
if (row == 1) {
Assert.assertEquals(false, RowValue.isNull());
Assert.assertEquals(null, RowValue.get(0));
Assert.assertEquals(1, RowValue.size());
}
Expand All @@ -407,15 +406,13 @@ public void testNeg2() throws IOException, ParseException {
scanner.getKey(key);
Assert.assertEquals(key, new BytesWritable("k11".getBytes()));
scanner.getValue(RowValue);
Assert.assertEquals(false, RowValue.isNull());
Assert.assertEquals(null, RowValue.get(0));
Assert.assertEquals(1, RowValue.size());

scanner.advance();
scanner.getKey(key);
Assert.assertEquals(key, new BytesWritable("k12".getBytes()));
scanner.getValue(RowValue);
Assert.assertEquals(false, RowValue.isNull());
Assert.assertEquals(null, RowValue.get(0));
Assert.assertEquals(1, RowValue.size());
reader.close();
Expand Down

0 comments on commit 7b43cf0

Please sign in to comment.