Re: Review Request 52758: When multiple requests are running, aborting any will incorrectly abort all requests instead the desired one

2016-10-12 Thread Sid Wagle

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


Ship it!




Ship It!

- Sid Wagle


On Oct. 12, 2016, 9:04 p.m., Alejandro Fernandez wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52758/
> ---
> 
> (Updated Oct. 12, 2016, 9:04 p.m.)
> 
> 
> Review request for Ambari, Dmytro Grinenko, Dmitro Lisnichenko, Jonathan 
> Hurley, Nate Cole, and Sid Wagle.
> 
> 
> Bugs: AMBARI-18576
> https://issues.apache.org/jira/browse/AMBARI-18576
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> STR:
> 
> * Install Ambari 2.4.0.1 with any HDP stack (e.g., 2.5) and HDFS, YARN, ZK
> * Run multiple commands in parallel (such as service checks)
> * Attempt to abort any one of them
> 
> Instead of aborting just the desired one, it will abort all requests.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java
>  0e78cbc 
>   
> ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java
>  c31ca7e 
>   
> ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
>  e380ae4 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/StageDAO.java 
> 8ef4a1b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/StageEntity.java
>  7659a23 
>   
> ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionScheduler.java
>  9f12a94 
> 
> Diff: https://reviews.apache.org/r/52758/diff/
> 
> 
> Testing
> ---
> 
> Verified on live cluster.
> Waiting for unit test results.
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>



Re: Review Request 52758: When multiple requests are running, aborting any will incorrectly abort all requests instead the desired one

2016-10-12 Thread Alejandro Fernandez

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

(Updated Oct. 12, 2016, 9:04 p.m.)


Review request for Ambari, Dmytro Grinenko, Dmitro Lisnichenko, Jonathan 
Hurley, Nate Cole, and Sid Wagle.


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


Repository: ambari


Description
---

STR:

* Install Ambari 2.4.0.1 with any HDP stack (e.g., 2.5) and HDFS, YARN, ZK
* Run multiple commands in parallel (such as service checks)
* Attempt to abort any one of them

Instead of aborting just the desired one, it will abort all requests.


Diffs (updated)
-

  
ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java
 0e78cbc 
  
ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java
 c31ca7e 
  
ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
 e380ae4 
  ambari-server/src/main/java/org/apache/ambari/server/orm/dao/StageDAO.java 
8ef4a1b 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/StageEntity.java
 7659a23 
  
ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionScheduler.java
 9f12a94 

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


Testing
---

Verified on live cluster.
Waiting for unit test results.


Thanks,

Alejandro Fernandez



Re: Review Request 52758: When multiple requests are running, aborting any will incorrectly abort all requests instead the desired one

2016-10-12 Thread Jonathan Hurley


> On Oct. 11, 2016, 9:28 p.m., Sid Wagle wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/StageEntity.java,
> >  line 45
> > 
> >
> > Why is exists query appropiate here, instead of stageId IN ??

I don't think you can use an IN instead of EXISTS here simply because that 
would require the DB processor to query the entire stage table first, no?

I do think you should move the `roleCommand.requestId = stage.requestId` to the 
first part of the WHERE in case some databases don't optimize this query.


- Jonathan


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


On Oct. 11, 2016, 7:48 p.m., Alejandro Fernandez wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52758/
> ---
> 
> (Updated Oct. 11, 2016, 7:48 p.m.)
> 
> 
> Review request for Ambari, Dmytro Grinenko, Dmitro Lisnichenko, Jonathan 
> Hurley, Nate Cole, and Sid Wagle.
> 
> 
> Bugs: AMBARI-18576
> https://issues.apache.org/jira/browse/AMBARI-18576
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> STR:
> 
> * Install Ambari 2.4.0.1 with any HDP stack (e.g., 2.5) and HDFS, YARN, ZK
> * Run multiple commands in parallel (such as service checks)
> * Attempt to abort any one of them
> 
> Instead of aborting just the desired one, it will abort all requests.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java
>  0e78cbc 
>   
> ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java
>  c31ca7e 
>   
> ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
>  e380ae4 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/StageDAO.java 
> 8ef4a1b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/StageEntity.java
>  7659a23 
>   
> ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionScheduler.java
>  9f12a94 
> 
> Diff: https://reviews.apache.org/r/52758/diff/
> 
> 
> Testing
> ---
> 
> Verified on live cluster.
> Waiting for unit test results.
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>



Re: Review Request 52758: When multiple requests are running, aborting any will incorrectly abort all requests instead the desired one

2016-10-11 Thread Sid Wagle

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




ambari-server/src/main/java/org/apache/ambari/server/orm/entities/StageEntity.java
 (line 45)


Why is exists query appropiate here, instead of stageId IN ??


- Sid Wagle


On Oct. 11, 2016, 11:48 p.m., Alejandro Fernandez wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52758/
> ---
> 
> (Updated Oct. 11, 2016, 11:48 p.m.)
> 
> 
> Review request for Ambari, Dmytro Grinenko, Dmitro Lisnichenko, Jonathan 
> Hurley, Nate Cole, and Sid Wagle.
> 
> 
> Bugs: AMBARI-18576
> https://issues.apache.org/jira/browse/AMBARI-18576
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> STR:
> 
> * Install Ambari 2.4.0.1 with any HDP stack (e.g., 2.5) and HDFS, YARN, ZK
> * Run multiple commands in parallel (such as service checks)
> * Attempt to abort any one of them
> 
> Instead of aborting just the desired one, it will abort all requests.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java
>  0e78cbc 
>   
> ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java
>  c31ca7e 
>   
> ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
>  e380ae4 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/StageDAO.java 
> 8ef4a1b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/StageEntity.java
>  7659a23 
>   
> ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionScheduler.java
>  9f12a94 
> 
> Diff: https://reviews.apache.org/r/52758/diff/
> 
> 
> Testing
> ---
> 
> Verified on live cluster.
> Waiting for unit test results.
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>



Re: Review Request 52758: When multiple requests are running, aborting any will incorrectly abort all requests instead the desired one

2016-10-11 Thread Alejandro Fernandez

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




ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
 (line 1145)


This was the bug. When aborting a request by its ID, it used to also abort 
all stages in progress, even if they belonged to a different request.


- Alejandro Fernandez


On Oct. 11, 2016, 11:48 p.m., Alejandro Fernandez wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52758/
> ---
> 
> (Updated Oct. 11, 2016, 11:48 p.m.)
> 
> 
> Review request for Ambari, Dmytro Grinenko, Dmitro Lisnichenko, Jonathan 
> Hurley, Nate Cole, and Sid Wagle.
> 
> 
> Bugs: AMBARI-18576
> https://issues.apache.org/jira/browse/AMBARI-18576
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> STR:
> 
> * Install Ambari 2.4.0.1 with any HDP stack (e.g., 2.5) and HDFS, YARN, ZK
> * Run multiple commands in parallel (such as service checks)
> * Attempt to abort any one of them
> 
> Instead of aborting just the desired one, it will abort all requests.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java
>  0e78cbc 
>   
> ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java
>  c31ca7e 
>   
> ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
>  e380ae4 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/StageDAO.java 
> 8ef4a1b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/StageEntity.java
>  7659a23 
>   
> ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionScheduler.java
>  9f12a94 
> 
> Diff: https://reviews.apache.org/r/52758/diff/
> 
> 
> Testing
> ---
> 
> Verified on live cluster.
> Waiting for unit test results.
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>



Review Request 52758: When multiple requests are running, aborting any will incorrectly abort all requests instead the desired one

2016-10-11 Thread Alejandro Fernandez

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

Review request for Ambari, Dmytro Grinenko, Dmitro Lisnichenko, Jonathan 
Hurley, Nate Cole, and Sid Wagle.


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


Repository: ambari


Description
---

STR:

* Install Ambari 2.4.0.1 with any HDP stack (e.g., 2.5) and HDFS, YARN, ZK
* Run multiple commands in parallel (such as service checks)
* Attempt to abort any one of them

Instead of aborting just the desired one, it will abort all requests.


Diffs
-

  
ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java
 0e78cbc 
  
ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java
 c31ca7e 
  
ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
 e380ae4 
  ambari-server/src/main/java/org/apache/ambari/server/orm/dao/StageDAO.java 
8ef4a1b 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/StageEntity.java
 7659a23 
  
ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionScheduler.java
 9f12a94 

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


Testing
---

Verified on live cluster.
Waiting for unit test results.


Thanks,

Alejandro Fernandez