ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Beerbower" <tbeerbo...@hortonworks.com>
Subject Re: Review Request 34813: Views : Can't create instance (intermittent)
Date Fri, 29 May 2015 16:00:20 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/34813/
-----------------------------------------------------------

(Updated May 29, 2015, 4 p.m.)


Review request for Ambari and John Speidel.


Bugs: AMBARI-11540
    https://issues.apache.org/jira/browse/AMBARI-11540


Repository: ambari


Description
-------

Intermittent BatchUpdateException during create instance of HIVE view.

Refactored @Transactional method ViewRegistry.installViewInstance() to remove instanceDAO.findByName()
which appears to trigger EntityManagerImpl.flush().


    Internal Exception: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO viewinstanceproperty
(name, VALUE, view_name, view_instance_name) VALUES ('views.tez.instance', NULL, 'HIVE{0.4.0}',
'hiwe2') was aborted.  Call getNextException to see the cause.
    Error Code: 0
    Call: INSERT INTO viewinstanceproperty (name, VALUE, view_name, view_instance_name) VALUES
(?, ?, ?, ?)
	    bind => [4 parameters bound]
		at org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:868)
		at org.eclipse.persistence.internal.jpa.QueryImpl.performPreQueryFlush(QueryImpl.java:963)
		at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:207)
		at org.eclipse.persistence.internal.jpa.QueryImpl.getSingleResult(QueryImpl.java:517)
		at org.eclipse.persistence.internal.jpa.EJBQueryImpl.getSingleResult(EJBQueryImpl.java:400)
		at org.apache.ambari.server.orm.dao.DaoUtils.selectSingle(DaoUtils.java:71)
		at org.apache.ambari.server.orm.dao.ViewInstanceDAO.findByName(ViewInstanceDAO.java:62)
		at org.apache.ambari.server.orm.AmbariLocalSessionInterceptor.invoke(AmbariLocalSessionInterceptor.java:53)
		at org.apache.ambari.server.view.ViewRegistry.installViewInstance(ViewRegistry.java:528)


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java b3ae2d0 
  ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java c66a9ce


Diff: https://reviews.apache.org/r/34813/diff/


Testing (updated)
-------

Manual testing to create view instances.

Updated unit tests.

mvn clean test

all tests pass

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 47:12 min
[INFO] Finished at: 2015-05-29T11:59:36-04:00
[INFO] Final Memory: 54M/1374M
[INFO] ------------------------------------------------------------------------


Thanks,

Tom Beerbower


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message