Sign up ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free.

i am getting following error while running pig script. My script is running fine in grant shell. i am getting this error while running through 'time pig' .

pig version - Apache Pig version 0.11.0-cdh4.6.0

java.lang.ClassCastException: java.lang.Boolean cannot be cast to org.apache.pig.data.Tuple
    at org.apache.pig.data.BinInterSedes.readBag(BinInterSedes.java:237)
    at org.apache.pig.data.BinInterSedes.readDatum(BinInterSedes.java:349)
    at org.apache.pig.data.BinInterSedes.readDatum(BinInterSedes.java:313)
    at org.apache.pig.data.utils.SedesHelper.readGenericTuple(SedesHelper.java:144)
    at org.apache.pig.data.BinInterSedes.readDatum(BinInterSedes.java:344)
    at org.apache.pig.data.BinInterSedes.readDatum(BinInterSedes.java:313)
    at org.apache.pig.data.utils.SedesHelper.readGenericTuple(SedesHelper.java:144)
    at org.apache.pig.data.BinInterSedes.readTuple(BinInterSedes.java:144)
    at org.apache.pig.data.BinInterSedes.readTuple(BinInterSedes.java:1286)
    at org.apache.pig.impl.io.NullableTuple.readFields(NullableTuple.java:54)
    at org.apache.hadoop.io.serializer.WritableSerialization$WritableDeserializer.deserialize(WritableSerialization.java:73)
    at org.apache.hadoop.io.serializer.WritableSerialization$WritableDese
share|improve this question
3  
add your code in question –  Kishore Kumar Suthar Aug 27 at 10:48

1 Answer 1

Please share your code so that we can a better picture. From what you have posted, check the following-

  • Are you using a variable where a tuple is required? If yes, then you should specify a field from a relation instead.
  • Are you using an explicit cast in your script or can you figure if there's an implicit cast being used by Pig for some reason like for comparison or join etc.? If yes, then you should try to make sure that these statements are comparing fields with same schemas.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.