org.apache.pig.impl.logicalLayer.FrontendException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • java.lang.Integer to java.lang.Long in Bincond
    via by Gufran Mohammed Pathan,
  • java.lang.Integer to java.lang.Long in Bincond
    via by Gufran Mohammed Pathan,
  • java.lang.Integer to java.lang.Long in Bincond
    via by Gufran Mohammed Pathan,
  • Strange cast error in Pig/Hadoop
    via Stack Overflow by Giovanni Botta
    ,
  • When bulk inserting entities, you might get an error similar to this: {quote} Exception in thread "main" java.lang.ClassCastException: org.hibernate.action.internal.DelayedPostInsertIdentifier cannot be cast to java.lang.Long at java.lang.Long.compareTo(Long.java:54) at org.hibernate.internal.util.compare.ComparableComparator.compare(ComparableComparator.java:41) at org.hibernate.internal.util.compare.ComparableComparator.compare(ComparableComparator.java:36) at org.hibernate.type.AbstractStandardBasicType.compare(AbstractStandardBasicType.java:225) at org.hibernate.action.internal.CollectionAction.compareTo(CollectionAction.java:172) at org.hibernate.engine.spi.ExecutableList.add(ExecutableList.java:222) at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:250) at org.hibernate.event.internal.AbstractFlushingEventListener.flushCollections(AbstractFlushingEventListener.java:274) at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:103) at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:55) at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1222) {quote} This is better illustrated in the attached sample application. This is the main logics causing problems: {code:java} for (int i = 0; i < 10000; i++) { final Entity1 entity1 = new Entity1(); session.persist(entity1); final Entity2 entity2 = new Entity2(); session.persist(entity2); // session.flush(); final Criteria criteria = session.createCriteria(Entity2.class); entity1.setEntities(criteria.list()); if (i % BULK_SIZE == 0) { session.flush(); } } {code} If you uncomment the first flush operation, it will work, but at a highly reduced performance level. If you comment out the collection setter, you'll see that the application finishes successfully in a few seconds.
    via by Stig Runar Vangen,
  • When bulk inserting entities, you might get an error similar to this: {quote} Exception in thread "main" java.lang.ClassCastException: org.hibernate.action.internal.DelayedPostInsertIdentifier cannot be cast to java.lang.Long at java.lang.Long.compareTo(Long.java:54) at org.hibernate.internal.util.compare.ComparableComparator.compare(ComparableComparator.java:41) at org.hibernate.internal.util.compare.ComparableComparator.compare(ComparableComparator.java:36) at org.hibernate.type.AbstractStandardBasicType.compare(AbstractStandardBasicType.java:225) at org.hibernate.action.internal.CollectionAction.compareTo(CollectionAction.java:172) at org.hibernate.engine.spi.ExecutableList.add(ExecutableList.java:222) at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:250) at org.hibernate.event.internal.AbstractFlushingEventListener.flushCollections(AbstractFlushingEventListener.java:274) at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:103) at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:55) at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1222) {quote} This is better illustrated in the attached sample application. This is the main logics causing problems: {code:java} for (int i = 0; i < 10000; i++) { final Entity1 entity1 = new Entity1(); session.persist(entity1); final Entity2 entity2 = new Entity2(); session.persist(entity2); // session.flush(); final Criteria criteria = session.createCriteria(Entity2.class); entity1.setEntities(criteria.list()); if (i % BULK_SIZE == 0) { session.flush(); } } {code} If you uncomment the first flush operation, it will work, but at a highly reduced performance level. If you comment out the collection setter, you'll see that the application finishes successfully in a few seconds.
    via by Stig Runar Vangen,
  • Map.get(Object o) vs Map.get(K k) ?
    via by 843793,
    • org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1066: Unable to open iterator for alias E. Backend error : Exception while executing [POBinCond (Name: POBinCond[chararray] - scope-298 Operator Key: scope-298) children: [[LessThanExpr (Name: Less Than[boolean] - scope-295 Operator Key: scope-295) children: [[POProject (Name: Project[int][0] - scope-293 Operator Key: scope-293) children: null at []], [ConstantExpression (Name: Constant(10) - scope-294 Operator Key: scope-294) children: null at []]] at []], [ConstantExpression (Name: Constant(less than 20) - scope-296 Operator Key: scope-296) children: null at []], [ConstantExpression (Name: Constant(More than or equal to 20) - scope-297 Operator Key: scope-297) children: null at []]] at []]: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long at org.apache.pig.PigServer.openIterator(PigServer.java:872) at org.apache.pig.tools.grunt.GruntParser.processDump(GruntParser.java:774) at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:376) at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:198) at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:173) at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:69) at org.apache.pig.Main.run(Main.java:541) at org.apache.pig.Main.main(Main.java:156) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.hadoop.util.RunJar.main(RunJar.java:212) Caused by: org.apache.pig.backend.executionengine.ExecException: ERROR 0: Exception while executing [POBinCond (Name: POBinCond[chararray] - scope-298 Operator Key: scope-298) children: [[LessThanExpr (Name: Less Than[boolean] - scope-295 Operator Key: scope-295) children: [[POProject (Name: Project[int][0] - scope-293 Operator Key: scope-293) children: null at []], [ConstantExpression (Name: Constant(10) - scope-294 Operator Key: scope-294) children: null at []]] at []], [ConstantExpression (Name: Constant(less than 20) - scope-296 Operator Key: scope-296) children: null at []], [ConstantExpression (Name: Constant(More than or equal to 20) - scope-297 Operator Key: scope-297) children: null at []]] at []]: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long at org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator.getNext(PhysicalOperator.java:338) at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.processPlan(POForEach.java:382) at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNextTuple(POForEach.java:302) at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapReduce$Reduce.runPipeline(PigGenericMapReduce.java:464) at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapReduce$Reduce.processOnePackageOutput(PigGenericMapReduce.java:432) at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapReduce$Reduce.reduce(PigGenericMapReduce.java:412) at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapReduce$Reduce.reduce(PigGenericMapReduce.java:256) at org.apache.hadoop.mapreduce.Reducer.run(Reducer.java:171) at org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:627) at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:389) at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:168) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:415) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1594) at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:163) Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long at java.lang.Long.compareTo(Long.java:50) at org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.LessThanExpr.doComparison(LessThanExpr.java:109) at org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.LessThanExpr.getNextBoolean(LessThanExpr.java:79) at org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POBinCond.genericGetNext(POBinCond.java:72) at org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POBinCond.getNextString(POBinCond.java:138) at org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator.getNext(PhysicalOperator.java:315)
    No Bugmate found.