Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check type of object being written via TypedRecordOutputStream.writeObject(obj); Override Pail.toString() for nicer printing #43

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

vmarcinko
Copy link

TypedRecordOutputStream.writeObject(obj);
should check type of object being written to Pail.
Pail.toString() is also overriden to print Pail info more nicely (not just for this issue of course).

Result is following exception message:
Exception in thread "main" java.lang.IllegalArgumentException: Cannot write object SomeString of invalid type (class: java.lang.String) to pail: Pail{root='/marztest/bigdatalab/new', spec={structure=com.marcinko.bigdatalab.utils.pail.graph.DataPailStructure, args={}, format=SequenceFile}, fs=org.apache.hadoop.fs.LocalFileSystem@6fe78c96}
at com.backtype.hadoop.pail.Pail$TypedRecordOutputStream.writeObject(Pail.java:46)

@vmarcinko
Copy link
Author

Locally I have a gradle build setup instead of sbt, so it doesn't give me classpath related errors as above, so disregard this pull request for the time being

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant