-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26384/
-----------------------------------------------------------
Review request for Ambari, Alejandro Fernandez, Myroslav Papirkovskyy, and
Sumit Mohanty.
Bugs: AMBARI-4420
https://issues.apache.org/jira/browse/AMBARI-4420
Repository: ambari
Description
-------
{code}
PROBLEM:
ORA-01795: maximum number of expressions in a list is 1000 in Ambari Server
log. Customer recently upgraded to Ambari 1.4.2
Error is:
08:54:51,320 ERROR [qtp1280560314-2070] ReadHandler:84 - Caught a runtime
exception executing a query
Local Exception Stack:
Exception [EclipseLink-4002] (Eclipse Persistence Services -
2.4.0.v20120608-r11652): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLSyntaxErrorException: ORA-01795: maximum number
of expressions in a list is 1000
Error Code: 1795
Call: SELECT task_id, attempt_count, event, exitcode, host_name,
last_attempt_time, request_id, role, role_command, stage_id, start_time,
status, std_error, std_out FROM host_role_command WHERE (task_id IN
(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?...
bind => [2551 parameters bound]
Query: ReadAllQuery(referenceClass=HostRoleCommandEntity sql="SELECT task_id,
attempt_count, event, exitcode, host_name, last_attempt_time, request_id, role,
role_command, stage_id, start_time, status, std_error, std_out FROM
host_role_command WHERE (task_id IN ?) ORDER BY task_id")
at
org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:333)
STEPS TO REPRODUCE: Over 1000 entries in the host_role_command and
execution_command tables when oracle is used for Ambari backend databse
ACTUAL BEHAVIOR: Oracle throws the error
Diffs
-----
ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java
9eca8c0
ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java
f9407f7
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/DaoUtils.java
d92491f
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostRoleCommandDAO.java
56dd304
ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionDBAccessorImpl.java
4369604
ambari-server/src/test/java/org/apache/ambari/server/agent/AgentResourceTest.java
ff8998a
ambari-server/src/test/java/org/apache/ambari/server/orm/DBAccessorImplTest.java
7ad7638
Diff: https://reviews.apache.org/r/26384/diff/
Testing
-------
All unit test passed.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Ambari Main ....................................... SUCCESS [2.581s]
[INFO] Apache Ambari Project POM ......................... SUCCESS [0.500s]
[INFO] Ambari Web ........................................ SUCCESS [43.322s]
[INFO] Ambari Views ...................................... SUCCESS [10.910s]
[INFO] Ambari Admin View ................................. SUCCESS [1:02.402s]
[INFO] Ambari Server ..................................... SUCCESS [21:41.446s]
[INFO] Ambari Agent ...................................... SUCCESS [13.191s]
[INFO] Ambari Client ..................................... SUCCESS [0.083s]
[INFO] Ambari Python Client .............................. SUCCESS [1.803s]
[INFO] Ambari Groovy Client .............................. SUCCESS [11.065s]
[INFO] Ambari Shell ...................................... SUCCESS [0.152s]
[INFO] Ambari Python Shell ............................... SUCCESS [0.609s]
[INFO] Ambari Groovy Shell ............................... SUCCESS [8.021s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 24:16.665s
[INFO] Finished at: Mon Oct 06 14:50:39 PDT 2014
[INFO] Final Memory: 75M/753M
[INFO] ------------------------------------------------------------------------
Thanks,
Sid Wagle