Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update WritableLoadCaster to work with pig0.9

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...
commit 5fa4d305d919b3f3db666277eca86f011975367a 1 parent 31f2973
@jcoveney jcoveney authored
View
8 src/java/com/twitter/elephantbird/pig/util/WritableLoadCaster.java
@@ -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 {
@@ -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();
Please sign in to comment.
Something went wrong with that request. Please try again.