Re: Review Request 46358: Incorporate 'llap status check' to be used for (1). Before Hive Server Interactive start, and (2). status call.

2016-04-20 Thread Swapan Shridhar


> On April 20, 2016, 5:43 a.m., Sumit Mohanty wrote:
> > ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py,
> >  line 150
> > 
> >
> > it says llap here but the const below, LLAP_APP_NAME is llap0

Fixed.


> On April 20, 2016, 5:43 a.m., Sumit Mohanty wrote:
> > ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py,
> >  line 361
> > 
> >
> > Can desired_instances be 0 at this point?

Possible. Malformed JSON can result in this, have a 'state' but 
desired_instances be 0.


> On April 20, 2016, 5:43 a.m., Sumit Mohanty wrote:
> > ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-interactive-site.xml,
> >  line 360
> > 
> >
> > Is it @llap0 or llap0 - without the @

@ is there . Verfied with Sid Seth.


> On April 20, 2016, 5:43 a.m., Sumit Mohanty wrote:
> > ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py,
> >  line 512
> > 
> >
> > Is this property - num_retries_for_checking_llap_status optional? If 
> > not then lets just read it rather than using the "default" function

It's not optional. Alejandro's had suggested to default as well while usage.


> On April 20, 2016, 5:43 a.m., Sumit Mohanty wrote:
> > ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py,
> >  line 389
> > 
> >
> > Change it to something like - App {} did not come up after a wait of {} 
> > seconds.

Fixed.


> On April 20, 2016, 5:43 a.m., Sumit Mohanty wrote:
> > ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py,
> >  line 379
> > 
> >
> > Create a single string and use that to Log as well as Fail

Done.


> On April 20, 2016, 5:43 a.m., Sumit Mohanty wrote:
> > ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py,
> >  line 355
> > 
> >
> > This may be risky - all initialization of desired_instances is inside 
> > some if. If code gets refactored then its possible to miss initialization 
> > of the variable in some path. Initialize these at the same scope as all 
> > usage and then over-write values in if conditions as needed.

Done. Taken it to top.


> On April 20, 2016, 5:43 a.m., Sumit Mohanty wrote:
> > ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py,
> >  line 352
> > 
> >
> > Log the json output as well - will be easier to debug later.

Done.


- Swapan


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


On April 20, 2016, 5:25 a.m., Swapan Shridhar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46358/
> ---
> 
> (Updated April 20, 2016, 5:25 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-15959
> https://issues.apache.org/jira/browse/AMBARI-15959
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Incorporate 'llap status check' to be used for (1). Before Hive Server 
> Interactive start, and (2). status call.
> 
> - Further, changed hive.llap.daemon.service.hosts value to @llap.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
>  0a2105d 
>   
> ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
>  ca227b5 
>   
> ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-interactive-env.xml
>  88541bd 
>   
> ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-interactive-site.xml
>  0b3de15 
>   ambari-server/src/test/python/stacks/2.5/HIVE/appComplete.json PRE-CREATION 
>   ambari-server/src/test/python/stacks/2.5/HIVE/invalidApp.json PRE-CREATION 
>   ambari-server/src/test/python/stacks/2.5/HIVE/oneContainerDown.json 
> PRE-CREATION 
>   

Re: Review Request 46358: Incorporate 'llap status check' to be used for (1). Before Hive Server Interactive start, and (2). status call.

2016-04-19 Thread Swapan Shridhar

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

(Updated April 20, 2016, 1:29 a.m.)


Review request for Ambari, Alejandro Fernandez and Sumit Mohanty.


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


Repository: ambari


Description
---

Incorporate 'llap status check' to be used for (1). Before Hive Server 
Interactive start, and (2). status call.

- Further, changed hive.llap.daemon.service.hosts value to @llap.


Diffs (updated)
-

  
ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
 9d011a0 
  
ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
 9bee786 
  
ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-interactive-env.xml
 88541bd 
  
ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-interactive-site.xml
 0b3de15 
  ambari-server/src/test/python/stacks/2.5/HIVE/appComplete.json PRE-CREATION 
  ambari-server/src/test/python/stacks/2.5/HIVE/invalidApp.json PRE-CREATION 
  ambari-server/src/test/python/stacks/2.5/HIVE/oneContainerDown.json 
PRE-CREATION 
  ambari-server/src/test/python/stacks/2.5/HIVE/oneContainerDown1.json 
PRE-CREATION 
  ambari-server/src/test/python/stacks/2.5/HIVE/running.json PRE-CREATION 
  ambari-server/src/test/python/stacks/2.5/HIVE/starting.json PRE-CREATION 
  ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py ac4f6fc 
  ambari-server/src/test/python/stacks/2.5/configs/hsi_default.json f9c31dc 

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


Testing
---

- Python UT passes.


Thanks,

Swapan Shridhar



Re: Review Request 46358: Incorporate 'llap status check' to be used for (1). Before Hive Server Interactive start, and (2). status call.

2016-04-19 Thread Swapan Shridhar

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

(Updated April 20, 2016, 12:56 a.m.)


Review request for Ambari, Alejandro Fernandez and Sumit Mohanty.


Changes
---

- Changed wait time to number of counts while checking LLAP app status.
- Modified the 'check_llap_app_status' fn.


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


Repository: ambari


Description
---

Incorporate 'llap status check' to be used for (1). Before Hive Server 
Interactive start, and (2). status call.

- Further, changed hive.llap.daemon.service.hosts value to @llap.


Diffs (updated)
-

  
ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
 9d011a0 
  
ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
 9bee786 
  
ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-interactive-env.xml
 88541bd 
  
ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-interactive-site.xml
 0b3de15 
  ambari-server/src/test/python/stacks/2.5/HIVE/appComplete.json PRE-CREATION 
  ambari-server/src/test/python/stacks/2.5/HIVE/invalidApp.json PRE-CREATION 
  ambari-server/src/test/python/stacks/2.5/HIVE/oneContainerDown.json 
PRE-CREATION 
  ambari-server/src/test/python/stacks/2.5/HIVE/oneContainerDown1.json 
PRE-CREATION 
  ambari-server/src/test/python/stacks/2.5/HIVE/running.json PRE-CREATION 
  ambari-server/src/test/python/stacks/2.5/HIVE/starting.json PRE-CREATION 
  ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py ac4f6fc 
  ambari-server/src/test/python/stacks/2.5/configs/hsi_default.json f9c31dc 

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


Testing
---

- Python UT passes.


Thanks,

Swapan Shridhar



Re: Review Request 46358: Incorporate 'llap status check' to be used for (1). Before Hive Server Interactive start, and (2). status call.

2016-04-19 Thread Swapan Shridhar


> On April 19, 2016, 6:47 p.m., Alejandro Fernandez wrote:
> > ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py,
> >  line 306
> > 
> >
> > Prefix the function with "_" since scope of this function is very 
> > limited to LLAP.

Fixed.


> On April 19, 2016, 6:47 p.m., Alejandro Fernandez wrote:
> > ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py,
> >  line 312
> > 
> >
> > Should check that output is not None first.
> > Perhaps include in the code comments what the sample output looks like.

Now checking it in receiver.


> On April 19, 2016, 6:47 p.m., Alejandro Fernandez wrote:
> > ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py,
> >  line 389
> > 
> >
> > Since this is a while True loop, I prefer to use >=  here, and 
> > "if app_running_partial_wait_ctr < num_times_to_iterate" above

Code not more there.


- Swapan


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


On April 19, 2016, 10:41 p.m., Swapan Shridhar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46358/
> ---
> 
> (Updated April 19, 2016, 10:41 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-15959
> https://issues.apache.org/jira/browse/AMBARI-15959
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Incorporate 'llap status check' to be used for (1). Before Hive Server 
> Interactive start, and (2). status call.
> 
> - Further, changed hive.llap.daemon.service.hosts value to @llap.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
>  9d011a0 
>   
> ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
>  9bee786 
>   
> ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-interactive-env.xml
>  88541bd 
>   
> ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-interactive-site.xml
>  0b3de15 
>   ambari-server/src/test/python/stacks/2.5/HIVE/appComplete.json PRE-CREATION 
>   ambari-server/src/test/python/stacks/2.5/HIVE/invalidApp.json PRE-CREATION 
>   ambari-server/src/test/python/stacks/2.5/HIVE/oneContainerDown.json 
> PRE-CREATION 
>   ambari-server/src/test/python/stacks/2.5/HIVE/oneContainerDown1.json 
> PRE-CREATION 
>   ambari-server/src/test/python/stacks/2.5/HIVE/running.json PRE-CREATION 
>   ambari-server/src/test/python/stacks/2.5/HIVE/starting.json PRE-CREATION 
>   ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py 
> ac4f6fc 
>   ambari-server/src/test/python/stacks/2.5/configs/hsi_default.json f9c31dc 
> 
> Diff: https://reviews.apache.org/r/46358/diff/
> 
> 
> Testing
> ---
> 
> - Python UT passes.
> 
> 
> Thanks,
> 
> Swapan Shridhar
> 
>



Re: Review Request 46358: Incorporate 'llap status check' to be used for (1). Before Hive Server Interactive start, and (2). status call.

2016-04-18 Thread Swapan Shridhar

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

(Updated April 19, 2016, 1:42 a.m.)


Review request for Ambari, Alejandro Fernandez and Sumit Mohanty.


Changes
---

Uncommeted the code for calling "check_llap_app_status".
Updated UT.


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


Repository: ambari


Description
---

Incorporate 'llap status check' to be used for (1). Before Hive Server 
Interactive start, and (2). status call.

- Currently, code calls are commented as "hive --service llapstatus --name 
llap0" command is always showing app status as LAUNCHING. Following up with 
HIVE team.
- Further, changed hive.llap.daemon.service.hosts value to @llap0.


Diffs (updated)
-

  
ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
 9d011a0 
  
ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-interactive-site.xml
 0b3de15 
  ambari-server/src/test/python/stacks/2.5/HIVE/appComplete.json PRE-CREATION 
  ambari-server/src/test/python/stacks/2.5/HIVE/invalidApp.json PRE-CREATION 
  ambari-server/src/test/python/stacks/2.5/HIVE/oneContainerDown.json 
PRE-CREATION 
  ambari-server/src/test/python/stacks/2.5/HIVE/running.json PRE-CREATION 
  ambari-server/src/test/python/stacks/2.5/HIVE/starting.json PRE-CREATION 
  ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py ac4f6fc 

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


Testing
---

- UT added for this functionality tested.


Thanks,

Swapan Shridhar