All, I am trying to use Hibernate within my reducer and it goeth not well. Has anybody ever successfully done this?
I have a java package that contains my Hadoop driver, mapper, and reducer along with a persistence class. I call Hibernate from the cleanup() method in my reducer class. It complains that it cannot find the persistence class. The class is in the same package as the reducer and this all would work outside of Hadoop. The error is thrown when I attempt to begin a transaction. The error: org.hibernate.MappingException: Unknown entity: qq.mob.depart.EpiState The code: protected void cleanup(Context ctx) throws IOException, InterruptedException { ... org.hibernate.cfg.Configuration cfg = new org.hibernate.cfg.Configuration(); SessionFactory sessionFactory = cfg.configure("hibernate.cfg.xml").buildSessionFactory(); cfg.addAnnotatedClass(EpiState.class); // This class is in the same package as the reducer. Session session = sessionFactory.openSession(); Transaction tx = session.getTransaction(); tx.begin(); //Error is thrown here. ... } If I create an executable jar file that contains all dependencies required by the MR job do all said dependencies get distributed to all nodes? If I specify but one reducer, which node in the cluster will the reducer run on? Thanks -- Geoffry Roberts