Skip to content

Commit

Permalink
Update WritableLoadCaster to work with pig0.9
Browse files Browse the repository at this point in the history
This is a minor fix. In pig0.9, they changed around the LoadCaster
interface. Since elephantbird implements this, it is causing errors to
be thrown in code that works in pig0.8. This is a minor fix that makes
these errors go away.
  • Loading branch information
Jonathan Coveney committed Nov 3, 2011
1 parent 31f2973 commit 5fa4d30
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -77,6 +77,10 @@ public Double bytesToDouble(byte[] bytes) throws IOException {
public Map<String, Object> bytesToMap(byte[] bytes) throws IOException {
return toMap(writable = readFields(bytes, writable));
}

public Map<String, Object> bytesToMap(byte[] bytes, ResourceFieldSchema schema) throws IOException {
return toMap(writable = readFields(bytes, writable), schema);
}

@Override
public Tuple bytesToTuple(byte[] bytes, ResourceFieldSchema schema) throws IOException {
Expand Down Expand Up @@ -111,6 +115,10 @@ protected Double toDouble(W writable) throws IOException {
protected Map<String, Object> toMap(W writable) throws IOException {
throw new UnsupportedOperationException();
}

protected Map<String, Object> toMap(W writable, ResourceFieldSchema schema) throws IOException {
throw new UnsupportedOperationException();
}

protected Tuple toTuple(W writable, ResourceFieldSchema schema) throws IOException {
throw new UnsupportedOperationException();
Expand Down

0 comments on commit 5fa4d30

Please sign in to comment.