Re: Review Request 47045: AMBARI-16281: Config files for hive interactive should be in both conf and conf.server folder

2016-05-06 Thread Sumit Mohanty

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


Ship it!




Ship It!

- Sumit Mohanty


On May 5, 2016, 10:38 p.m., Nahappan Somasundaram wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47045/
> ---
> 
> (Updated May 5, 2016, 10:38 p.m.)
> 
> 
> Review request for Ambari, Sumit Mohanty and Swapan Shridhar.
> 
> 
> Bugs: AMBARI-16281
> https://issues.apache.org/jira/browse/AMBARI-16281
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> AMBARI-16281: Config files for hive interactive should be in both conf and 
> conf.server folder
> 
> ** Description **
> 
> Several config files get created by hive interactive stack script. They all 
> should be in both **conf** and **conf/conf.server** folders. Files are:
>  hive-site
>  hive-env.sh
>  llap-daemon-log4j2.properties
>  llap-cli-log4j2.properties
>  hive-log4j2.properties
>  hive-exec-log4j2.properties
>  beeline-log4j2.properties
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
>  e8532dac9d9324b2f45e89464132b4f4435020c1 
>   ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py 
> 6a0d777488a7f5a3b9b75262e2a8afcdb52d8d83 
> 
> Diff: https://reviews.apache.org/r/47045/diff/
> 
> 
> Testing
> ---
> 
> ** 1. mvn clean install **
> 
> [INFO] 
> 
> [INFO] Reactor Summary:
> [INFO]
> [INFO] Ambari Main ... SUCCESS [8.741s]
> [INFO] Apache Ambari Project POM . SUCCESS [0.036s]
> [INFO] Ambari Web  SUCCESS [28.494s]
> [INFO] Ambari Views .. SUCCESS [1.454s]
> [INFO] Ambari Admin View . SUCCESS [11.478s]
> [INFO] ambari-metrics  SUCCESS [0.562s]
> [INFO] Ambari Metrics Common . SUCCESS [0.837s]
> [INFO] Ambari Metrics Hadoop Sink  SUCCESS [1.733s]
> [INFO] Ambari Metrics Flume Sink . SUCCESS [0.678s]
> [INFO] Ambari Metrics Kafka Sink . SUCCESS [0.772s]
> [INFO] Ambari Metrics Storm Sink . SUCCESS [1.772s]
> [INFO] Ambari Metrics Collector .. SUCCESS [8.661s]
> [INFO] Ambari Metrics Monitor  SUCCESS [2.578s]
> [INFO] Ambari Metrics Grafana  SUCCESS [1.117s]
> [INFO] Ambari Metrics Assembly ... SUCCESS [1:19.377s]
> [INFO] Ambari Server . SUCCESS [2:41.485s]
> [INFO] Ambari Functional Tests ... SUCCESS [2.679s]
> [INFO] Ambari Agent .. SUCCESS [24.607s]
> [INFO] Ambari Client . SUCCESS [0.042s]
> [INFO] Ambari Python Client .. SUCCESS [0.939s]
> [INFO] Ambari Groovy Client .. SUCCESS [2.056s]
> [INFO] Ambari Shell .. SUCCESS [0.043s]
> [INFO] Ambari Python Shell ... SUCCESS [0.691s]
> [INFO] Ambari Groovy Shell ... SUCCESS [1.449s]
> [INFO] ambari-logsearch .. SUCCESS [0.239s]
> [INFO] Ambari Logsearch Appender . SUCCESS [0.269s]
> [INFO] Ambari Logsearch Portal ... SUCCESS [6.370s]
> [INFO] Ambari Logsearch Log Feeder ... SUCCESS [2.022s]
> [INFO] Ambari Logsearch Solr Client .. SUCCESS [0.803s]
> [INFO] Ambari Logsearch Assembly . SUCCESS [0.088s]
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time: 5:52.759s
> [INFO] Finished at: Thu May 05 15:32:53 PDT 2016
> [INFO] Final Memory: 282M/1208M
> [INFO] 
> 
> 
> ** 2. mvn test -DskipSurefireTests **
> 
> --
> Ran 261 tests in 6.613s
> 
> OK
> --
> Total run:1014
> Total errors:0
> Total failures:0
> OK
> INFO: AMBARI_SERVER_LIB is not set, using default /usr/lib/ambari-server
> INFO: Return code from stack upgrade command, retcode = 0
> StackAdvisor implementation for stack HD

Re: Review Request 47085: Ambari agent changes to push llap metrics to AMS

2016-05-06 Thread Sumit Mohanty

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


Ship it!




Ship It!

- Sumit Mohanty


On May 7, 2016, 1:34 a.m., Jaimin Jetly wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47085/
> ---
> 
> (Updated May 7, 2016, 1:34 a.m.)
> 
> 
> Review request for Ambari, Aravindan Vijayan, Sumit Mohanty, and Sid Wagle.
> 
> 
> Bugs: AMBARI-16296
> https://issues.apache.org/jira/browse/AMBARI-16296
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> This patch makes start of HiveServer2 Interactive create 
> /usr/hdp/current/hive-server2-hive2/conf/conf.server/hadoop-metrics2.properties
>  (symlinked from /etc/hive2/conf/conf.server/) with following example content:
> 
> *.period=10
> *.sink.timeline.plugin.urls=file:///usr/lib/ambari-metrics-hadoop-sink/ambari-metrics-hadoop-sink.jar
> *.sink.timeline.class=org.apache.hadoop.metrics2.sink.timeline.HadoopTimelineMetricsSink
> *.sink.timeline.period=10
> *.sink.timeline.sendInterval=6
> 
> # HTTPS properties
> *.sink.timeline.truststore.path = /etc/security/clientKeys/all.jks
> *.sink.timeline.truststore.type = jks
> *.sink.timeline.truststore.password = bigdata
> 
> llapdaemon.sink.timeline.collector=http://metrics.collector.host.openstacklocal:6188
> 
> llapdaemon.sink.timeline_scheduler.class=org.apache.hadoop.metrics2.sink.timeline.HadoopTimelineMetricsSink
> llapdaemon.sink.timeline_scheduler.context=scheduler
> llapdaemon.sink.timeline_scheduler.collector=http://metrics.collector.host.openstacklocal:6188
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
>  e8532da 
>   
> ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/templates/hadoop-metrics2.properties.j2
>  PRE-CREATION 
>   ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py 
> 6a0d777 
> 
> Diff: https://reviews.apache.org/r/47085/diff/
> 
> 
> Testing
> ---
> 
> Verified that ambari-agent unit tests passes with the patch
> 
> 
> Thanks,
> 
> Jaimin Jetly
> 
>



Review Request 47086: Modifications in Hive Interactive configs should trigger only Hive Interactive restart.

2016-05-06 Thread Ajit Kumar

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

Review request for Ambari, Jayush Luniya, Sumit Mohanty, and Sid Wagle.


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


Repository: ambari


Description
---

Modifications in Hive Interactive  configs should trigger only Hive Interactive 
restart.


Diffs
-

  ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/metainfo.xml 
ff98f37fcc0d3bee574a1d373d7a28172c1e75be 

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


Testing
---

Manual testing


Thanks,

Ajit Kumar



Review Request 47085: Ambari agent changes to push llap metrics to AMS

2016-05-06 Thread Jaimin Jetly

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

Review request for Ambari, Aravindan Vijayan, Sumit Mohanty, and Sid Wagle.


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


Repository: ambari


Description
---

This patch makes start of HiveServer2 Interactive create 
/usr/hdp/current/hive-server2-hive2/conf/conf.server/hadoop-metrics2.properties 
(symlinked from /etc/hive2/conf/conf.server/) with following example content:

*.period=10
*.sink.timeline.plugin.urls=file:///usr/lib/ambari-metrics-hadoop-sink/ambari-metrics-hadoop-sink.jar
*.sink.timeline.class=org.apache.hadoop.metrics2.sink.timeline.HadoopTimelineMetricsSink
*.sink.timeline.period=10
*.sink.timeline.sendInterval=6

# HTTPS properties
*.sink.timeline.truststore.path = /etc/security/clientKeys/all.jks
*.sink.timeline.truststore.type = jks
*.sink.timeline.truststore.password = bigdata

llapdaemon.sink.timeline.collector=http://metrics.collector.host.openstacklocal:6188

llapdaemon.sink.timeline_scheduler.class=org.apache.hadoop.metrics2.sink.timeline.HadoopTimelineMetricsSink
llapdaemon.sink.timeline_scheduler.context=scheduler
llapdaemon.sink.timeline_scheduler.collector=http://metrics.collector.host.openstacklocal:6188


Diffs
-

  
ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
 e8532da 
  
ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/templates/hadoop-metrics2.properties.j2
 PRE-CREATION 
  ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py 6a0d777 

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


Testing
---

Verified that ambari-agent unit tests passes with the patch


Thanks,

Jaimin Jetly



Re: Review Request 47079: Disabling and enabling back HiveServer2 Interactive does not show Assign Master popup

2016-05-06 Thread Zhe (Joe) Wang

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


Ship it!




Ship It!

- Zhe (Joe) Wang


On May 6, 2016, 10:34 p.m., Jaimin Jetly wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47079/
> ---
> 
> (Updated May 6, 2016, 10:34 p.m.)
> 
> 
> Review request for Ambari, Zhe (Joe) Wang, Richard Zang, and Srimanth Gunturi.
> 
> 
> Bugs: AMBARI-16294
> https://issues.apache.org/jira/browse/AMBARI-16294
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> *STR:*
> # Deploy a cluster with Hive service and Interactive query enabled
> # Post deployment navigate to Hive service config page and Disable 
> interactive query
> # Wait for all operations to complete
> # Enable it again
> 
> *Expected Result:* UI should show "Assign Master" popup for HSI selection
> *Actual Result:* UI does not show assign master popup and takes the previous 
> selection of the HSI
> 
> *Reason of the bug:* App.HostComponent model is not updated on the service 
> summary/config pages. So although HSI is deleted on disabling interactive 
> query on server, UI does not know about this via  App.HostComponent model
> 
> 
> Diffs
> -
> 
>   ambari-web/app/mixins/main/service/configs/component_actions_by_configs.js 
> 93cac29 
> 
> Diff: https://reviews.apache.org/r/47079/diff/
> 
> 
> Testing
> ---
> 
> Manually verified that patch resolves the issue 
> Verified that ambari-web unit tests passes with the patch:
> 27718 tests complete (36 seconds)
> 154 tests pending
> 
> 
> Thanks,
> 
> Jaimin Jetly
> 
>



Re: Review Request 47079: Disabling and enabling back HiveServer2 Interactive does not show Assign Master popup

2016-05-06 Thread Richard Zang

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


Ship it!




Ship It!

- Richard Zang


On May 6, 2016, 10:34 p.m., Jaimin Jetly wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47079/
> ---
> 
> (Updated May 6, 2016, 10:34 p.m.)
> 
> 
> Review request for Ambari, Zhe (Joe) Wang, Richard Zang, and Srimanth Gunturi.
> 
> 
> Bugs: AMBARI-16294
> https://issues.apache.org/jira/browse/AMBARI-16294
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> *STR:*
> # Deploy a cluster with Hive service and Interactive query enabled
> # Post deployment navigate to Hive service config page and Disable 
> interactive query
> # Wait for all operations to complete
> # Enable it again
> 
> *Expected Result:* UI should show "Assign Master" popup for HSI selection
> *Actual Result:* UI does not show assign master popup and takes the previous 
> selection of the HSI
> 
> *Reason of the bug:* App.HostComponent model is not updated on the service 
> summary/config pages. So although HSI is deleted on disabling interactive 
> query on server, UI does not know about this via  App.HostComponent model
> 
> 
> Diffs
> -
> 
>   ambari-web/app/mixins/main/service/configs/component_actions_by_configs.js 
> 93cac29 
> 
> Diff: https://reviews.apache.org/r/47079/diff/
> 
> 
> Testing
> ---
> 
> Manually verified that patch resolves the issue 
> Verified that ambari-web unit tests passes with the patch:
> 27718 tests complete (36 seconds)
> 154 tests pending
> 
> 
> Thanks,
> 
> Jaimin Jetly
> 
>



Review Request 47079: Disabling and enabling back HiveServer2 Interactive does not show Assign Master popup

2016-05-06 Thread Jaimin Jetly

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

Review request for Ambari, Zhe (Joe) Wang, Richard Zang, and Srimanth Gunturi.


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


Repository: ambari


Description
---

*STR:*
# Deploy a cluster with Hive service and Interactive query enabled
# Post deployment navigate to Hive service config page and Disable interactive 
query
# Wait for all operations to complete
# Enable it again

*Expected Result:* UI should show "Assign Master" popup for HSI selection
*Actual Result:* UI does not show assign master popup and takes the previous 
selection of the HSI

*Reason of the bug:* App.HostComponent model is not updated on the service 
summary/config pages. So although HSI is deleted on disabling interactive query 
on server, UI does not know about this via  App.HostComponent model


Diffs
-

  ambari-web/app/mixins/main/service/configs/component_actions_by_configs.js 
93cac29 

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


Testing
---

Manually verified that patch resolves the issue 
Verified that ambari-web unit tests passes with the patch:
27718 tests complete (36 seconds)
154 tests pending


Thanks,

Jaimin Jetly



Re: Review Request 47023: Views: Simplify View Configuration for Remote Ambari Managed Cluster. Ambari Server Side changes

2016-05-06 Thread Jonathan Hurley

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




ambari-server/pom.xml (lines 1371 - 1375)


Why do we need yet another library for this? Can't the 2 that we already 
have suffice?



ambari-server/pom.xml (lines 1376 - 1380)


Collections 3.2.1 is used by Apache DS and is on our path already. Is 
Apache DS compatible with this version?



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RemoteClusterResourceProvider.java
 (lines 167 - 173)


Why not just search directly by name?



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RemoteClusterResourceProvider.java
 (line 187)


This seems display-specific. We should probably let the display handle how 
it wants to format the list.



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RemoteClusterResourceProvider.java
 (line 221)


This should not be transactional - that can be handled in the DAO.



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RemoteClusterResourceProvider.java
 (line 249)


This should not be transactional - should be handled in the DAO.



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RemoteClusterResourceProvider.java
 (lines 258 - 260)


The ResourceProvider shouldn't have knowledge of how things are associated 
on the backend; it should simply update the resource. The update is what should 
do the rest of the work, like refreshing the registry



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RemoteClusterResourceProvider.java
 (line 295)


StringUtils.isBlank() for password to cover spaces and empty strings.



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RemoteClusterResourceProvider.java
 (lines 340 - 341)


The ResourceProvider shouldn't be responsible for both deletes.



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RemoteClusterResourceProvider.java
 (line 347)


JavaDoc.



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RemoteClusterResourceProvider.java
 (lines 360 - 365)


This is a get method but it appears to also be creating services.



ambari-server/src/main/java/org/apache/ambari/server/orm/dao/RemoteClusterServiceDAO.java
 (line 72)


No need for Optional here.



ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RemoteAmbariClusterEntity.java
 (line 59)


Methods in this class need some JavaDoc.



ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RemoteAmbariClusterEntity.java
 (lines 83 - 86)


Is this really a M2M relationship? RemoteClusterServiceEntity are shared 
between clusters?



ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RemoteAmbariClusterServiceEntity.java
 (line 33)


JavaDoc the methods.



ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntity.java
 (line 733)


Use the cluster type enum here?



ambari-server/src/main/java/org/apache/ambari/server/view/LocalAmbariClusterStreamProvider.java
 (line 41)


How is this different from a ViewAmbariStreamProvider aside from the fact 
it's scoped to /api/v1/clusters - seems like you could just use 
ViewAmbariStreamProvider



ambari-server/src/main/java/org/apache/ambari/server/view/RemoteAmbariCluster.java
 (line 103)


Could this be null?



ambari-server/src/main/java/org/apache/ambari/server/view/RemoteAmbariCluster.java
 (line 111)


JavaDoc.



ambari-server/src/main/java/org/apache/ambari/server/view/RemoteAmbariCluster.java
 (lines 112 - 115)


Lots of faith here that nothing is null...



ambari-server/src/main/java/org/apache/ambari/server/view/RemoteAmbariCluster.java
 (line 120)


Re: Review Request 47026: Views: Simplify View Configuration for Remote Ambari Managed Cluster. Ambari Database changes

2016-05-06 Thread Gaurav Nagar


> On May 6, 2016, 2:12 p.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java,
> >  line 198
> > 
> >
> > I don't think we need the word "ambari" in an Ambari database table.
> 
> Gaurav Nagar wrote:
> remoteambaricluster indicates remote cluster managed by ambari.
> 
> Jonathan Hurley wrote:
> I think that's implied though - what other kinds of remote clusters are 
> there?

Currently we have only ambari managed. But in future we can have remote 
clusters that are not managed by ambari also.


- Gaurav


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


On May 5, 2016, 4:29 p.m., Gaurav Nagar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47026/
> ---
> 
> (Updated May 5, 2016, 4:29 p.m.)
> 
> 
> Review request for Ambari, DIPAYAN BHOWMICK, Jonathan Hurley, Nitiraj 
> Rathore, Pallav Kulshreshtha, Rohit Choudhary, and Ashwin Rajeev.
> 
> 
> Bugs: AMBARI-16274
> https://issues.apache.org/jira/browse/AMBARI-16274
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Added tables for Remote Cluster to create scripts.
> Added table changes to UpgradeCatalog240
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
>  f85a4c7 
>   ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql f5336bc 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql fca3be3 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql ce0bd84 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 7fb8c31 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql 
> 0f3a2c2 
>   ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql b89389c 
>   ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 1107c4d 
>   
> ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog240Test.java
>  7c85ba7 
> 
> Diff: https://reviews.apache.org/r/47026/diff/
> 
> 
> Testing
> ---
> 
> Manual Testing.
> 
> 
> Thanks,
> 
> Gaurav Nagar
> 
>



Re: Review Request 47027: Views: Simplify View Configuration for Remote Ambari Managed Cluster. Ambari Views changes

2016-05-06 Thread Jonathan Hurley


> On May 6, 2016, 10:38 a.m., Jonathan Hurley wrote:
> > contrib/views/capacity-scheduler/src/main/java/org/apache/ambari/view/capacityscheduler/ConfigurationService.java,
> >  line 121
> > 
> >
> > Why is this commented out?
> 
> Gaurav Nagar wrote:
> No need to validate as Remote Ambari Cluster properties is now managed by 
> view framework.

Then it should be removed instead of commented out.


> On May 6, 2016, 10:38 a.m., Jonathan Hurley wrote:
> > contrib/views/capacity-scheduler/src/main/resources/view.xml, lines 27-50
> > 
> >
> > How is this going to impact existing deployments of this view? Removing 
> > these has to have some consequence in the UI?
> 
> Gaurav Nagar wrote:
> The existing capicity-scheduler view which is configured as local cluster 
> will work fine. But the instance with custom configuration will not work. 
> We had some ideas around this, and filed a jira for tracking this. 
> https://issues.apache.org/jira/browse/AMBARI-16289
> For admin ui. As the view depends on ambari managed cluster, only Local 
> cluster and Remote cluster section is shown. Custom Configuration section is 
> not shown for the view.

OK, as long as there is a Jira tracking this.


> On May 6, 2016, 10:38 a.m., Jonathan Hurley wrote:
> > contrib/views/capacity-scheduler/src/main/java/org/apache/ambari/view/capacityscheduler/ConfigurationService.java,
> >  lines 319-344
> > 
> >
> > What's going on with this method? Why is validation no longer required?
> 
> Gaurav Nagar wrote:
> As Remote Ambari Cluster implementation is now provided by Ambari View 
> Framework,these properties are no longer required for the view. So no need to 
> validate them.
> As these are validated when creating Remote Cluster

That's fine - but it should be removed then.


- Jonathan


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


On May 5, 2016, 12:35 p.m., Gaurav Nagar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47027/
> ---
> 
> (Updated May 5, 2016, 12:35 p.m.)
> 
> 
> Review request for Ambari, DIPAYAN BHOWMICK, Jonathan Hurley, Nitiraj 
> Rathore, Pallav Kulshreshtha, Rohit Choudhary, and Ashwin Rajeev.
> 
> 
> Bugs: AMBARI-16274
> https://issues.apache.org/jira/browse/AMBARI-16274
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Added AmbariClusterStreamProvider interface for connecting to Ambari Cluster 
> (Can be Remote or Local) that is attached to view instance.
> Added Cluster Type Enum (LOCAL_AMBARI, REMOTE_AMBARI, NONE) for 
> differentiating cluster type attached to view instance.
> 
> 
> Diffs
> -
> 
>   
> ambari-views/src/main/java/org/apache/ambari/view/AmbariClusterStreamProvider.java
>  PRE-CREATION 
>   ambari-views/src/main/java/org/apache/ambari/view/AmbariHttpException.java 
> PRE-CREATION 
>   ambari-views/src/main/java/org/apache/ambari/view/AmbariStreamProvider.java 
> ce91676 
>   ambari-views/src/main/java/org/apache/ambari/view/ClusterType.java 
> PRE-CREATION 
>   ambari-views/src/main/java/org/apache/ambari/view/ViewContext.java 7b7b025 
>   
> ambari-views/src/main/java/org/apache/ambari/view/ViewInstanceDefinition.java 
> 0c3d3ce 
>   ambari-views/src/main/resources/view.xsd 04902e9 
>   
> contrib/views/capacity-scheduler/src/main/java/org/apache/ambari/view/capacityscheduler/ConfigurationService.java
>  7f1d489 
>   contrib/views/capacity-scheduler/src/main/resources/view.xml 6dc3ffa 
>   
> contrib/views/capacity-scheduler/src/test/java/org/apache/ambari/view/capacityscheduler/ConfigurationServiceTest.java
>  62fa21e 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/UploadService.java
>  83eae9b 
>   
> contrib/views/slider/src/main/java/org/apache/ambari/view/slider/rest/client/BaseHttpClient.java
>  b4fccf9 
>   
> contrib/views/utils/src/main/java/org/apache/ambari/view/utils/ambari/AmbariApi.java
>  6b88b6f 
>   
> contrib/views/utils/src/main/java/org/apache/ambari/view/utils/ambari/Services.java
>  a8ef43f 
>   
> contrib/views/utils/src/main/java/org/apache/ambari/view/utils/ambari/URLStreamProviderBasicAuth.java
>  c9f735a 
>   
> contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/AuthConfigurationBuilder.java
>  c8ca6cd 
>   
> contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/ConfigurationBuilder.java
>  4518ac6 
>   
> contrib/views/utils/src/test/java/org/apache/ambari/view/utils

Re: Review Request 47026: Views: Simplify View Configuration for Remote Ambari Managed Cluster. Ambari Database changes

2016-05-06 Thread Jonathan Hurley


> On May 6, 2016, 10:12 a.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java,
> >  line 198
> > 
> >
> > I don't think we need the word "ambari" in an Ambari database table.
> 
> Gaurav Nagar wrote:
> remoteambaricluster indicates remote cluster managed by ambari.

I think that's implied though - what other kinds of remote clusters are there?


- Jonathan


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


On May 5, 2016, 12:29 p.m., Gaurav Nagar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47026/
> ---
> 
> (Updated May 5, 2016, 12:29 p.m.)
> 
> 
> Review request for Ambari, DIPAYAN BHOWMICK, Jonathan Hurley, Nitiraj 
> Rathore, Pallav Kulshreshtha, Rohit Choudhary, and Ashwin Rajeev.
> 
> 
> Bugs: AMBARI-16274
> https://issues.apache.org/jira/browse/AMBARI-16274
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Added tables for Remote Cluster to create scripts.
> Added table changes to UpgradeCatalog240
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
>  f85a4c7 
>   ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql f5336bc 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql fca3be3 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql ce0bd84 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 7fb8c31 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql 
> 0f3a2c2 
>   ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql b89389c 
>   ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 1107c4d 
>   
> ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog240Test.java
>  7c85ba7 
> 
> Diff: https://reviews.apache.org/r/47026/diff/
> 
> 
> Testing
> ---
> 
> Manual Testing.
> 
> 
> Thanks,
> 
> Gaurav Nagar
> 
>



Re: Review Request 47047: AMBARI-16282 Refactor the VDF installer code to handle multi-stack and multi-version scenario

2016-05-06 Thread Jaimin Jetly

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


Ship it!




Ship It!

- Jaimin Jetly


On May 5, 2016, 11:34 p.m., Zhe (Joe) Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47047/
> ---
> 
> (Updated May 5, 2016, 11:34 p.m.)
> 
> 
> Review request for Ambari, Jaimin Jetly, Nate Cole, Richard Zang, Xi Wang, 
> and Yusaku Sako.
> 
> 
> Bugs: AMBARI-16282
> https://issues.apache.org/jira/browse/AMBARI-16282
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Current code assumes that there is only one stack and one public version 
> situation. We need to handle multi-stack and multi-version scenario, while 
> some stacks have no public version.
> 
> 
> Diffs
> -
> 
>   ambari-web/app/controllers/installer.js 369e319 
>   ambari-web/app/mappers/stack_mapper.js a430ea5 
>   ambari-web/app/views/wizard/step1_view.js 96dcf39 
>   ambari-web/test/mappers/stack_mapper_test.js 63f7516 
> 
> Diff: https://reviews.apache.org/r/47047/diff/
> 
> 
> Testing
> ---
> 
> Modified unit test.
> Local ambari-web test passed.
> 27718 tests complete (23 seconds)
> 154 tests pending
> Manual testing done.
> 
> 
> Thanks,
> 
> Zhe (Joe) Wang
> 
>



Re: Review Request 47027: Views: Simplify View Configuration for Remote Ambari Managed Cluster. Ambari Views changes

2016-05-06 Thread Gaurav Nagar


> On May 6, 2016, 2:38 p.m., Jonathan Hurley wrote:
> > ambari-views/src/main/java/org/apache/ambari/view/ClusterType.java, line 27
> > 
> >
> > Doesn't have to be one or the other - NONE doesn't seem to make sense 
> > here.

View Instance can be created with Local Cluster, Remote Cluster or custom 
configuration (in case of setting endpoints manually).
None is used if the View Instance is not attached to cluster (custom option is 
used).


> On May 6, 2016, 2:38 p.m., Jonathan Hurley wrote:
> > contrib/views/capacity-scheduler/src/main/java/org/apache/ambari/view/capacityscheduler/ConfigurationService.java,
> >  lines 319-344
> > 
> >
> > What's going on with this method? Why is validation no longer required?

As Remote Ambari Cluster implementation is now provided by Ambari View 
Framework,these properties are no longer required for the view. So no need to 
validate them.
As these are validated when creating Remote Cluster


> On May 6, 2016, 2:38 p.m., Jonathan Hurley wrote:
> > contrib/views/capacity-scheduler/src/main/java/org/apache/ambari/view/capacityscheduler/ConfigurationService.java,
> >  line 121
> > 
> >
> > Why is this commented out?

No need to validate as Remote Ambari Cluster properties is now managed by view 
framework.


> On May 6, 2016, 2:38 p.m., Jonathan Hurley wrote:
> > contrib/views/capacity-scheduler/src/main/resources/view.xml, lines 27-50
> > 
> >
> > How is this going to impact existing deployments of this view? Removing 
> > these has to have some consequence in the UI?

The existing capicity-scheduler view which is configured as local cluster will 
work fine. But the instance with custom configuration will not work. 
We had some ideas around this, and filed a jira for tracking this. 
https://issues.apache.org/jira/browse/AMBARI-16289
For admin ui. As the view depends on ambari managed cluster, only Local cluster 
and Remote cluster section is shown. Custom Configuration section is not shown 
for the view.


> On May 6, 2016, 2:38 p.m., Jonathan Hurley wrote:
> > ambari-views/src/main/java/org/apache/ambari/view/AmbariClusterStreamProvider.java,
> >  line 28
> > 
> >
> > How is this different from AmbariStreamProvider which does not use an 
> > existing session? Isn't that the same thing as a remote Ambari cluster?

AmbariClusterStreamProvider provides readFromAmbari and readFromCluster methods 
to views for connecting to ambari cluster (remote or local).
As view don't have much information about attached cluster (only custer_handle 
which in remote case is just a name, not actually remote cluster name), url 
formation for reading from cluster from view is not possible. So need to expose 
above two methods.
Also, view while requesting to ambari doesnot need to give useSession variable 
which is not required in case of remote cluster.


- Gaurav


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


On May 5, 2016, 4:35 p.m., Gaurav Nagar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47027/
> ---
> 
> (Updated May 5, 2016, 4:35 p.m.)
> 
> 
> Review request for Ambari, DIPAYAN BHOWMICK, Jonathan Hurley, Nitiraj 
> Rathore, Pallav Kulshreshtha, Rohit Choudhary, and Ashwin Rajeev.
> 
> 
> Bugs: AMBARI-16274
> https://issues.apache.org/jira/browse/AMBARI-16274
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Added AmbariClusterStreamProvider interface for connecting to Ambari Cluster 
> (Can be Remote or Local) that is attached to view instance.
> Added Cluster Type Enum (LOCAL_AMBARI, REMOTE_AMBARI, NONE) for 
> differentiating cluster type attached to view instance.
> 
> 
> Diffs
> -
> 
>   
> ambari-views/src/main/java/org/apache/ambari/view/AmbariClusterStreamProvider.java
>  PRE-CREATION 
>   ambari-views/src/main/java/org/apache/ambari/view/AmbariHttpException.java 
> PRE-CREATION 
>   ambari-views/src/main/java/org/apache/ambari/view/AmbariStreamProvider.java 
> ce91676 
>   ambari-views/src/main/java/org/apache/ambari/view/ClusterType.java 
> PRE-CREATION 
>   ambari-views/src/main/java/org/apache/ambari/view/ViewContext.java 7b7b025 
>   
> ambari-views/src/main/java/org/apache/ambari/view/ViewInstanceDefinition.java 
> 0c3d3ce 
>   ambari-views/src/main/resources/view.xsd 04902e9 
>   
> contrib/views/capacity-s

Re: Review Request 47067: Separate number of shards and replication factor configurations for audit logs and service logs (logseach solr)

2016-05-06 Thread Robert Nettleton

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


Ship it!




Ship It!

- Robert Nettleton


On May 6, 2016, 2:59 p.m., Oliver Szabo wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47067/
> ---
> 
> (Updated May 6, 2016, 2:59 p.m.)
> 
> 
> Review request for Ambari, Miklos Gergely, Robert Nettleton, and Sumit 
> Mohanty.
> 
> 
> Bugs: AMBARI-16288
> https://issues.apache.org/jira/browse/AMBARI-16288
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Old properties:
> 
> logsearch.collection.numshards
> logsearch.collection.replication.factor
> 
> New Properties:
> 
> logsearch.collection.service.logs.numshards
> logsearch.collection.service.logs.replication.factor
> logsearch.collection.audit.logs.numshards
> logsearch.collection.audit.logs.replication.factor
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-properties.xml
>  172ed95 
>   
> ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py
>  97ad191 
>   
> ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/templates/logsearch.properties.j2
>  ac731ce 
>   
> ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/templates/output.config.json.j2
>  09858dc 
>   
> ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/themes/theme.json
>  248bbd3 
>   ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py 
> e44a9d7 
>   ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py 
> 95be86b 
>   ambari-server/src/test/python/stacks/2.4/configs/default.json 8909431 
>   ambari-web/app/data/HDP2/site_properties.js 45c54a0 
> 
> Diff: https://reviews.apache.org/r/47067/diff/
> 
> 
> Testing
> ---
> 
> ambari server python tests:
> 
> Total run:1014
> Total errors:0
> Total failures:0
> 
> ambari web tests:
> 27646 tests complete (26 seconds)
> 154 tests pending
> 
> FT: deployed 5 node cluster, shards/replicas have created correctly
> 
> 
> Thanks,
> 
> Oliver Szabo
> 
>



Re: Review Request 47063: MapReduce service check failed on most of the Kerberos tests

2016-05-06 Thread Dmytro Sen

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

(Updated Май 6, 2016, 4 п.п.)


Review request for Ambari, Robert Levas, Sumit Mohanty, and Vitalyi Brodetskyi.


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


Repository: ambari


Description
---

1. Install ambari cluster with few services 
2. enable kerberos
3. run service check on services
Expected: all service checks should pass successfully
Actual: MR service check fails.


Diffs (updated)
-

  
ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/configuration/yarn-site.xml
 ee12ba3 
  ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py 
d6bc713 
  ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py 
cf0990d 
  ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py c48b2c7 

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


Testing
---

Unit tests passed


Thanks,

Dmytro Sen



Re: Review Request 47026: Views: Simplify View Configuration for Remote Ambari Managed Cluster. Ambari Database changes

2016-05-06 Thread Gaurav Nagar


> On May 6, 2016, 2:12 p.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java,
> >  line 198
> > 
> >
> > I don't think we need the word "ambari" in an Ambari database table.

remoteambaricluster indicates remote cluster managed by ambari.


- Gaurav


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


On May 5, 2016, 4:29 p.m., Gaurav Nagar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47026/
> ---
> 
> (Updated May 5, 2016, 4:29 p.m.)
> 
> 
> Review request for Ambari, DIPAYAN BHOWMICK, Jonathan Hurley, Nitiraj 
> Rathore, Pallav Kulshreshtha, Rohit Choudhary, and Ashwin Rajeev.
> 
> 
> Bugs: AMBARI-16274
> https://issues.apache.org/jira/browse/AMBARI-16274
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Added tables for Remote Cluster to create scripts.
> Added table changes to UpgradeCatalog240
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
>  f85a4c7 
>   ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql f5336bc 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql fca3be3 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql ce0bd84 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 7fb8c31 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql 
> 0f3a2c2 
>   ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql b89389c 
>   ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 1107c4d 
>   
> ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog240Test.java
>  7c85ba7 
> 
> Diff: https://reviews.apache.org/r/47026/diff/
> 
> 
> Testing
> ---
> 
> Manual Testing.
> 
> 
> Thanks,
> 
> Gaurav Nagar
> 
>



Re: Review Request 47063: MapReduce service check failed on most of the Kerberos tests

2016-05-06 Thread Dmytro Sen

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

(Updated Май 6, 2016, 3:16 п.п.)


Review request for Ambari, Robert Levas, Sumit Mohanty, and Vitalyi Brodetskyi.


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


Repository: ambari


Description
---

1. Install ambari cluster with few services 
2. enable kerberos
3. run service check on services
Expected: all service checks should pass successfully
Actual: MR service check fails.


Diffs (updated)
-

  
ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/configuration/yarn-site.xml
 ee12ba3 
  ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py 
d6bc713 
  ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py 
cf0990d 
  ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py c48b2c7 

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


Testing
---

Unit tests passed


Thanks,

Dmytro Sen



Re: Review Request 47063: MapReduce service check failed on most of the Kerberos tests

2016-05-06 Thread Dmytro Sen

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

(Updated Май 6, 2016, 3:13 п.п.)


Review request for Ambari, Robert Levas, Sumit Mohanty, and Vitalyi Brodetskyi.


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


Repository: ambari


Description
---

1. Install ambari cluster with few services 
2. enable kerberos
3. run service check on services
Expected: all service checks should pass successfully
Actual: MR service check fails.


Diffs (updated)
-

  
ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/configuration/yarn-env.xml
 2184c0e 
  ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py 
d6bc713 
  ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py 
cf0990d 
  ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py c48b2c7 

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


Testing
---

Unit tests passed


Thanks,

Dmytro Sen



Review Request 47067: Separate number of shards and replication factor configurations for audit logs and service logs (logseach solr)

2016-05-06 Thread Oliver Szabo

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

Review request for Ambari, Miklos Gergely, Robert Nettleton, and Sumit Mohanty.


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


Repository: ambari


Description
---

Old properties:

logsearch.collection.numshards
logsearch.collection.replication.factor

New Properties:

logsearch.collection.service.logs.numshards
logsearch.collection.service.logs.replication.factor
logsearch.collection.audit.logs.numshards
logsearch.collection.audit.logs.replication.factor


Diffs
-

  
ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-properties.xml
 172ed95 
  
ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py
 97ad191 
  
ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/templates/logsearch.properties.j2
 ac731ce 
  
ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/templates/output.config.json.j2
 09858dc 
  
ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/themes/theme.json
 248bbd3 
  ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py 
e44a9d7 
  ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py 95be86b 
  ambari-server/src/test/python/stacks/2.4/configs/default.json 8909431 
  ambari-web/app/data/HDP2/site_properties.js 45c54a0 

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


Testing
---

ambari server python tests:

Total run:1014
Total errors:0
Total failures:0

ambari web tests:
27646 tests complete (26 seconds)
154 tests pending

FT: deployed 5 node cluster, shards/replicas have created correctly


Thanks,

Oliver Szabo



Re: Review Request 47047: AMBARI-16282 Refactor the VDF installer code to handle multi-stack and multi-version scenario

2016-05-06 Thread Nate Cole

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


Ship it!




Ship It!

- Nate Cole


On May 5, 2016, 7:34 p.m., Zhe (Joe) Wang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47047/
> ---
> 
> (Updated May 5, 2016, 7:34 p.m.)
> 
> 
> Review request for Ambari, Jaimin Jetly, Nate Cole, Richard Zang, Xi Wang, 
> and Yusaku Sako.
> 
> 
> Bugs: AMBARI-16282
> https://issues.apache.org/jira/browse/AMBARI-16282
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Current code assumes that there is only one stack and one public version 
> situation. We need to handle multi-stack and multi-version scenario, while 
> some stacks have no public version.
> 
> 
> Diffs
> -
> 
>   ambari-web/app/controllers/installer.js 369e319 
>   ambari-web/app/mappers/stack_mapper.js a430ea5 
>   ambari-web/app/views/wizard/step1_view.js 96dcf39 
>   ambari-web/test/mappers/stack_mapper_test.js 63f7516 
> 
> Diff: https://reviews.apache.org/r/47047/diff/
> 
> 
> Testing
> ---
> 
> Modified unit test.
> Local ambari-web test passed.
> 27718 tests complete (23 seconds)
> 154 tests pending
> Manual testing done.
> 
> 
> Thanks,
> 
> Zhe (Joe) Wang
> 
>



Re: Review Request 47010: Allow roles to be treated like principals in Ambari DB

2016-05-06 Thread Nate Cole

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


Ship it!




Ship It!

- Nate Cole


On May 6, 2016, 7:28 a.m., Robert Levas wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47010/
> ---
> 
> (Updated May 6, 2016, 7:28 a.m.)
> 
> 
> Review request for Ambari, DIPAYAN BHOWMICK, Jonathan Hurley, Nate Cole, and 
> Sebastian Toader.
> 
> 
> Bugs: AMBARI-16246
> https://issues.apache.org/jira/browse/AMBARI-16246
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> To support assigning privileges to users based on their roles provide support 
> in the Ambari database to allow a `role` to be referenced as a `principal` 
> similar in the way a `user` and a `group` a referenced as a `principal`.
> 
> A use-case to support the need for this is to assign access to a view to all 
> users with some specific role. Currently we can assign access to a view to a 
> specific user or group by assigning that user or group the `VIEW.USER` role 
> applied to the specific view.  To assign access a view to users who have a 
> specific role, a `role` will need to behave like a `principal`.
> 
> The following changes need to be made to the database:
> 
> * Add `principal_id` column to the `adminpermission` table
> * Create a `principaltype` record where the `principal_type_name` is '`ROLE`'
> * Add records to the `adminprincpal` table to represent each role in 
> `adminpermission`
> * Update `adminpermission.principal_id` to match the relevant records from 
> `adminprincipal`
> 
> After this is complete, `adminprivilege` records can be created using roles 
> as principals. 
> 
> NOTE: special handling will need to be done in the authorization logic to 
> dereference the role associations with the authenticated user, similar in the 
> way this is done for groups.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/dao/PermissionDAO.java
>  5d1a04a 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PermissionEntity.java
>  43fd71b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrincipalEntity.java
>  25d8d14 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrincipalTypeEntity.java
>  b94f1ff 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
>  17f9fe1 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
>  f85a4c7 
>   ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql f5336bc 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql fca3be3 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql ce0bd84 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 7fb8c31 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql 
> 0f3a2c2 
>   ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql b89389c 
>   ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 1107c4d 
>   
> ambari-server/src/test/java/org/apache/ambari/server/security/authorization/TestUsers.java
>  ad8cce1 
>   
> ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog240Test.java
>  7c85ba7 
> 
> Diff: https://reviews.apache.org/r/47010/diff/
> 
> 
> Testing
> ---
> 
> Manually tested newly created instance and upgrading from 2.2.1.  Focused on 
> postgresql and mysql.
> 
> # Local test results:
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time: 1:16:03.148s
> [INFO] Finished at: Wed May 04 18:43:11 EDT 2016
> [INFO] Final Memory: 60M/1768M
> [INFO] 
> 
> 
> # Jenkins test results: PENDING
> 
> 
> Thanks,
> 
> Robert Levas
> 
>



Re: Review Request 47018: [preview] Ambari Upgrade shouldn't automatically add stack configs

2016-05-06 Thread Nate Cole


> On May 5, 2016, 1:20 p.m., Nate Cole wrote:
> > It feels to me like we should not be touching the stack for this, but 
> > rather use the config-upgrade.xml or the upgrade pack to hold this 
> > information.  Then you can have ADD/DELETE/SKIP isolated in it's own file.  
> > That logic could also very well change from stack to stack.  So 2.2->2.3 
> > upgrade a property may be kept, but 2.2->2.4 needs to be removed (as an 
> > example).  But if you change the stack, you don't get that flexibility.
> > 
> > I don't think blindly "don't merge up" is extremely dangerous and adds more 
> > complexity to our "simple" *-site.xml files.
> 
> Sumit Mohanty wrote:
> I do like the idea of a separete file that tells Ambari upgrade if and 
> what it should do with the configs. This will be in line with what is done 
> for EU/RU.
> 
> It seems we are also changing RU/EU related code base - or they are 
> helper funtions only? The problem is about Ambari upgrade only. *I assume 
> stack upgrade is already doing the right thing*
> 
> If its more efficient, for new config-types, then we can even add a 
> construct for the config type itself e.g. "add-on-ambari-upgrade". Also, lets 
> use "ambari-upgrade" in the name to differentiate.
> 
> Jonathan Hurley wrote:
> I also dislike how  is required on every property and 
> makes them verbose. We should decorate files (whether they be existing config 
> XMLs or some other file) with the exceptions rather than the rule.

I meant to say: "I think blindly "don't merge up" is extremely dangerous and 
adds more complexity to our "simple" *-site.xml files."


- Nate


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


On May 5, 2016, 10:37 a.m., Dmitro Lisnichenko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47018/
> ---
> 
> (Updated May 5, 2016, 10:37 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Nate Cole, 
> and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-16272
> https://issues.apache.org/jira/browse/AMBARI-16272
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Today, Ambari Upgrade will automatically add stack configs.
> However, it also causes problems when default properties or properties with 
> default value such as "localhost" end up being added.
> 
> This led to many bugs. E.g., cluster with NameNode HA shouldn't automatically 
> add dfs.namenode.secondary.http-address
> 
> Properties should be explicitly added during RU/EU config packs instead of 
> relying on annotating them with.
> {code}
> DONT_ADD_ON_UPGRADE
> {code}
> 
> This logic today will even add new config types. E.g., add ranger-env even 
> though Ranger is not installed. If the customer then upgrades the stack from 
> HDP 2.2 to 2.3, and then adds Ranger, they can get the wrong configs.
> If we change this behavior, it's good to do so in a major release such as 2.4
> 
> We add required xml tags to properties:
> # If it's a new property from stack X to X+1, we don't want it to be added 
> automatically added. If we do want to add it, we should annotate it with 
> "ADD_ON_UPGRADE"
> # Similar to above, but handle "DELETE_ON_UPGRADE"
> # Similar to above, but handle "CHANGE_ON_UPGRADE" to forcefully set to a new 
> value if it exists
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
>  b069862 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java 
> 854dd0b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/PropertyInfo.java 
> 34b3ba1 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/PropertyUpgradeBehaviorAdapter.java
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/GLUSTERFS/configuration/core-site.xml
>  00dd4b3 
>   
> ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/GLUSTERFS/configuration/hadoop-env.xml
>  39651b0 
>   
> ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/HBASE/configuration/hbase-site.xml
>  c9a5220 
>   
> ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/HDFS/configuration/core-site.xml
>  db665bd 
>   
> ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/HDFS/configuration/global.xml
>  67c7c86 
>   
> ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/HDFS/configuration/hadoop-policy.xml
>  41bde16 
>   
> ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/HDFS/configuration/hdfs-site.xml
>  8132a9d 
>   
> ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/s

Re: Review Request 47014: Blueprint processor should create ConfigGroup even with only one host registered

2016-05-06 Thread Sebastian Toader

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

(Updated May 6, 2016, 4:37 p.m.)


Review request for Ambari, Daniel Gergely, Laszlo Puskas, Sandor Magyari, 
Srimanth Gunturi, and Sid Wagle.


Changes
---

Removed branch-2.2.2 as this needs to be committed to branch-2.2 and trunk


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


Repository: ambari


Description
---

When the first host for a host group registers with the cluster and is assigned 
to host group Ambari checks if there is any config group to be created for that 
host group. If it has to than create a config group and assigning to it all 
hosts that are expected for the parent host group. However it not checks is all 
of the expected hosts of the host group have already been associated with the 
cluster thus the config group creation fails as config groups can have only 
hosts added that already are associated with the cluster.

This has been changed to add only those hosts to config group that already have 
been associated with the cluster and update the created config group with the 
remaing hosts as these become available and register with the cluster.


Diffs
-

  
ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
 cf1a6ac 
  
ambari-server/src/test/java/org/apache/ambari/server/topology/AmbariContextTest.java
 1613d11 

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


Testing
---

Manual testing done.

Unit test results:
Results :

Tests run: 3568, Failures: 0, Errors: 0, Skipped: 36


Thanks,

Sebastian Toader



Re: Review Request 47027: Views: Simplify View Configuration for Remote Ambari Managed Cluster. Ambari Views changes

2016-05-06 Thread Jonathan Hurley

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




ambari-views/src/main/java/org/apache/ambari/view/AmbariClusterStreamProvider.java
 (line 28)


How is this different from AmbariStreamProvider which does not use an 
existing session? Isn't that the same thing as a remote Ambari cluster?



ambari-views/src/main/java/org/apache/ambari/view/ClusterType.java (line 27)


Doesn't have to be one or the other - NONE doesn't seem to make sense here.



contrib/views/capacity-scheduler/src/main/java/org/apache/ambari/view/capacityscheduler/ConfigurationService.java
 (line 121)


Why is this commented out?



contrib/views/capacity-scheduler/src/main/java/org/apache/ambari/view/capacityscheduler/ConfigurationService.java
 (lines 313 - 338)


What's going on with this method? Why is validation no longer required?



contrib/views/capacity-scheduler/src/main/resources/view.xml (line 27)


How is this going to impact existing deployments of this view? Removing 
these has to have some consequence in the UI?


- Jonathan Hurley


On May 5, 2016, 12:35 p.m., Gaurav Nagar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47027/
> ---
> 
> (Updated May 5, 2016, 12:35 p.m.)
> 
> 
> Review request for Ambari, DIPAYAN BHOWMICK, Jonathan Hurley, Nitiraj 
> Rathore, Pallav Kulshreshtha, Rohit Choudhary, and Ashwin Rajeev.
> 
> 
> Bugs: AMBARI-16274
> https://issues.apache.org/jira/browse/AMBARI-16274
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Added AmbariClusterStreamProvider interface for connecting to Ambari Cluster 
> (Can be Remote or Local) that is attached to view instance.
> Added Cluster Type Enum (LOCAL_AMBARI, REMOTE_AMBARI, NONE) for 
> differentiating cluster type attached to view instance.
> 
> 
> Diffs
> -
> 
>   
> ambari-views/src/main/java/org/apache/ambari/view/AmbariClusterStreamProvider.java
>  PRE-CREATION 
>   ambari-views/src/main/java/org/apache/ambari/view/AmbariHttpException.java 
> PRE-CREATION 
>   ambari-views/src/main/java/org/apache/ambari/view/AmbariStreamProvider.java 
> ce91676 
>   ambari-views/src/main/java/org/apache/ambari/view/ClusterType.java 
> PRE-CREATION 
>   ambari-views/src/main/java/org/apache/ambari/view/ViewContext.java 7b7b025 
>   
> ambari-views/src/main/java/org/apache/ambari/view/ViewInstanceDefinition.java 
> 0c3d3ce 
>   ambari-views/src/main/resources/view.xsd 04902e9 
>   
> contrib/views/capacity-scheduler/src/main/java/org/apache/ambari/view/capacityscheduler/ConfigurationService.java
>  7f1d489 
>   contrib/views/capacity-scheduler/src/main/resources/view.xml 6dc3ffa 
>   
> contrib/views/capacity-scheduler/src/test/java/org/apache/ambari/view/capacityscheduler/ConfigurationServiceTest.java
>  62fa21e 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/UploadService.java
>  83eae9b 
>   
> contrib/views/slider/src/main/java/org/apache/ambari/view/slider/rest/client/BaseHttpClient.java
>  b4fccf9 
>   
> contrib/views/utils/src/main/java/org/apache/ambari/view/utils/ambari/AmbariApi.java
>  6b88b6f 
>   
> contrib/views/utils/src/main/java/org/apache/ambari/view/utils/ambari/Services.java
>  a8ef43f 
>   
> contrib/views/utils/src/main/java/org/apache/ambari/view/utils/ambari/URLStreamProviderBasicAuth.java
>  c9f735a 
>   
> contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/AuthConfigurationBuilder.java
>  c8ca6cd 
>   
> contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/ConfigurationBuilder.java
>  4518ac6 
>   
> contrib/views/utils/src/test/java/org/apache/ambari/view/utils/ambari/RemoteClusterTest.java
>  ec4df7d 
>   
> contrib/views/utils/src/test/java/org/apache/ambari/view/utils/ambari/ServicesTest.java
>  455ca20 
>   
> contrib/views/utils/src/test/java/org/apache/ambari/view/utils/ambari/URLStreamProviderBasicAuthTest.java
>  27e98f2 
> 
> Diff: https://reviews.apache.org/r/47027/diff/
> 
> 
> Testing
> ---
> 
> Manual Testing
> 
> 
> Thanks,
> 
> Gaurav Nagar
> 
>



Re: Review Request 47060: AMBARI-16285 Ranger Tagsync stack changes to sync tags from Atlas

2016-05-06 Thread Jonathan Hurley

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



These property renames - I don't see them being handled for upgrades. How are 
existing clusters going to adapt to these changes?


ambari-common/src/main/python/resource_management/libraries/functions/stack_features.py
 (line 239)


Description would be nice for developers wondering what this is.



ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
 (line 230)


Not using default? It's 100% guaranteed to be there?



ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
 (lines 245 - 246)


Guaranteed to be on every cluster - new and old - always?


- Jonathan Hurley


On May 6, 2016, 5:35 a.m., Mugdha Varadkar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47060/
> ---
> 
> (Updated May 6, 2016, 5:35 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Gautam Borad, Jonathan 
> Hurley, Jayush Luniya, and Velmurugan Periasamy.
> 
> 
> Bugs: AMBARI-16285
> https://issues.apache.org/jira/browse/AMBARI-16285
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Changes include:
> 1) Renaming properties in ranger-tagsync-site.xml introduced in stack -2.5 
> followed by theme change.
> 2) Removed tagsync user password introduced in previous patch
> 3) Add default password in jceks for rangertagsync and rangerusersync
> 4) Derive tag source as ATLAS, if ATLAS is installed
> 5) Added new properties under ranger-ugsync-site.xml related to Policy 
> manager user's credentials in Ranger usersync service
> 
> 
> Diffs
> -
> 
>   
> ambari-common/src/main/python/resource_management/libraries/functions/constants.py
>  abd2212 
>   
> ambari-common/src/main/python/resource_management/libraries/functions/stack_features.py
>  daa97de 
>   
> ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
>  59190fe 
>   
> ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py
>  1b56044 
>   
> ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_usersync.py
>  d013371 
>   
> ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
>  ec0eea1 
>   
> ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
>  aabc37d 
>   
> ambari-server/src/main/resources/stacks/HDP/2.5/services/RANGER/configuration/ranger-tagsync-site.xml
>  08f6235 
>   
> ambari-server/src/main/resources/stacks/HDP/2.5/services/RANGER/configuration/ranger-ugsync-site.xml
>  10ef1a8 
>   
> ambari-server/src/main/resources/stacks/HDP/2.5/services/RANGER/configuration/tagsync-application-properties.xml
>  d369098 
>   
> ambari-server/src/main/resources/stacks/HDP/2.5/services/RANGER/themes/theme_version_3.json
>  19411d4 
>   ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py 
> 37e6ef6 
>   ambari-web/app/styles/widgets.less f385449 
> 
> Diff: https://reviews.apache.org/r/47060/diff/
> 
> 
> Testing
> ---
> 
> Tested Ranger Tagsync on centos 6.
> 
> 
> Thanks,
> 
> Mugdha Varadkar
> 
>



Re: Review Request 47018: [preview] Ambari Upgrade shouldn't automatically add stack configs

2016-05-06 Thread Jonathan Hurley


> On May 5, 2016, 1:20 p.m., Nate Cole wrote:
> > It feels to me like we should not be touching the stack for this, but 
> > rather use the config-upgrade.xml or the upgrade pack to hold this 
> > information.  Then you can have ADD/DELETE/SKIP isolated in it's own file.  
> > That logic could also very well change from stack to stack.  So 2.2->2.3 
> > upgrade a property may be kept, but 2.2->2.4 needs to be removed (as an 
> > example).  But if you change the stack, you don't get that flexibility.
> > 
> > I don't think blindly "don't merge up" is extremely dangerous and adds more 
> > complexity to our "simple" *-site.xml files.
> 
> Sumit Mohanty wrote:
> I do like the idea of a separete file that tells Ambari upgrade if and 
> what it should do with the configs. This will be in line with what is done 
> for EU/RU.
> 
> It seems we are also changing RU/EU related code base - or they are 
> helper funtions only? The problem is about Ambari upgrade only. *I assume 
> stack upgrade is already doing the right thing*
> 
> If its more efficient, for new config-types, then we can even add a 
> construct for the config type itself e.g. "add-on-ambari-upgrade". Also, lets 
> use "ambari-upgrade" in the name to differentiate.

I also dislike how  is required on every property and makes 
them verbose. We should decorate files (whether they be existing config XMLs or 
some other file) with the exceptions rather than the rule.


- Jonathan


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


On May 5, 2016, 10:37 a.m., Dmitro Lisnichenko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47018/
> ---
> 
> (Updated May 5, 2016, 10:37 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Nate Cole, 
> and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-16272
> https://issues.apache.org/jira/browse/AMBARI-16272
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Today, Ambari Upgrade will automatically add stack configs.
> However, it also causes problems when default properties or properties with 
> default value such as "localhost" end up being added.
> 
> This led to many bugs. E.g., cluster with NameNode HA shouldn't automatically 
> add dfs.namenode.secondary.http-address
> 
> Properties should be explicitly added during RU/EU config packs instead of 
> relying on annotating them with.
> {code}
> DONT_ADD_ON_UPGRADE
> {code}
> 
> This logic today will even add new config types. E.g., add ranger-env even 
> though Ranger is not installed. If the customer then upgrades the stack from 
> HDP 2.2 to 2.3, and then adds Ranger, they can get the wrong configs.
> If we change this behavior, it's good to do so in a major release such as 2.4
> 
> We add required xml tags to properties:
> # If it's a new property from stack X to X+1, we don't want it to be added 
> automatically added. If we do want to add it, we should annotate it with 
> "ADD_ON_UPGRADE"
> # Similar to above, but handle "DELETE_ON_UPGRADE"
> # Similar to above, but handle "CHANGE_ON_UPGRADE" to forcefully set to a new 
> value if it exists
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
>  b069862 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java 
> 854dd0b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/PropertyInfo.java 
> 34b3ba1 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/PropertyUpgradeBehaviorAdapter.java
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/GLUSTERFS/configuration/core-site.xml
>  00dd4b3 
>   
> ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/GLUSTERFS/configuration/hadoop-env.xml
>  39651b0 
>   
> ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/HBASE/configuration/hbase-site.xml
>  c9a5220 
>   
> ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/HDFS/configuration/core-site.xml
>  db665bd 
>   
> ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/HDFS/configuration/global.xml
>  67c7c86 
>   
> ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/HDFS/configuration/hadoop-policy.xml
>  41bde16 
>   
> ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/HDFS/configuration/hdfs-site.xml
>  8132a9d 
>   
> ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/HIVE/configuration/hive-site.xml
>  01b11dd 
>   
> ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/OOZIE/configuration/oozie-site.xml
>  2

Re: Review Request 47026: Views: Simplify View Configuration for Remote Ambari Managed Cluster. Ambari Database changes

2016-05-06 Thread Jonathan Hurley

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


Fix it, then Ship it!





ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
 (line 198)


I don't think we need the word "ambari" in an Ambari database table.



ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
 (line 229)


Use {} in log statements



ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
 (lines 279 - 280)


Create an enum for cluster_type for 'LOCAL_AMBARI'


- Jonathan Hurley


On May 5, 2016, 12:29 p.m., Gaurav Nagar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47026/
> ---
> 
> (Updated May 5, 2016, 12:29 p.m.)
> 
> 
> Review request for Ambari, DIPAYAN BHOWMICK, Jonathan Hurley, Nitiraj 
> Rathore, Pallav Kulshreshtha, Rohit Choudhary, and Ashwin Rajeev.
> 
> 
> Bugs: AMBARI-16274
> https://issues.apache.org/jira/browse/AMBARI-16274
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Added tables for Remote Cluster to create scripts.
> Added table changes to UpgradeCatalog240
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
>  f85a4c7 
>   ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql f5336bc 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql fca3be3 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql ce0bd84 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 7fb8c31 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql 
> 0f3a2c2 
>   ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql b89389c 
>   ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 1107c4d 
>   
> ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog240Test.java
>  7c85ba7 
> 
> Diff: https://reviews.apache.org/r/47026/diff/
> 
> 
> Testing
> ---
> 
> Manual Testing.
> 
> 
> Thanks,
> 
> Gaurav Nagar
> 
>



Re: Review Request 47010: Allow roles to be treated like principals in Ambari DB

2016-05-06 Thread Jonathan Hurley

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


Ship it!




Ship It!

- Jonathan Hurley


On May 6, 2016, 7:28 a.m., Robert Levas wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47010/
> ---
> 
> (Updated May 6, 2016, 7:28 a.m.)
> 
> 
> Review request for Ambari, DIPAYAN BHOWMICK, Jonathan Hurley, Nate Cole, and 
> Sebastian Toader.
> 
> 
> Bugs: AMBARI-16246
> https://issues.apache.org/jira/browse/AMBARI-16246
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> To support assigning privileges to users based on their roles provide support 
> in the Ambari database to allow a `role` to be referenced as a `principal` 
> similar in the way a `user` and a `group` a referenced as a `principal`.
> 
> A use-case to support the need for this is to assign access to a view to all 
> users with some specific role. Currently we can assign access to a view to a 
> specific user or group by assigning that user or group the `VIEW.USER` role 
> applied to the specific view.  To assign access a view to users who have a 
> specific role, a `role` will need to behave like a `principal`.
> 
> The following changes need to be made to the database:
> 
> * Add `principal_id` column to the `adminpermission` table
> * Create a `principaltype` record where the `principal_type_name` is '`ROLE`'
> * Add records to the `adminprincpal` table to represent each role in 
> `adminpermission`
> * Update `adminpermission.principal_id` to match the relevant records from 
> `adminprincipal`
> 
> After this is complete, `adminprivilege` records can be created using roles 
> as principals. 
> 
> NOTE: special handling will need to be done in the authorization logic to 
> dereference the role associations with the authenticated user, similar in the 
> way this is done for groups.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/dao/PermissionDAO.java
>  5d1a04a 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PermissionEntity.java
>  43fd71b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrincipalEntity.java
>  25d8d14 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrincipalTypeEntity.java
>  b94f1ff 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
>  17f9fe1 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
>  f85a4c7 
>   ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql f5336bc 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql fca3be3 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql ce0bd84 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 7fb8c31 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql 
> 0f3a2c2 
>   ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql b89389c 
>   ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 1107c4d 
>   
> ambari-server/src/test/java/org/apache/ambari/server/security/authorization/TestUsers.java
>  ad8cce1 
>   
> ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog240Test.java
>  7c85ba7 
> 
> Diff: https://reviews.apache.org/r/47010/diff/
> 
> 
> Testing
> ---
> 
> Manually tested newly created instance and upgrading from 2.2.1.  Focused on 
> postgresql and mysql.
> 
> # Local test results:
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time: 1:16:03.148s
> [INFO] Finished at: Wed May 04 18:43:11 EDT 2016
> [INFO] Final Memory: 60M/1768M
> [INFO] 
> 
> 
> # Jenkins test results: PENDING
> 
> 
> Thanks,
> 
> Robert Levas
> 
>



Re: Review Request 47063: MapReduce service check failed on most of the Kerberos tests

2016-05-06 Thread Sumit Mohanty

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




ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py (line 
90)


When Kerberos is enabled we just need to set the container-executor.class. 
The other properties need not be set. They should only be based on if 
yarn_cgroups_enabled is true or false.


- Sumit Mohanty


On May 6, 2016, 12:07 p.m., Dmytro Sen wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47063/
> ---
> 
> (Updated May 6, 2016, 12:07 p.m.)
> 
> 
> Review request for Ambari, Robert Levas, Sumit Mohanty, and Vitalyi 
> Brodetskyi.
> 
> 
> Bugs: AMBARI-16286
> https://issues.apache.org/jira/browse/AMBARI-16286
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> 1. Install ambari cluster with few services 
> 2. enable kerberos
> 3. run service check on services
> Expected: all service checks should pass successfully
> Actual: MR service check fails.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/configuration/yarn-env.xml
>  2184c0e 
>   ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py 
> d6bc713 
>   ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py 
> cf0990d 
>   ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py 
> c48b2c7 
> 
> Diff: https://reviews.apache.org/r/47063/diff/
> 
> 
> Testing
> ---
> 
> Unit tests passed
> 
> 
> Thanks,
> 
> Dmytro Sen
> 
>



Re: Review Request 47063: MapReduce service check failed on most of the Kerberos tests

2016-05-06 Thread Oliver Szabo

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


Ship it!




Ship It!

- Oliver Szabo


On May 6, 2016, 12:07 p.m., Dmytro Sen wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47063/
> ---
> 
> (Updated May 6, 2016, 12:07 p.m.)
> 
> 
> Review request for Ambari, Robert Levas, Sumit Mohanty, and Vitalyi 
> Brodetskyi.
> 
> 
> Bugs: AMBARI-16286
> https://issues.apache.org/jira/browse/AMBARI-16286
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> 1. Install ambari cluster with few services 
> 2. enable kerberos
> 3. run service check on services
> Expected: all service checks should pass successfully
> Actual: MR service check fails.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/configuration/yarn-env.xml
>  2184c0e 
>   ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py 
> d6bc713 
>   ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py 
> cf0990d 
>   ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py 
> c48b2c7 
> 
> Diff: https://reviews.apache.org/r/47063/diff/
> 
> 
> Testing
> ---
> 
> Unit tests passed
> 
> 
> Thanks,
> 
> Dmytro Sen
> 
>



Re: Review Request 47063: MapReduce service check failed on most of the Kerberos tests

2016-05-06 Thread Dmytro Sen

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

(Updated Май 6, 2016, 12:07 п.п.)


Review request for Ambari, Robert Levas, Sumit Mohanty, and Vitalyi Brodetskyi.


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


Repository: ambari


Description
---

1. Install ambari cluster with few services 
2. enable kerberos
3. run service check on services
Expected: all service checks should pass successfully
Actual: MR service check fails.


Diffs (updated)
-

  
ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/configuration/yarn-env.xml
 2184c0e 
  ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py 
d6bc713 
  ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py 
cf0990d 
  ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py c48b2c7 

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


Testing
---

Unit tests passed


Thanks,

Dmytro Sen



Re: Review Request 47063: MapReduce service check failed on most of the Kerberos tests

2016-05-06 Thread Robert Levas

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


Ship it!




Ship It!

- Robert Levas


On May 6, 2016, 6:04 a.m., Dmytro Sen wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47063/
> ---
> 
> (Updated May 6, 2016, 6:04 a.m.)
> 
> 
> Review request for Ambari, Robert Levas, Sumit Mohanty, and Vitalyi 
> Brodetskyi.
> 
> 
> Bugs: AMBARI-16286
> https://issues.apache.org/jira/browse/AMBARI-16286
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> 1. Install ambari cluster with few services 
> 2. enable kerberos
> 3. run service check on services
> Expected: all service checks should pass successfully
> Actual: MR service check fails.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/configuration/yarn-env.xml
>  2184c0e 
>   ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py 
> d6bc713 
>   ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py 
> cf0990d 
>   ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py 
> c48b2c7 
> 
> Diff: https://reviews.apache.org/r/47063/diff/
> 
> 
> Testing
> ---
> 
> Unit tests passed
> 
> 
> Thanks,
> 
> Dmytro Sen
> 
>



Re: Review Request 47010: Allow roles to be treated like principals in Ambari DB

2016-05-06 Thread Robert Levas


> On May 5, 2016, 1:10 p.m., Nate Cole wrote:
> > ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql, lines 
> > 1092-1096
> > 
> >
> > This syntax is so painful.  Anyway to clean this up?  maybe INSERT into 
> > adminprincipal(principal_id, principal_type_id) VALUES (1, 1), (2, 3), 
> > (3,4) ...  Oh, actually, I see we do that further down.
> 
> Robert Levas wrote:
> I guess I can try to fix it... but maybe that should be done via a 
> different JIRA. I dont want to make too many changes here...

I cleand up the postgress and MySQL DDL files.. I left the other alone since I 
don't have an easy way to test them.


- Robert


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


On May 6, 2016, 7:28 a.m., Robert Levas wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47010/
> ---
> 
> (Updated May 6, 2016, 7:28 a.m.)
> 
> 
> Review request for Ambari, DIPAYAN BHOWMICK, Jonathan Hurley, Nate Cole, and 
> Sebastian Toader.
> 
> 
> Bugs: AMBARI-16246
> https://issues.apache.org/jira/browse/AMBARI-16246
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> To support assigning privileges to users based on their roles provide support 
> in the Ambari database to allow a `role` to be referenced as a `principal` 
> similar in the way a `user` and a `group` a referenced as a `principal`.
> 
> A use-case to support the need for this is to assign access to a view to all 
> users with some specific role. Currently we can assign access to a view to a 
> specific user or group by assigning that user or group the `VIEW.USER` role 
> applied to the specific view.  To assign access a view to users who have a 
> specific role, a `role` will need to behave like a `principal`.
> 
> The following changes need to be made to the database:
> 
> * Add `principal_id` column to the `adminpermission` table
> * Create a `principaltype` record where the `principal_type_name` is '`ROLE`'
> * Add records to the `adminprincpal` table to represent each role in 
> `adminpermission`
> * Update `adminpermission.principal_id` to match the relevant records from 
> `adminprincipal`
> 
> After this is complete, `adminprivilege` records can be created using roles 
> as principals. 
> 
> NOTE: special handling will need to be done in the authorization logic to 
> dereference the role associations with the authenticated user, similar in the 
> way this is done for groups.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/dao/PermissionDAO.java
>  5d1a04a 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PermissionEntity.java
>  43fd71b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrincipalEntity.java
>  25d8d14 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrincipalTypeEntity.java
>  b94f1ff 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
>  17f9fe1 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
>  f85a4c7 
>   ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql f5336bc 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql fca3be3 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql ce0bd84 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 7fb8c31 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql 
> 0f3a2c2 
>   ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql b89389c 
>   ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 1107c4d 
>   
> ambari-server/src/test/java/org/apache/ambari/server/security/authorization/TestUsers.java
>  ad8cce1 
>   
> ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog240Test.java
>  7c85ba7 
> 
> Diff: https://reviews.apache.org/r/47010/diff/
> 
> 
> Testing
> ---
> 
> Manually tested newly created instance and upgrading from 2.2.1.  Focused on 
> postgresql and mysql.
> 
> # Local test results:
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time: 1:16:03.148s
> [INFO] Finished at: Wed May 04 18:43:11 EDT 2016
> [INFO] Final Memory: 60M/1768M
> [INFO] 
> 
> 
> # Jenkins test results: PENDING
> 
> 
> Thanks,
> 
> Robert Levas
> 
>



Re: Review Request 47010: Allow roles to be treated like principals in Ambari DB

2016-05-06 Thread Robert Levas

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

(Updated May 6, 2016, 7:28 a.m.)


Review request for Ambari, DIPAYAN BHOWMICK, Jonathan Hurley, Nate Cole, and 
Sebastian Toader.


Changes
---

Addressed reviewer concerns.

Cleaned up some DDL code for postgres and MySQL, since I can test them.  I left 
the others as-is since testing was not an option for me at this time.


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


Repository: ambari


Description
---

To support assigning privileges to users based on their roles provide support 
in the Ambari database to allow a `role` to be referenced as a `principal` 
similar in the way a `user` and a `group` a referenced as a `principal`.

A use-case to support the need for this is to assign access to a view to all 
users with some specific role. Currently we can assign access to a view to a 
specific user or group by assigning that user or group the `VIEW.USER` role 
applied to the specific view.  To assign access a view to users who have a 
specific role, a `role` will need to behave like a `principal`.

The following changes need to be made to the database:

* Add `principal_id` column to the `adminpermission` table
* Create a `principaltype` record where the `principal_type_name` is '`ROLE`'
* Add records to the `adminprincpal` table to represent each role in 
`adminpermission`
* Update `adminpermission.principal_id` to match the relevant records from 
`adminprincipal`

After this is complete, `adminprivilege` records can be created using roles as 
principals. 

NOTE: special handling will need to be done in the authorization logic to 
dereference the role associations with the authenticated user, similar in the 
way this is done for groups.


Diffs (updated)
-

  
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/PermissionDAO.java 
5d1a04a 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PermissionEntity.java
 43fd71b 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrincipalEntity.java
 25d8d14 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrincipalTypeEntity.java
 b94f1ff 
  
ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
 17f9fe1 
  
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
 f85a4c7 
  ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql f5336bc 
  ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql fca3be3 
  ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql ce0bd84 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 7fb8c31 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql 
0f3a2c2 
  ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql b89389c 
  ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 1107c4d 
  
ambari-server/src/test/java/org/apache/ambari/server/security/authorization/TestUsers.java
 ad8cce1 
  
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog240Test.java
 7c85ba7 

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


Testing
---

Manually tested newly created instance and upgrading from 2.2.1.  Focused on 
postgresql and mysql.

# Local test results:
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time: 1:16:03.148s
[INFO] Finished at: Wed May 04 18:43:11 EDT 2016
[INFO] Final Memory: 60M/1768M
[INFO] 

# Jenkins test results: PENDING


Thanks,

Robert Levas



Re: Review Request 47063: MapReduce service check failed on most of the Kerberos tests

2016-05-06 Thread Oliver Szabo

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




ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py (line 
84)


You should rename this variable (yarn_cgroups_enabled) because it can be 
misleading


- Oliver Szabo


On May 6, 2016, 10:04 a.m., Dmytro Sen wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47063/
> ---
> 
> (Updated May 6, 2016, 10:04 a.m.)
> 
> 
> Review request for Ambari, Robert Levas, Sumit Mohanty, and Vitalyi 
> Brodetskyi.
> 
> 
> Bugs: AMBARI-16286
> https://issues.apache.org/jira/browse/AMBARI-16286
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> 1. Install ambari cluster with few services 
> 2. enable kerberos
> 3. run service check on services
> Expected: all service checks should pass successfully
> Actual: MR service check fails.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/configuration/yarn-env.xml
>  2184c0e 
>   ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py 
> d6bc713 
>   ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py 
> cf0990d 
>   ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py 
> c48b2c7 
> 
> Diff: https://reviews.apache.org/r/47063/diff/
> 
> 
> Testing
> ---
> 
> Unit tests passed
> 
> 
> Thanks,
> 
> Dmytro Sen
> 
>



Review Request 47063: MapReduce service check failed on most of the Kerberos tests

2016-05-06 Thread Dmytro Sen

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

Review request for Ambari, Robert Levas, Sumit Mohanty, and Vitalyi Brodetskyi.


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


Repository: ambari


Description
---

1. Install ambari cluster with few services 
2. enable kerberos
3. run service check on services
Expected: all service checks should pass successfully
Actual: MR service check fails.


Diffs
-

  
ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/configuration/yarn-env.xml
 2184c0e 
  ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py 
d6bc713 
  ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py 
cf0990d 
  ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py c48b2c7 

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


Testing
---

Unit tests passed


Thanks,

Dmytro Sen



Review Request 47060: AMBARI-16285 Ranger Tagsync stack changes to sync tags from Atlas

2016-05-06 Thread Mugdha Varadkar

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

Review request for Ambari, Alejandro Fernandez, Gautam Borad, Jonathan Hurley, 
Jayush Luniya, and Velmurugan Periasamy.


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


Repository: ambari


Description
---

Changes include:
1) Renaming properties in ranger-tagsync-site.xml introduced in stack -2.5 
followed by theme change.
2) Removed tagsync user password introduced in previous patch
3) Add default password in jceks for rangertagsync and rangerusersync
4) Derive tag source as ATLAS, if ATLAS is installed
5) Added new properties under ranger-ugsync-site.xml related to Policy manager 
user's credentials in Ranger usersync service


Diffs
-

  
ambari-common/src/main/python/resource_management/libraries/functions/constants.py
 abd2212 
  
ambari-common/src/main/python/resource_management/libraries/functions/stack_features.py
 daa97de 
  
ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
 59190fe 
  
ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py
 1b56044 
  
ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_usersync.py
 d013371 
  
ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
 ec0eea1 
  
ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
 aabc37d 
  
ambari-server/src/main/resources/stacks/HDP/2.5/services/RANGER/configuration/ranger-tagsync-site.xml
 08f6235 
  
ambari-server/src/main/resources/stacks/HDP/2.5/services/RANGER/configuration/ranger-ugsync-site.xml
 10ef1a8 
  
ambari-server/src/main/resources/stacks/HDP/2.5/services/RANGER/configuration/tagsync-application-properties.xml
 d369098 
  
ambari-server/src/main/resources/stacks/HDP/2.5/services/RANGER/themes/theme_version_3.json
 19411d4 
  ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py 
37e6ef6 
  ambari-web/app/styles/widgets.less f385449 

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


Testing
---

Tested Ranger Tagsync on centos 6.


Thanks,

Mugdha Varadkar



Re: Review Request 47024: Ambari build sometime fails on hudson (Python test issue)

2016-05-06 Thread Dmytro Sen

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


Ship it!




Ship It!

- Dmytro Sen


On Май 5, 2016, 3:56 п.п., Vitalyi Brodetskyi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47024/
> ---
> 
> (Updated Май 5, 2016, 3:56 п.п.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko, Dmytro Sen, and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-16276
> https://issues.apache.org/jira/browse/AMBARI-16276
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> {code}
> Running tests for ambari-server
> Traceback (most recent call last):
>   File "unitTests.py", line 298, in 
> sys.exit(main())
>   File "unitTests.py", line 250, in main
> suites = [unittest.defaultTestLoader.loadTestsFromName(name) for name in 
> modules]
>   File "/usr/lib/python2.7/unittest/loader.py", line 91, in loadTestsFromName
> module = __import__('.'.join(parts_copy))
>   File 
> "/home/jenkins/jenkins-slave/workspace/Ambari-trunk-Commit/ambari-server/src/test/python/TestMpacks.py",
>  line 21, in 
> from ambari_server.setupMpacks import install_mpack, upgrade_mpack, 
> replay_mpack_logs, purge_stacks_and_mpacks, \
>   File 
> "/home/jenkins/jenkins-slave/workspace/Ambari-trunk-Commit/ambari-server/src/main/python/ambari_server/setupMpacks.py",
>  line 31, in 
> from ambari_server.serverConfiguration import get_ambari_properties, 
> get_ambari_version, get_stack_location, \
>   File 
> "/home/jenkins/jenkins-slave/workspace/Ambari-trunk-Commit/ambari-server/src/main/python/ambari_server/serverConfiguration.py",
>  line 42, in 
> from ambari_server.ambariPath import AmbariPath
>   File 
> "/home/jenkins/jenkins-slave/workspace/Ambari-trunk-Commit/ambari-server/src/main/python/ambari_server/ambariPath.py",
>  line 28, in 
> class AmbariPath():
>   File 
> "/home/jenkins/jenkins-slave/workspace/Ambari-trunk-Commit/ambari-server/src/main/python/ambari_server/ambariPath.py",
>  line 29, in AmbariPath
> root_directory = os.environ[AMBARI_SERVER_ROOT_ENV_VARIABLE]
>   File "/usr/lib/python2.7/UserDict.py", line 23, in __getitem__
> raise KeyError(key)
> KeyError: 'ROOT'
> {code}
> 
> 
> Diffs
> -
> 
>   ambari-server/src/main/python/ambari_server/ambariPath.py 1d57558 
> 
> Diff: https://reviews.apache.org/r/47024/diff/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>



Re: Review Request 47024: Ambari build sometime fails on hudson (Python test issue)

2016-05-06 Thread Dmitro Lisnichenko

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


Ship it!




Ship It!

- Dmitro Lisnichenko


On May 5, 2016, 6:56 p.m., Vitalyi Brodetskyi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47024/
> ---
> 
> (Updated May 5, 2016, 6:56 p.m.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko, Dmytro Sen, and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-16276
> https://issues.apache.org/jira/browse/AMBARI-16276
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> {code}
> Running tests for ambari-server
> Traceback (most recent call last):
>   File "unitTests.py", line 298, in 
> sys.exit(main())
>   File "unitTests.py", line 250, in main
> suites = [unittest.defaultTestLoader.loadTestsFromName(name) for name in 
> modules]
>   File "/usr/lib/python2.7/unittest/loader.py", line 91, in loadTestsFromName
> module = __import__('.'.join(parts_copy))
>   File 
> "/home/jenkins/jenkins-slave/workspace/Ambari-trunk-Commit/ambari-server/src/test/python/TestMpacks.py",
>  line 21, in 
> from ambari_server.setupMpacks import install_mpack, upgrade_mpack, 
> replay_mpack_logs, purge_stacks_and_mpacks, \
>   File 
> "/home/jenkins/jenkins-slave/workspace/Ambari-trunk-Commit/ambari-server/src/main/python/ambari_server/setupMpacks.py",
>  line 31, in 
> from ambari_server.serverConfiguration import get_ambari_properties, 
> get_ambari_version, get_stack_location, \
>   File 
> "/home/jenkins/jenkins-slave/workspace/Ambari-trunk-Commit/ambari-server/src/main/python/ambari_server/serverConfiguration.py",
>  line 42, in 
> from ambari_server.ambariPath import AmbariPath
>   File 
> "/home/jenkins/jenkins-slave/workspace/Ambari-trunk-Commit/ambari-server/src/main/python/ambari_server/ambariPath.py",
>  line 28, in 
> class AmbariPath():
>   File 
> "/home/jenkins/jenkins-slave/workspace/Ambari-trunk-Commit/ambari-server/src/main/python/ambari_server/ambariPath.py",
>  line 29, in AmbariPath
> root_directory = os.environ[AMBARI_SERVER_ROOT_ENV_VARIABLE]
>   File "/usr/lib/python2.7/UserDict.py", line 23, in __getitem__
> raise KeyError(key)
> KeyError: 'ROOT'
> {code}
> 
> 
> Diffs
> -
> 
>   ambari-server/src/main/python/ambari_server/ambariPath.py 1d57558 
> 
> Diff: https://reviews.apache.org/r/47024/diff/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>



Re: Review Request 44210: AMBARI-15226 - The stack advisor should be pushed down to the services

2016-05-06 Thread Jayush Luniya


> On May 5, 2016, 10:52 p.m., Jayush Luniya wrote:
> > Ship It!
> 
> Matt wrote:
> Jayush, shall I commit this or are you working on it?

Committed to trunk


- Jayush


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


On May 5, 2016, 2:50 p.m., Tim Thorpe wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44210/
> ---
> 
> (Updated May 5, 2016, 2:50 p.m.)
> 
> 
> Review request for Ambari, Alexander Denissov, bhuvnesh chaudhary, Jayush 
> Luniya, Oleksandr Diachenko, Sumit Mohanty, Srimanth Gunturi, and Yusaku Sako.
> 
> 
> Bugs: AMBARI-15226
> https://issues.apache.org/jira/browse/AMBARI-15226
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Currently the stack advisor is defined under each stack version such as 
> HDP/2.3. The problem with this is that it restricts the services that can be 
> added to the stack. If a custom service is to be added, they would need to 
> modify the stack advisor. If the configuration recommendation and validation 
> can be done at the service level then the custom service could just include 
> their own recommendations and validations separately.
> 
> 
> Diffs
> -
> 
>   ambari-server/src/main/assemblies/server.xml e1a4919 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
>  df65010 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java
>  00c8696 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/StackServiceResponse.java
>  ca1968e 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackServiceResourceProvider.java
>  6c6fa91 
>   
> ambari-server/src/main/java/org/apache/ambari/server/stack/CommonServiceDirectory.java
>  636de37 
>   
> ambari-server/src/main/java/org/apache/ambari/server/stack/ServiceDirectory.java
>  356adb1 
>   
> ambari-server/src/main/java/org/apache/ambari/server/stack/ServiceModule.java 
> b7e09a9 
>   
> ambari-server/src/main/java/org/apache/ambari/server/stack/StackServiceDirectory.java
>  d27e52a 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ServiceInfo.java 
> 5a2bf84 
>   
> ambari-server/src/main/resources/common-services/HAWQ/2.0.0/service_advisor.py
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/PXF/3.0.0/service_advisor.py 
> PRE-CREATION 
>   ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py 
> 1680f21 
>   ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py 
> cf0990d 
>   ambari-server/src/main/resources/stacks/service_advisor.py PRE-CREATION 
>   ambari-server/src/main/resources/stacks/stack_advisor.py 9979e7e 
>   ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py 
> fcb5407 
> 
> Diff: https://reviews.apache.org/r/44210/diff/
> 
> 
> Testing
> ---
> 
> Ran all the non java unit tests.  
> 
> Total run:945
> Total errors:0
> Total failures:0
> 
> Manually configured HAWQ and PXF as part of the HDP 2.3 stack and made sure 
> their service advisors were called.
> 
> 
> Thanks,
> 
> Tim Thorpe
> 
>



Re: Review Request 47010: Allow roles to be treated like principals in Ambari DB

2016-05-06 Thread Sebastian Toader

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


Ship it!




Ship It!

- Sebastian Toader


On May 5, 2016, 2:19 p.m., Robert Levas wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47010/
> ---
> 
> (Updated May 5, 2016, 2:19 p.m.)
> 
> 
> Review request for Ambari, DIPAYAN BHOWMICK, Jonathan Hurley, Nate Cole, and 
> Sebastian Toader.
> 
> 
> Bugs: AMBARI-16246
> https://issues.apache.org/jira/browse/AMBARI-16246
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> To support assigning privileges to users based on their roles provide support 
> in the Ambari database to allow a `role` to be referenced as a `principal` 
> similar in the way a `user` and a `group` a referenced as a `principal`.
> 
> A use-case to support the need for this is to assign access to a view to all 
> users with some specific role. Currently we can assign access to a view to a 
> specific user or group by assigning that user or group the `VIEW.USER` role 
> applied to the specific view.  To assign access a view to users who have a 
> specific role, a `role` will need to behave like a `principal`.
> 
> The following changes need to be made to the database:
> 
> * Add `principal_id` column to the `adminpermission` table
> * Create a `principaltype` record where the `principal_type_name` is '`ROLE`'
> * Add records to the `adminprincpal` table to represent each role in 
> `adminpermission`
> * Update `adminpermission.principal_id` to match the relevant records from 
> `adminprincipal`
> 
> After this is complete, `adminprivilege` records can be created using roles 
> as principals. 
> 
> NOTE: special handling will need to be done in the authorization logic to 
> dereference the role associations with the authenticated user, similar in the 
> way this is done for groups.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/dao/PermissionDAO.java
>  5d1a04a 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PermissionEntity.java
>  43fd71b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrincipalEntity.java
>  25d8d14 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrincipalTypeEntity.java
>  b94f1ff 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
>  17f9fe1 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
>  f85a4c7 
>   ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql f5336bc 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql fca3be3 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql ce0bd84 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 7fb8c31 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql 
> 0f3a2c2 
>   ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql b89389c 
>   ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 1107c4d 
>   
> ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog240Test.java
>  7c85ba7 
> 
> Diff: https://reviews.apache.org/r/47010/diff/
> 
> 
> Testing
> ---
> 
> Manually tested newly created instance and upgrading from 2.2.1.  Focused on 
> postgresql and mysql.
> 
> # Local test results:
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time: 1:16:03.148s
> [INFO] Finished at: Wed May 04 18:43:11 EDT 2016
> [INFO] Final Memory: 60M/1768M
> [INFO] 
> 
> 
> # Jenkins test results: PENDING
> 
> 
> Thanks,
> 
> Robert Levas
> 
>