ambari git commit: AMBARI-19909. Export Blueprints does not contain the settings object and hence the credential store values (Madhuvanthi Radhakrishnan via smohanty)

2017-02-09 Thread smohanty
Repository: ambari
Updated Branches:
  refs/heads/trunk 00ed41594 -> bc8066599


AMBARI-19909. Export Blueprints does not contain the settings object and hence 
the credential store values (Madhuvanthi Radhakrishnan via smohanty)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bc806659
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bc806659
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bc806659

Branch: refs/heads/trunk
Commit: bc806659971c05b873aa769007afa2916b2041dc
Parents: 00ed415
Author: Sumit Mohanty 
Authored: Thu Feb 9 18:39:22 2017 -0800
Committer: Sumit Mohanty 
Committed: Thu Feb 9 18:58:34 2017 -0800

--
 .../query/render/ClusterBlueprintRenderer.java  | 124 
 .../render/ClusterBlueprintRendererTest.java| 143 +++
 .../server/upgrade/UpgradeCatalog250Test.java   |  13 +-
 3 files changed, 274 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/bc806659/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRenderer.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRenderer.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRenderer.java
index 342df44..4091ee8 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRenderer.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRenderer.java
@@ -109,6 +109,20 @@ public class ClusterBlueprintRenderer extends BaseRenderer 
implements Renderer {
 if (resultTree.getChild(serviceType) == null) {
   resultTree.addChild(new HashSet(), serviceType);
 }
+TreeNode serviceNode = resultTree.getChild(serviceType);
+if (serviceNode == null) {
+  serviceNode = resultTree.addChild(new HashSet(), serviceType);
+}
+String serviceComponentType = Resource.Type.Component.name();
+TreeNode serviceComponentNode = resultTree.getChild(
+  serviceType + "/" + serviceComponentType);
+if (serviceComponentNode == null) {
+  serviceComponentNode = serviceNode.addChild(new HashSet(), 
serviceComponentType);
+}
+serviceComponentNode.getObject().add("ServiceComponentInfo/cluster_name");
+serviceComponentNode.getObject().add("ServiceComponentInfo/service_name");
+
serviceComponentNode.getObject().add("ServiceComponentInfo/component_name");
+
serviceComponentNode.getObject().add("ServiceComponentInfo/recovery_enabled");
 
 String hostType = Resource.Type.Host.name();
 String hostComponentType = Resource.Type.HostComponent.name();
@@ -214,9 +228,119 @@ public class ClusterBlueprintRenderer extends 
BaseRenderer implements Renderer {
 
 blueprintResource.setProperty("configurations", 
processConfigurations(topology));
 
+//Fetch settings section for blueprint
+blueprintResource.setProperty("settings", getSettings(clusterNode));
+
 return blueprintResource;
   }
 
+  /***
+   * Constructs the Settings object of the following form:
+   * "settings": [   {
+   "recovery_settings": [
+   {
+   "recovery_enabled": "true"
+   }   ]   },
+   {
+   "service_settings": [   {
+   "name": "HDFS",
+   "recovery_enabled": "true",
+   "credential_store_enabled": "true"
+   },
+   {
+   "name": "TEZ",
+   "recovery_enabled": "false"
+   },
+   {
+   "name": "HIVE",
+   "recovery_enabled": "false"
+   }   ]   },
+   {
+   "component_settings": [   {
+   "name": "DATANODE",
+   "recovery_enabled": "true"
+   }   ]   }   ]
+   *
+   * @param clusterNode
+   * @return A Collection> which represents the Setting 
Object
+   */
+  private Collection> getSettings(TreeNode 
clusterNode) {
+LOG.info("ClusterBlueprintRenderer: getSettings()");
+
+//Initialize collections to create appropriate json structure
+Collection> blueprintSetting = new 
ArrayList>();
+
+Set> recoverySettingValue = new HashSet>();
+Set> serviceSettingValue = new HashSet>();
+Set> componentSettingValue = new HashSet>();
+
+HashMap property = new HashMap<>();
+HashMap componentProperty = new HashMap<>();
+Boolean globalRecoveryEnabled = false;
+
+//Fetch the services, to obtain ServiceInfo and ServiceComponents
+Collection serviceChildren = 
clusterNode.getChild("services").getChildren();
+for (TreeNode serviceNode : 

ambari git commit: AMBARI-19909. Export Blueprints does not contain the settings object and hence the credential store values (Madhuvanthi Radhakrishnan via smohanty)

2017-02-09 Thread smohanty
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 f425159e3 -> f4e65c276


AMBARI-19909. Export Blueprints does not contain the settings object and hence 
the credential store values (Madhuvanthi Radhakrishnan via smohanty)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f4e65c27
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f4e65c27
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f4e65c27

Branch: refs/heads/branch-2.5
Commit: f4e65c2769751e290e58951cb144b67b33678892
Parents: f425159
Author: Sumit Mohanty 
Authored: Thu Feb 9 18:39:22 2017 -0800
Committer: Sumit Mohanty 
Committed: Thu Feb 9 18:39:22 2017 -0800

--
 .../query/render/ClusterBlueprintRenderer.java  | 124 
 .../render/ClusterBlueprintRendererTest.java| 143 +++
 2 files changed, 267 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f4e65c27/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRenderer.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRenderer.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRenderer.java
index 1a9ea91..77ccc24 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRenderer.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRenderer.java
@@ -109,6 +109,20 @@ public class ClusterBlueprintRenderer extends BaseRenderer 
implements Renderer {
 if (resultTree.getChild(serviceType) == null) {
   resultTree.addChild(new HashSet(), serviceType);
 }
+TreeNode serviceNode = resultTree.getChild(serviceType);
+if (serviceNode == null) {
+  serviceNode = resultTree.addChild(new HashSet(), serviceType);
+}
+String serviceComponentType = Resource.Type.Component.name();
+TreeNode serviceComponentNode = resultTree.getChild(
+  serviceType + "/" + serviceComponentType);
+if (serviceComponentNode == null) {
+  serviceComponentNode = serviceNode.addChild(new HashSet(), 
serviceComponentType);
+}
+serviceComponentNode.getObject().add("ServiceComponentInfo/cluster_name");
+serviceComponentNode.getObject().add("ServiceComponentInfo/service_name");
+
serviceComponentNode.getObject().add("ServiceComponentInfo/component_name");
+
serviceComponentNode.getObject().add("ServiceComponentInfo/recovery_enabled");
 
 String hostType = Resource.Type.Host.name();
 String hostComponentType = Resource.Type.HostComponent.name();
@@ -214,9 +228,119 @@ public class ClusterBlueprintRenderer extends 
BaseRenderer implements Renderer {
 
 blueprintResource.setProperty("configurations", 
processConfigurations(topology));
 
+//Fetch settings section for blueprint
+blueprintResource.setProperty("settings", getSettings(clusterNode));
+
 return blueprintResource;
   }
 
+  /***
+   * Constructs the Settings object of the following form:
+   * "settings": [   {
+   "recovery_settings": [
+   {
+   "recovery_enabled": "true"
+   }   ]   },
+   {
+   "service_settings": [   {
+   "name": "HDFS",
+   "recovery_enabled": "true",
+   "credential_store_enabled": "true"
+   },
+   {
+   "name": "TEZ",
+   "recovery_enabled": "false"
+   },
+   {
+   "name": "HIVE",
+   "recovery_enabled": "false"
+   }   ]   },
+   {
+   "component_settings": [   {
+   "name": "DATANODE",
+   "recovery_enabled": "true"
+   }   ]   }   ]
+   *
+   * @param clusterNode
+   * @return A Collection> which represents the Setting 
Object
+   */
+  private Collection> getSettings(TreeNode 
clusterNode) {
+LOG.info("ClusterBlueprintRenderer: getSettings()");
+
+//Initialize collections to create appropriate json structure
+Collection> blueprintSetting = new 
ArrayList>();
+
+Set> recoverySettingValue = new HashSet>();
+Set> serviceSettingValue = new HashSet>();
+Set> componentSettingValue = new HashSet>();
+
+HashMap property = new HashMap<>();
+HashMap componentProperty = new HashMap<>();
+Boolean globalRecoveryEnabled = false;
+
+//Fetch the services, to obtain ServiceInfo and ServiceComponents
+Collection serviceChildren = 
clusterNode.getChild("services").getChildren();
+for (TreeNode serviceNode : serviceChildren) {
+  ResourceImpl service = (ResourceImpl) 

[2/3] ambari git commit: AMBARI-19928. Solr grafana dashboards. (Willy Solaligue via yusaku)

2017-02-09 Thread yusaku
http://git-wip-us.apache.org/repos/asf/ambari/blob/f425159e/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-solr-cores-dashboard.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-solr-cores-dashboard.json
 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-solr-cores-dashboard.json
new file mode 100644
index 000..4529092
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-solr-cores-dashboard.json
@@ -0,0 +1,3162 @@
+{
+  "id": null,
+  "title": "Solr - Cores",
+  "originalTitle": "Solr - Cores",
+  "tags": ["solr"],
+  "style": "dark",
+  "timezone": "browser",
+  "editable": true,
+  "hideControls": false,
+  "sharedCrosshair": false,
+  "rows": [
+{
+  "collapse": false,
+  "editable": true,
+  "height": "25px",
+  "panels": [
+{
+  "content": "Solr Cores Dashboard",
+  "editable": true,
+  "error": false,
+  "height": "25px",
+  "id": 2,
+  "isNew": true,
+  "links": [],
+  "mode": "html",
+  "span": 12,
+  "style": {},
+  "title": "",
+  "type": "text"
+}
+  ],
+  "title": "Row"
+},
+{
+  "collapse": false,
+  "editable": true,
+  "height": "250px",
+  "panels": [
+{
+  "aliasColors": {},
+  "bars": false,
+  "datasource": null,
+  "editable": true,
+  "error": false,
+  "fill": 1,
+  "grid": {
+"leftLogBase": 1,
+"leftMax": null,
+"leftMin": null,
+"rightLogBase": 1,
+"rightMax": null,
+"rightMin": null,
+"threshold1": null,
+"threshold1Color": "rgba(216, 200, 27, 0.27)",
+"threshold2": null,
+"threshold2Color": "rgba(234, 112, 112, 0.22)",
+"thresholdLine": false
+  },
+  "height": "",
+  "id": 4,
+  "isNew": true,
+  "legend": {
+"alignAsTable": false,
+"avg": false,
+"current": false,
+"max": false,
+"min": false,
+"rightSide": false,
+"show": true,
+"total": false,
+"values": false
+  },
+  "lines": true,
+  "linewidth": 2,
+  "links": [],
+  "nullPointMode": "connected",
+  "percentage": false,
+  "pointradius": 5,
+  "points": false,
+  "renderer": "flot",
+  "seriesOverrides": [],
+  "span": 6,
+  "stack": false,
+  "steppedLine": false,
+  "targets": [
+{
+  "aggregator": "none",
+  "alias": "adds",
+  "app": "solr-core-app",
+  "downsampleAggregator": "avg",
+  "errors": {},
+  "hosts": "",
+  "metric": "solr.admin.mbeans.updateHandler.adds",
+  "precision": "default",
+  "refId": "A",
+  "seriesAggregator": "none",
+  "templatedHost": "",
+  "transform": "none"
+}
+  ],
+  "timeFrom": null,
+  "timeShift": null,
+  "title": "Indexing Throughput",
+  "tooltip": {
+"shared": true,
+"value_type": "cumulative"
+  },
+  "type": "graph",
+  "x-axis": true,
+  "y-axis": true,
+  "y_formats": [
+"none",
+"none"
+  ]
+},
+{
+  "aliasColors": {
+  },
+  "bars": false,
+  "datasource": null,
+  "editable": true,
+  "error": false,
+  "fill": 1,
+  "grid": {
+"leftLogBase": 1,
+"leftMax": null,
+"leftMin": null,
+"rightLogBase": 1,
+"rightMax": null,
+"rightMin": null,
+"threshold1": null,
+"threshold1Color": "rgba(216, 200, 27, 0.27)",
+"threshold2": null,
+"threshold2Color": "rgba(234, 112, 112, 0.22)"
+  },
+  "id": 5,
+  "isNew": true,
+  "legend": {
+"avg": false,
+"current": false,
+"max": false,
+"min": false,
+"show": true,
+"total": false,
+"values": false
+  },
+  "lines": true,
+  "linewidth": 2,
+  "links": [],
+  "nullPointMode": "connected",
+  "percentage": false,
+  "pointradius": 5,
+  "points": false,
+  "renderer": "flot",
+   

[3/3] ambari git commit: AMBARI-19928. Solr grafana dashboards. (Willy Solaligue via yusaku)

2017-02-09 Thread yusaku
AMBARI-19928. Solr grafana dashboards. (Willy Solaligue via yusaku)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f425159e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f425159e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f425159e

Branch: refs/heads/branch-2.5
Commit: f425159e3933e60f6f453d3c5a1cab8f3766b027
Parents: 52e9253
Author: Yusaku Sako 
Authored: Thu Feb 9 16:49:03 2017 -0800
Committer: Yusaku Sako 
Committed: Thu Feb 9 16:49:52 2017 -0800

--
 .../HDP/grafana-solr-cores-dashboard.json   | 3162 ++
 .../HDP/grafana-solr-hosts-dashboard.json   |  538 +++
 2 files changed, 3700 insertions(+)
--




[1/3] ambari git commit: AMBARI-19928. Solr grafana dashboards. (Willy Solaligue via yusaku)

2017-02-09 Thread yusaku
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 52e9253bb -> f425159e3


http://git-wip-us.apache.org/repos/asf/ambari/blob/f425159e/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-solr-hosts-dashboard.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-solr-hosts-dashboard.json
 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-solr-hosts-dashboard.json
new file mode 100644
index 000..6ae1b22
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-solr-hosts-dashboard.json
@@ -0,0 +1,538 @@
+{
+  "id": null,
+  "title": "Solr - Hosts",
+  "originalTitle": "Solr - Hosts",
+  "tags": ["solr"],
+  "style": "dark",
+  "timezone": "browser",
+  "editable": true,
+  "hideControls": false,
+  "sharedCrosshair": false,
+  "rows": [
+{
+  "collapse": false,
+  "editable": true,
+  "height": "25px",
+  "panels": [
+{
+  "content": "Solr Hosts Dashboard",
+  "editable": true,
+  "error": false,
+  "height": "25px",
+  "id": 3,
+  "isNew": true,
+  "links": [],
+  "mode": "html",
+  "span": 12,
+  "style": {},
+  "title": "",
+  "type": "text"
+}
+  ],
+  "title": "Row"
+},
+{
+  "collapse": false,
+  "editable": true,
+  "height": "250px",
+  "panels": [
+{
+  "aliasColors": {},
+  "bars": false,
+  "datasource": null,
+  "editable": true,
+  "error": false,
+  "fill": 1,
+  "grid": {
+"leftLogBase": 1,
+"leftMax": null,
+"leftMin": null,
+"rightLogBase": 1,
+"rightMax": null,
+"rightMin": null,
+"threshold1": null,
+"threshold1Color": "rgba(216, 200, 27, 0.27)",
+"threshold2": null,
+"threshold2Color": "rgba(234, 112, 112, 0.22)"
+  },
+  "id": 1,
+  "isNew": true,
+  "legend": {
+"avg": false,
+"current": false,
+"max": false,
+"min": false,
+"show": true,
+"total": false,
+"values": false
+  },
+  "lines": true,
+  "linewidth": 2,
+  "links": [],
+  "nullPointMode": "connected",
+  "percentage": false,
+  "pointradius": 5,
+  "points": false,
+  "renderer": "flot",
+  "repeat": null,
+  "seriesOverrides": [],
+  "span": 6,
+  "stack": false,
+  "steppedLine": false,
+  "targets": [
+{
+  "aggregator": "none",
+  "app": "solr-host-app",
+  "downsampleAggregator": "avg",
+  "errors": {},
+  "hide": false,
+  "metric": "solr.admin.info.system.processCpuLoad",
+  "precision": "default",
+  "refId": "A",
+  "seriesAggregator": "none",
+  "templatedHost": "",
+  "transform": "none"
+}
+  ],
+  "timeFrom": null,
+  "timeShift": null,
+  "title": "Solr CPU Utilization",
+  "tooltip": {
+"shared": true,
+"value_type": "cumulative"
+  },
+  "transparent": false,
+  "type": "graph",
+  "x-axis": true,
+  "y-axis": true,
+  "y_formats": [
+"percentunit",
+"percent"
+  ]
+},
+{
+  "aliasColors": {},
+  "bars": false,
+  "datasource": null,
+  "editable": true,
+  "error": false,
+  "fill": 1,
+  "grid": {
+"leftLogBase": 1,
+"leftMax": null,
+"leftMin": null,
+"rightLogBase": 1,
+"rightMax": null,
+"rightMin": null,
+"threshold1": null,
+"threshold1Color": "rgba(216, 200, 27, 0.27)",
+"threshold2": null,
+"threshold2Color": "rgba(234, 112, 112, 0.22)"
+  },
+  "id": 2,
+  "isNew": true,
+  "legend": {
+"avg": false,
+"current": false,
+"max": false,
+"min": false,
+"show": true,
+"total": false,
+"values": false
+  },
+  "lines": true,
+  "linewidth": 2,
+  "links": [],
+  "nullPointMode": "connected",
+  "percentage": false,
+  "pointradius": 5,
+  "points": false,
+  "renderer": "flot",
+  

[1/3] ambari git commit: AMBARI-19928. Solr grafana dashboards. (Willy Solaligue via yusaku)

2017-02-09 Thread yusaku
Repository: ambari
Updated Branches:
  refs/heads/trunk 05ce603a9 -> 00ed41594


http://git-wip-us.apache.org/repos/asf/ambari/blob/00ed4159/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-solr-hosts-dashboard.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-solr-hosts-dashboard.json
 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-solr-hosts-dashboard.json
new file mode 100644
index 000..6ae1b22
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-solr-hosts-dashboard.json
@@ -0,0 +1,538 @@
+{
+  "id": null,
+  "title": "Solr - Hosts",
+  "originalTitle": "Solr - Hosts",
+  "tags": ["solr"],
+  "style": "dark",
+  "timezone": "browser",
+  "editable": true,
+  "hideControls": false,
+  "sharedCrosshair": false,
+  "rows": [
+{
+  "collapse": false,
+  "editable": true,
+  "height": "25px",
+  "panels": [
+{
+  "content": "Solr Hosts Dashboard",
+  "editable": true,
+  "error": false,
+  "height": "25px",
+  "id": 3,
+  "isNew": true,
+  "links": [],
+  "mode": "html",
+  "span": 12,
+  "style": {},
+  "title": "",
+  "type": "text"
+}
+  ],
+  "title": "Row"
+},
+{
+  "collapse": false,
+  "editable": true,
+  "height": "250px",
+  "panels": [
+{
+  "aliasColors": {},
+  "bars": false,
+  "datasource": null,
+  "editable": true,
+  "error": false,
+  "fill": 1,
+  "grid": {
+"leftLogBase": 1,
+"leftMax": null,
+"leftMin": null,
+"rightLogBase": 1,
+"rightMax": null,
+"rightMin": null,
+"threshold1": null,
+"threshold1Color": "rgba(216, 200, 27, 0.27)",
+"threshold2": null,
+"threshold2Color": "rgba(234, 112, 112, 0.22)"
+  },
+  "id": 1,
+  "isNew": true,
+  "legend": {
+"avg": false,
+"current": false,
+"max": false,
+"min": false,
+"show": true,
+"total": false,
+"values": false
+  },
+  "lines": true,
+  "linewidth": 2,
+  "links": [],
+  "nullPointMode": "connected",
+  "percentage": false,
+  "pointradius": 5,
+  "points": false,
+  "renderer": "flot",
+  "repeat": null,
+  "seriesOverrides": [],
+  "span": 6,
+  "stack": false,
+  "steppedLine": false,
+  "targets": [
+{
+  "aggregator": "none",
+  "app": "solr-host-app",
+  "downsampleAggregator": "avg",
+  "errors": {},
+  "hide": false,
+  "metric": "solr.admin.info.system.processCpuLoad",
+  "precision": "default",
+  "refId": "A",
+  "seriesAggregator": "none",
+  "templatedHost": "",
+  "transform": "none"
+}
+  ],
+  "timeFrom": null,
+  "timeShift": null,
+  "title": "Solr CPU Utilization",
+  "tooltip": {
+"shared": true,
+"value_type": "cumulative"
+  },
+  "transparent": false,
+  "type": "graph",
+  "x-axis": true,
+  "y-axis": true,
+  "y_formats": [
+"percentunit",
+"percent"
+  ]
+},
+{
+  "aliasColors": {},
+  "bars": false,
+  "datasource": null,
+  "editable": true,
+  "error": false,
+  "fill": 1,
+  "grid": {
+"leftLogBase": 1,
+"leftMax": null,
+"leftMin": null,
+"rightLogBase": 1,
+"rightMax": null,
+"rightMin": null,
+"threshold1": null,
+"threshold1Color": "rgba(216, 200, 27, 0.27)",
+"threshold2": null,
+"threshold2Color": "rgba(234, 112, 112, 0.22)"
+  },
+  "id": 2,
+  "isNew": true,
+  "legend": {
+"avg": false,
+"current": false,
+"max": false,
+"min": false,
+"show": true,
+"total": false,
+"values": false
+  },
+  "lines": true,
+  "linewidth": 2,
+  "links": [],
+  "nullPointMode": "connected",
+  "percentage": false,
+  "pointradius": 5,
+  "points": false,
+  "renderer": "flot",
+  

[2/3] ambari git commit: AMBARI-19928. Solr grafana dashboards. (Willy Solaligue via yusaku)

2017-02-09 Thread yusaku
http://git-wip-us.apache.org/repos/asf/ambari/blob/00ed4159/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-solr-cores-dashboard.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-solr-cores-dashboard.json
 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-solr-cores-dashboard.json
new file mode 100644
index 000..4529092
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-solr-cores-dashboard.json
@@ -0,0 +1,3162 @@
+{
+  "id": null,
+  "title": "Solr - Cores",
+  "originalTitle": "Solr - Cores",
+  "tags": ["solr"],
+  "style": "dark",
+  "timezone": "browser",
+  "editable": true,
+  "hideControls": false,
+  "sharedCrosshair": false,
+  "rows": [
+{
+  "collapse": false,
+  "editable": true,
+  "height": "25px",
+  "panels": [
+{
+  "content": "Solr Cores Dashboard",
+  "editable": true,
+  "error": false,
+  "height": "25px",
+  "id": 2,
+  "isNew": true,
+  "links": [],
+  "mode": "html",
+  "span": 12,
+  "style": {},
+  "title": "",
+  "type": "text"
+}
+  ],
+  "title": "Row"
+},
+{
+  "collapse": false,
+  "editable": true,
+  "height": "250px",
+  "panels": [
+{
+  "aliasColors": {},
+  "bars": false,
+  "datasource": null,
+  "editable": true,
+  "error": false,
+  "fill": 1,
+  "grid": {
+"leftLogBase": 1,
+"leftMax": null,
+"leftMin": null,
+"rightLogBase": 1,
+"rightMax": null,
+"rightMin": null,
+"threshold1": null,
+"threshold1Color": "rgba(216, 200, 27, 0.27)",
+"threshold2": null,
+"threshold2Color": "rgba(234, 112, 112, 0.22)",
+"thresholdLine": false
+  },
+  "height": "",
+  "id": 4,
+  "isNew": true,
+  "legend": {
+"alignAsTable": false,
+"avg": false,
+"current": false,
+"max": false,
+"min": false,
+"rightSide": false,
+"show": true,
+"total": false,
+"values": false
+  },
+  "lines": true,
+  "linewidth": 2,
+  "links": [],
+  "nullPointMode": "connected",
+  "percentage": false,
+  "pointradius": 5,
+  "points": false,
+  "renderer": "flot",
+  "seriesOverrides": [],
+  "span": 6,
+  "stack": false,
+  "steppedLine": false,
+  "targets": [
+{
+  "aggregator": "none",
+  "alias": "adds",
+  "app": "solr-core-app",
+  "downsampleAggregator": "avg",
+  "errors": {},
+  "hosts": "",
+  "metric": "solr.admin.mbeans.updateHandler.adds",
+  "precision": "default",
+  "refId": "A",
+  "seriesAggregator": "none",
+  "templatedHost": "",
+  "transform": "none"
+}
+  ],
+  "timeFrom": null,
+  "timeShift": null,
+  "title": "Indexing Throughput",
+  "tooltip": {
+"shared": true,
+"value_type": "cumulative"
+  },
+  "type": "graph",
+  "x-axis": true,
+  "y-axis": true,
+  "y_formats": [
+"none",
+"none"
+  ]
+},
+{
+  "aliasColors": {
+  },
+  "bars": false,
+  "datasource": null,
+  "editable": true,
+  "error": false,
+  "fill": 1,
+  "grid": {
+"leftLogBase": 1,
+"leftMax": null,
+"leftMin": null,
+"rightLogBase": 1,
+"rightMax": null,
+"rightMin": null,
+"threshold1": null,
+"threshold1Color": "rgba(216, 200, 27, 0.27)",
+"threshold2": null,
+"threshold2Color": "rgba(234, 112, 112, 0.22)"
+  },
+  "id": 5,
+  "isNew": true,
+  "legend": {
+"avg": false,
+"current": false,
+"max": false,
+"min": false,
+"show": true,
+"total": false,
+"values": false
+  },
+  "lines": true,
+  "linewidth": 2,
+  "links": [],
+  "nullPointMode": "connected",
+  "percentage": false,
+  "pointradius": 5,
+  "points": false,
+  "renderer": "flot",
+   

[3/3] ambari git commit: AMBARI-19928. Solr grafana dashboards. (Willy Solaligue via yusaku)

2017-02-09 Thread yusaku
AMBARI-19928. Solr grafana dashboards. (Willy Solaligue via yusaku)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/00ed4159
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/00ed4159
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/00ed4159

Branch: refs/heads/trunk
Commit: 00ed41594fdd03c7da715904efec522748c1e3bd
Parents: 05ce603
Author: Yusaku Sako 
Authored: Thu Feb 9 16:49:03 2017 -0800
Committer: Yusaku Sako 
Committed: Thu Feb 9 16:49:03 2017 -0800

--
 .../HDP/grafana-solr-cores-dashboard.json   | 3162 ++
 .../HDP/grafana-solr-hosts-dashboard.json   |  538 +++
 2 files changed, 3700 insertions(+)
--




ambari git commit: AMBARI-19945. IE11 Layout for password widgets is broken (alexantonenko)

2017-02-09 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 b7eca31d5 -> 52e9253bb


AMBARI-19945. IE11 Layout for password widgets is broken (alexantonenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/52e9253b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/52e9253b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/52e9253b

Branch: refs/heads/branch-2.5
Commit: 52e9253bba04373a2692af7fe5e7d606b532655b
Parents: b7eca31
Author: Alex Antonenko 
Authored: Thu Feb 9 18:52:23 2017 +0200
Committer: Alex Antonenko 
Committed: Fri Feb 10 02:46:26 2017 +0200

--
 ambari-web/app/styles/widgets.less | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/52e9253b/ambari-web/app/styles/widgets.less
--
diff --git a/ambari-web/app/styles/widgets.less 
b/ambari-web/app/styles/widgets.less
index 263736d..02a7f33 100644
--- a/ambari-web/app/styles/widgets.less
+++ b/ambari-web/app/styles/widgets.less
@@ -463,7 +463,7 @@
   padding: 0;
   color: @green;
   &:focus {
-border-color: none;
+border-color: transparent;
 box-shadow: 0;
 outline: 0 none;
   }
@@ -482,6 +482,14 @@
   }
 }
 
+.widget-config {
+  .text-field-wrapper {
+input {
+  display: inline-block;
+}
+  }
+}
+
 #serviceConfig {
   .text-field-widget {
 .with-unit input {



[2/2] ambari git commit: AMBARI-19758 : Post Ambari upgrade AMS config properties changes are marking HDFS/YARN/Hive/HBase with restart required. (avijayan)

2017-02-09 Thread avijayan
AMBARI-19758 : Post Ambari upgrade AMS config properties changes are marking 
HDFS/YARN/Hive/HBase with restart required. (avijayan)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/05ce603a
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/05ce603a
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/05ce603a

Branch: refs/heads/trunk
Commit: 05ce603a9fa5a6a72af4de70cbc21208f6749384
Parents: 7abf4e6
Author: Aravindan Vijayan 
Authored: Thu Feb 9 13:45:57 2017 -0800
Committer: Aravindan Vijayan 
Committed: Thu Feb 9 13:45:57 2017 -0800

--
 .../hadoop-metrics2.properties.xml  | 125 ---
 .../common-services/HDFS/2.1.0.2.0/metainfo.xml |   1 -
 .../2.0.6/hooks/before-START/scripts/params.py  |   4 +-
 .../scripts/shared_initialization.py|  17 ++-
 .../hadoop-metrics2.properties.xml  | 125 +++
 .../stacks/HDP/2.6/services/HDFS/metainfo.xml   |   3 +
 .../PERF/1.0/services/FAKEHDFS/metainfo.xml |   1 -
 7 files changed, 143 insertions(+), 133 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/05ce603a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-metrics2.properties.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-metrics2.properties.xml
 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-metrics2.properties.xml
deleted file mode 100644
index 6b45e84..000
--- 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-metrics2.properties.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
-
-  
-  
-content
-hadoop-metrics2.properties template
-This is the jinja template for hadoop-metrics2.properties 
file
-
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# syntax: [prefix].[source|sink|jmx].[instance].[options]
-# See package.html for org.apache.hadoop.metrics2 for details
-
-{% if has_ganglia_server %}
-*.period=60
-
-*.sink.ganglia.class=org.apache.hadoop.metrics2.sink.ganglia.GangliaSink31
-*.sink.ganglia.period=10
-
-# default for supportsparse is false
-*.sink.ganglia.supportsparse=true
-
-.sink.ganglia.slope=jvm.metrics.gcCount=zero,jvm.metrics.memHeapUsedM=both
-.sink.ganglia.dmax=jvm.metrics.threadsBlocked=70,jvm.metrics.memHeapUsedM=40
-
-# Hook up to the server
-namenode.sink.ganglia.servers={{ganglia_server_host}}:8661
-datanode.sink.ganglia.servers={{ganglia_server_host}}:8659
-jobtracker.sink.ganglia.servers={{ganglia_server_host}}:8662
-tasktracker.sink.ganglia.servers={{ganglia_server_host}}:8658
-maptask.sink.ganglia.servers={{ganglia_server_host}}:8660
-reducetask.sink.ganglia.servers={{ganglia_server_host}}:8660
-resourcemanager.sink.ganglia.servers={{ganglia_server_host}}:8664
-nodemanager.sink.ganglia.servers={{ganglia_server_host}}:8657
-historyserver.sink.ganglia.servers={{ganglia_server_host}}:8666
-journalnode.sink.ganglia.servers={{ganglia_server_host}}:8654
-nimbus.sink.ganglia.servers={{ganglia_server_host}}:8649
-supervisor.sink.ganglia.servers={{ganglia_server_host}}:8650
-
-resourcemanager.sink.ganglia.tagsForPrefix.yarn=Queue
-
-{% endif %}
-
-{% if has_metric_collector %}
-
-*.period={{metrics_collection_period}}
-*.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={{metrics_collection_period}}
-*.sink.timeline.sendInterval={{metrics_report_interval}}000
-*.sink.timeline.slave.host.name={{hostname}}
-*.sink.timeline.zookeeper.quorum={{zookeeper_quorum}}
-*.sink.timeline.protocol={{metric_collector_protocol}}
-*.sink.timeline.port={{metric_collector_port}}
-
-# HTTPS properties
-*.sink.timeline.truststore.path = {{metric_truststore_path}}
-*.sink.timeline.truststore.type = 

[1/2] ambari git commit: AMBARI-19887 : Add AMS and Grafana to PERF cluster (Addendum patch) (avijayan)

2017-02-09 Thread avijayan
Repository: ambari
Updated Branches:
  refs/heads/trunk 3c0f3c46b -> 05ce603a9


AMBARI-19887 : Add AMS and Grafana to PERF cluster (Addendum patch) (avijayan)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7abf4e63
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7abf4e63
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7abf4e63

Branch: refs/heads/trunk
Commit: 7abf4e63f093d55c793b451d0435fc485757e6c7
Parents: 3c0f3c4
Author: Aravindan Vijayan 
Authored: Thu Feb 9 13:45:33 2017 -0800
Committer: Aravindan Vijayan 
Committed: Thu Feb 9 13:45:33 2017 -0800

--
 .../0.1.0/package/scripts/params.py |  6 +++---
 .../PERF/1.0/hooks/before-ANY/scripts/hook.py   |  6 --
 .../PERF/1.0/hooks/before-ANY/scripts/params.py |  2 ++
 .../1.0/hooks/before-INSTALL/scripts/hook.py|  1 +
 .../1.0/hooks/before-RESTART/scripts/hook.py|  1 +
 .../1.0/services/AMBARI_METRICS/metainfo.xml| 20 
 6 files changed, 31 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7abf4e63/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py
index dcc26b7..fcfe088 100644
--- 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py
@@ -67,9 +67,9 @@ if not is_ams_distributed and len(ams_collector_list) > 1:
 
 if 'cluster-env' in config['configurations'] and \
 'metrics_collector_vip_host' in config['configurations']['cluster-env']:
-  metric_collector_host = 
config['configurations']['cluster-env']['metrics_collector_vip_host']
-else:
-  metric_collector_host = 
select_metric_collector_hosts_from_hostnames(ams_collector_hosts)
+  ams_collector_hosts = 
config['configurations']['cluster-env']['metrics_collector_vip_host']
+
+metric_collector_host = 
select_metric_collector_hosts_from_hostnames(ams_collector_hosts)
 
 random_metric_collector_host = 
select_metric_collector_hosts_from_hostnames(ams_collector_hosts)
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/7abf4e63/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-ANY/scripts/hook.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-ANY/scripts/hook.py
 
b/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-ANY/scripts/hook.py
index ef409e2..d707c3b 100644
--- 
a/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-ANY/scripts/hook.py
+++ 
b/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-ANY/scripts/hook.py
@@ -28,8 +28,10 @@ class BeforeAnyHook(Hook):
 env.set_params(params)
 
 #For AMS.
-setup_users()
-setup_java()
+if params.service_name == 'AMBARI_METRICS':
+  setup_users()
+  if params.component_name == 'METRICS_COLLECTOR':
+setup_java()
 
 if __name__ == "__main__":
   BeforeAnyHook().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/7abf4e63/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-ANY/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-ANY/scripts/params.py
 
b/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-ANY/scripts/params.py
index dee9d07..2c2c901 100644
--- 
a/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-ANY/scripts/params.py
+++ 
b/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-ANY/scripts/params.py
@@ -39,4 +39,6 @@ artifact_dir = format("{tmp_dir}/AMBARI-artifacts/")
 jdk_location = config['hostLevelParams']['jdk_location']
 java_version = expect("/hostLevelParams/java_version", int)
 
+service_name = config["serviceName"]
+component_name = config["role"]
 sudo = AMBARI_SUDO_BINARY
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/7abf4e63/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-INSTALL/scripts/hook.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-INSTALL/scripts/hook.py
 
b/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-INSTALL/scripts/hook.py
index f030cfc..833fdbc 100644
--- 

[1/2] ambari git commit: AMBARI-19887 : Add AMS and Grafana to PERF cluster (Addendum patch) (avijayan)

2017-02-09 Thread avijayan
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 d57dc455b -> b7eca31d5


AMBARI-19887 : Add AMS and Grafana to PERF cluster (Addendum patch) (avijayan)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a70cdd96
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a70cdd96
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a70cdd96

Branch: refs/heads/branch-2.5
Commit: a70cdd9668a402fbcc6f087ef6bbb7a923237660
Parents: d57dc45
Author: Aravindan Vijayan 
Authored: Thu Feb 9 13:40:54 2017 -0800
Committer: Aravindan Vijayan 
Committed: Thu Feb 9 13:40:54 2017 -0800

--
 .../0.1.0/package/scripts/params.py |  6 +++---
 .../PERF/1.0/hooks/before-ANY/scripts/hook.py   |  6 --
 .../PERF/1.0/hooks/before-ANY/scripts/params.py |  2 ++
 .../1.0/hooks/before-INSTALL/scripts/hook.py|  1 +
 .../1.0/hooks/before-RESTART/scripts/hook.py|  1 +
 .../1.0/services/AMBARI_METRICS/metainfo.xml| 20 
 6 files changed, 31 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a70cdd96/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py
index c547bd4..3276cc1 100644
--- 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py
@@ -62,9 +62,9 @@ if not is_ams_distributed and len(ams_collector_list) > 1:
 
 if 'cluster-env' in config['configurations'] and \
 'metrics_collector_vip_host' in config['configurations']['cluster-env']:
-  metric_collector_host = 
config['configurations']['cluster-env']['metrics_collector_vip_host']
-else:
-  metric_collector_host = 
select_metric_collector_hosts_from_hostnames(ams_collector_hosts)
+  ams_collector_hosts = 
config['configurations']['cluster-env']['metrics_collector_vip_host']
+
+metric_collector_host = 
select_metric_collector_hosts_from_hostnames(ams_collector_hosts)
 
 random_metric_collector_host = 
select_metric_collector_hosts_from_hostnames(ams_collector_hosts)
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/a70cdd96/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-ANY/scripts/hook.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-ANY/scripts/hook.py
 
b/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-ANY/scripts/hook.py
index ef409e2..d707c3b 100644
--- 
a/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-ANY/scripts/hook.py
+++ 
b/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-ANY/scripts/hook.py
@@ -28,8 +28,10 @@ class BeforeAnyHook(Hook):
 env.set_params(params)
 
 #For AMS.
-setup_users()
-setup_java()
+if params.service_name == 'AMBARI_METRICS':
+  setup_users()
+  if params.component_name == 'METRICS_COLLECTOR':
+setup_java()
 
 if __name__ == "__main__":
   BeforeAnyHook().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/a70cdd96/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-ANY/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-ANY/scripts/params.py
 
b/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-ANY/scripts/params.py
index dee9d07..2c2c901 100644
--- 
a/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-ANY/scripts/params.py
+++ 
b/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-ANY/scripts/params.py
@@ -39,4 +39,6 @@ artifact_dir = format("{tmp_dir}/AMBARI-artifacts/")
 jdk_location = config['hostLevelParams']['jdk_location']
 java_version = expect("/hostLevelParams/java_version", int)
 
+service_name = config["serviceName"]
+component_name = config["role"]
 sudo = AMBARI_SUDO_BINARY
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/a70cdd96/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-INSTALL/scripts/hook.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-INSTALL/scripts/hook.py
 
b/ambari-server/src/main/resources/stacks/PERF/1.0/hooks/before-INSTALL/scripts/hook.py
index f030cfc..833fdbc 100644
--- 

[2/2] ambari git commit: AMBARI-19758 : Post Ambari upgrade AMS config properties changes are marking HDFS/YARN/Hive/HBase with restart required. (avijayan)

2017-02-09 Thread avijayan
AMBARI-19758 : Post Ambari upgrade AMS config properties changes are marking 
HDFS/YARN/Hive/HBase with restart required. (avijayan)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b7eca31d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b7eca31d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b7eca31d

Branch: refs/heads/branch-2.5
Commit: b7eca31d5116428ea8f4b0a9bce0dde29ff57863
Parents: a70cdd9
Author: Aravindan Vijayan 
Authored: Thu Feb 9 13:41:34 2017 -0800
Committer: Aravindan Vijayan 
Committed: Thu Feb 9 13:41:34 2017 -0800

--
 .../hadoop-metrics2.properties.xml  | 125 ---
 .../common-services/HDFS/2.1.0.2.0/metainfo.xml |   1 -
 .../2.0.6/hooks/before-START/scripts/params.py  |   4 +-
 .../scripts/shared_initialization.py|  17 ++-
 .../hadoop-metrics2.properties.xml  | 125 +++
 .../stacks/HDP/2.6/services/HDFS/metainfo.xml   |   3 +
 .../PERF/1.0/services/FAKEHDFS/metainfo.xml |   1 -
 7 files changed, 143 insertions(+), 133 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b7eca31d/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-metrics2.properties.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-metrics2.properties.xml
 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-metrics2.properties.xml
deleted file mode 100644
index 6b45e84..000
--- 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-metrics2.properties.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
-
-  
-  
-content
-hadoop-metrics2.properties template
-This is the jinja template for hadoop-metrics2.properties 
file
-
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# syntax: [prefix].[source|sink|jmx].[instance].[options]
-# See package.html for org.apache.hadoop.metrics2 for details
-
-{% if has_ganglia_server %}
-*.period=60
-
-*.sink.ganglia.class=org.apache.hadoop.metrics2.sink.ganglia.GangliaSink31
-*.sink.ganglia.period=10
-
-# default for supportsparse is false
-*.sink.ganglia.supportsparse=true
-
-.sink.ganglia.slope=jvm.metrics.gcCount=zero,jvm.metrics.memHeapUsedM=both
-.sink.ganglia.dmax=jvm.metrics.threadsBlocked=70,jvm.metrics.memHeapUsedM=40
-
-# Hook up to the server
-namenode.sink.ganglia.servers={{ganglia_server_host}}:8661
-datanode.sink.ganglia.servers={{ganglia_server_host}}:8659
-jobtracker.sink.ganglia.servers={{ganglia_server_host}}:8662
-tasktracker.sink.ganglia.servers={{ganglia_server_host}}:8658
-maptask.sink.ganglia.servers={{ganglia_server_host}}:8660
-reducetask.sink.ganglia.servers={{ganglia_server_host}}:8660
-resourcemanager.sink.ganglia.servers={{ganglia_server_host}}:8664
-nodemanager.sink.ganglia.servers={{ganglia_server_host}}:8657
-historyserver.sink.ganglia.servers={{ganglia_server_host}}:8666
-journalnode.sink.ganglia.servers={{ganglia_server_host}}:8654
-nimbus.sink.ganglia.servers={{ganglia_server_host}}:8649
-supervisor.sink.ganglia.servers={{ganglia_server_host}}:8650
-
-resourcemanager.sink.ganglia.tagsForPrefix.yarn=Queue
-
-{% endif %}
-
-{% if has_metric_collector %}
-
-*.period={{metrics_collection_period}}
-*.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={{metrics_collection_period}}
-*.sink.timeline.sendInterval={{metrics_report_interval}}000
-*.sink.timeline.slave.host.name={{hostname}}
-*.sink.timeline.zookeeper.quorum={{zookeeper_quorum}}
-*.sink.timeline.protocol={{metric_collector_protocol}}
-*.sink.timeline.port={{metric_collector_port}}
-
-# HTTPS properties
-*.sink.timeline.truststore.path = {{metric_truststore_path}}
-*.sink.timeline.truststore.type = 

ambari git commit: AMBARI-19870. Add Superset as a UI for Druid in HDP (Nishant Bangarwa via smohanty)

2017-02-09 Thread smohanty
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 2ea4a0328 -> d57dc455b


AMBARI-19870. Add Superset as a UI for Druid in HDP (Nishant Bangarwa via 
smohanty)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d57dc455
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d57dc455
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d57dc455

Branch: refs/heads/branch-2.5
Commit: d57dc455b73829ab7c5e72dcc34920dbc308da87
Parents: 2ea4a03
Author: Sumit Mohanty 
Authored: Thu Feb 9 12:32:17 2017 -0800
Committer: Sumit Mohanty 
Committed: Thu Feb 9 12:33:14 2017 -0800

--
 .../DRUID/0.9.2/configuration/druid-common.xml  |  10 +-
 .../0.9.2/configuration/druid-superset-env.xml  | 115 
 .../0.9.2/configuration/druid-superset.xml  | 178 +++
 .../common-services/DRUID/0.9.2/metainfo.xml|  26 ++-
 .../DRUID/0.9.2/package/scripts/params.py   |  45 -
 .../0.9.2/package/scripts/status_params.py  |   2 +
 .../DRUID/0.9.2/package/scripts/superset.py | 153 
 .../DRUID/0.9.2/package/templates/superset.sh   |  95 ++
 .../DRUID/0.9.2/quicklinks/quicklinks.json  |  13 ++
 .../DRUID/0.9.2/role_command_order.json |  18 ++
 .../DRUID/0.9.2/themes/theme.json   |  84 -
 .../stacks/HDP/2.6/role_command_order.json  |  19 --
 .../stacks/HDP/2.6/services/DRUID/kerberos.json |  33 
 .../stacks/HDP/2.6/services/stack_advisor.py|  11 ++
 .../test/python/stacks/2.6/configs/default.json |   3 +
 15 files changed, 774 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d57dc455/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-common.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-common.xml
 
b/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-common.xml
index a494750..d3b53cd 100644
--- 
a/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-common.xml
+++ 
b/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-common.xml
@@ -132,20 +132,20 @@
   
 database_name
 druid
-Metadata storage database name
-Metadata storage database name
+Druid Metadata storage database name
+Druid Metadata storage database name
 
   
   
 metastore_hostname
 localhost
-Metadata storage hostname name
-Metadata storage hostname name
+Metadata storage hostname
+Metadata storage hostname
 
   
   
 druid.metadata.storage.type
-Metadata storage type
+Druid Metadata storage type
 derby
 
   false

http://git-wip-us.apache.org/repos/asf/ambari/blob/d57dc455/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-superset-env.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-superset-env.xml
 
b/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-superset-env.xml
new file mode 100644
index 000..61421c0
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-superset-env.xml
@@ -0,0 +1,115 @@
+
+
+
+
+  
+superset_log_dir
+/var/log/superset
+Superset log dir
+Superset log directory.
+
+  directory
+
+
+  
+  
+superset_pid_dir
+/var/run/superset
+Superset pid dir
+Superset pid directory.
+
+  directory
+
+
+  
+  
+superset_admin_user
+admin
+Superset Admin Username
+
+  Superset Username. This value cannot be modified by Ambari
+  except on initial install. Please make sure the username change in
+  Superset is reflected in Ambari.
+
+
+  db_user
+  false
+
+
+  
+  
+superset_admin_password
+
+PASSWORD
+Superset Admin Password
+
+  Superset password. This value cannot be modified by Ambari
+  except on initial install. Please make sure the password change in
+  Superset is reflected back in Ambari.
+
+
+  false
+  password
+
+
+  
+  
+superset_admin_firstname
+
+
+  
+  
+superset_admin_lastname
+
+
+  
+  
+superset_admin_email
+
+
+  
+  
+content
+superset-env template
+
+  # Set environment variables here.
+
+  # Superset Home Dir
+  export SUPERSET_CONFIG_DIR={{superset_config_dir}}
+
+  # Superset Log Dir
+  export SUPERSET_LOG_DIR={{superset_log_dir}}
+
+  # 

ambari git commit: AMBARI-19870. Add Superset as a UI for Druid in HDP (Nishant Bangarwa via smohanty)

2017-02-09 Thread smohanty
Repository: ambari
Updated Branches:
  refs/heads/trunk d5755ba15 -> 3c0f3c46b


AMBARI-19870. Add Superset as a UI for Druid in HDP (Nishant Bangarwa via 
smohanty)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3c0f3c46
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3c0f3c46
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3c0f3c46

Branch: refs/heads/trunk
Commit: 3c0f3c46b97f00a24cf0711c43bc24df3ed6df84
Parents: d5755ba
Author: Sumit Mohanty 
Authored: Thu Feb 9 12:32:17 2017 -0800
Committer: Sumit Mohanty 
Committed: Thu Feb 9 12:32:17 2017 -0800

--
 .../DRUID/0.9.2/configuration/druid-common.xml  |  10 +-
 .../0.9.2/configuration/druid-superset-env.xml  | 115 
 .../0.9.2/configuration/druid-superset.xml  | 178 +++
 .../common-services/DRUID/0.9.2/metainfo.xml|  26 ++-
 .../DRUID/0.9.2/package/scripts/params.py   |  45 -
 .../0.9.2/package/scripts/status_params.py  |   2 +
 .../DRUID/0.9.2/package/scripts/superset.py | 153 
 .../DRUID/0.9.2/package/templates/superset.sh   |  95 ++
 .../DRUID/0.9.2/quicklinks/quicklinks.json  |  13 ++
 .../DRUID/0.9.2/role_command_order.json |  18 ++
 .../DRUID/0.9.2/themes/theme.json   |  84 -
 .../stacks/HDP/2.6/role_command_order.json  |  19 --
 .../stacks/HDP/2.6/services/DRUID/kerberos.json |  33 
 .../stacks/HDP/2.6/services/stack_advisor.py|  11 ++
 .../test/python/stacks/2.6/configs/default.json |   3 +
 15 files changed, 774 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3c0f3c46/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-common.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-common.xml
 
b/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-common.xml
index a494750..d3b53cd 100644
--- 
a/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-common.xml
+++ 
b/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-common.xml
@@ -132,20 +132,20 @@
   
 database_name
 druid
-Metadata storage database name
-Metadata storage database name
+Druid Metadata storage database name
+Druid Metadata storage database name
 
   
   
 metastore_hostname
 localhost
-Metadata storage hostname name
-Metadata storage hostname name
+Metadata storage hostname
+Metadata storage hostname
 
   
   
 druid.metadata.storage.type
-Metadata storage type
+Druid Metadata storage type
 derby
 
   false

http://git-wip-us.apache.org/repos/asf/ambari/blob/3c0f3c46/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-superset-env.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-superset-env.xml
 
b/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-superset-env.xml
new file mode 100644
index 000..61421c0
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-superset-env.xml
@@ -0,0 +1,115 @@
+
+
+
+
+  
+superset_log_dir
+/var/log/superset
+Superset log dir
+Superset log directory.
+
+  directory
+
+
+  
+  
+superset_pid_dir
+/var/run/superset
+Superset pid dir
+Superset pid directory.
+
+  directory
+
+
+  
+  
+superset_admin_user
+admin
+Superset Admin Username
+
+  Superset Username. This value cannot be modified by Ambari
+  except on initial install. Please make sure the username change in
+  Superset is reflected in Ambari.
+
+
+  db_user
+  false
+
+
+  
+  
+superset_admin_password
+
+PASSWORD
+Superset Admin Password
+
+  Superset password. This value cannot be modified by Ambari
+  except on initial install. Please make sure the password change in
+  Superset is reflected back in Ambari.
+
+
+  false
+  password
+
+
+  
+  
+superset_admin_firstname
+
+
+  
+  
+superset_admin_lastname
+
+
+  
+  
+superset_admin_email
+
+
+  
+  
+content
+superset-env template
+
+  # Set environment variables here.
+
+  # Superset Home Dir
+  export SUPERSET_CONFIG_DIR={{superset_config_dir}}
+
+  # Superset Log Dir
+  export SUPERSET_LOG_DIR={{superset_log_dir}}
+
+  # Superset 

svn commit: r1782381 - in /ambari/site: index.html install-0.9.html install.html irc.html issue-tracking.html license.html mail-lists.html privacy-policy.html project-info.html team-list.html whats-ne

2017-02-09 Thread yusaku
Author: yusaku
Date: Thu Feb  9 19:54:28 2017
New Revision: 1782381

URL: http://svn.apache.org/viewvc?rev=1782381=rev
Log:
Updated team page. (yuusaku)

Modified:
ambari/site/index.html
ambari/site/install-0.9.html
ambari/site/install.html
ambari/site/irc.html
ambari/site/issue-tracking.html
ambari/site/license.html
ambari/site/mail-lists.html
ambari/site/privacy-policy.html
ambari/site/project-info.html
ambari/site/team-list.html
ambari/site/whats-new.html

Modified: ambari/site/index.html
URL: 
http://svn.apache.org/viewvc/ambari/site/index.html?rev=1782381=1782380=1782381=diff
==
--- ambari/site/index.html (original)
+++ ambari/site/index.html Thu Feb  9 19:54:28 2017
@@ -1,13 +1,13 @@
 
 
 http://www.w3.org/1999/xhtml; xml:lang="en" lang="en">
   
 
 
-
+
 
 Ambari - 
 
@@ -335,7 +335,7 @@
 
 
 
-  Last Published: 
2017-01-19 |
+  Last Published: 
2017-02-09 |
   Version: 2.4.2
 
 

Modified: ambari/site/install-0.9.html
URL: 
http://svn.apache.org/viewvc/ambari/site/install-0.9.html?rev=1782381=1782380=1782381=diff
==
--- ambari/site/install-0.9.html (original)
+++ ambari/site/install-0.9.html Thu Feb  9 19:54:28 2017
@@ -1,13 +1,13 @@
 
 
 http://www.w3.org/1999/xhtml; xml:lang="en" lang="en">
   
 
 
-
+
 
 Ambari - 
 
@@ -335,7 +335,7 @@
 
 
 
-  Last Published: 
2017-01-19 |
+  Last Published: 
2017-02-09 |
   Version: 2.4.2
 
 

Modified: ambari/site/install.html
URL: 
http://svn.apache.org/viewvc/ambari/site/install.html?rev=1782381=1782380=1782381=diff
==
--- ambari/site/install.html (original)
+++ ambari/site/install.html Thu Feb  9 19:54:28 2017
@@ -1,13 +1,13 @@
 
 
 http://www.w3.org/1999/xhtml; xml:lang="en" lang="en">
   
 
 
-
+
 
 Ambari - 
 
@@ -335,7 +335,7 @@
 
 
 
-  Last Published: 
2017-01-19 |
+  Last Published: 
2017-02-09 |
   Version: 2.4.2
 
 

Modified: ambari/site/irc.html
URL: 
http://svn.apache.org/viewvc/ambari/site/irc.html?rev=1782381=1782380=1782381=diff
==
--- ambari/site/irc.html (original)
+++ ambari/site/irc.html Thu Feb  9 19:54:28 2017
@@ -1,13 +1,13 @@
 
 
 http://www.w3.org/1999/xhtml; xml:lang="en" lang="en">
   
 
 
-
+
 
 Ambari - 
 
@@ -335,7 +335,7 @@
 
 
 
-  Last Published: 
2017-01-19 |
+  Last Published: 
2017-02-09 |
   Version: 2.4.2
 
 

Modified: ambari/site/issue-tracking.html
URL: 
http://svn.apache.org/viewvc/ambari/site/issue-tracking.html?rev=1782381=1782380=1782381=diff
==
--- ambari/site/issue-tracking.html (original)
+++ ambari/site/issue-tracking.html Thu Feb  9 19:54:28 2017
@@ -1,13 +1,13 @@
 
 
 http://www.w3.org/1999/xhtml; xml:lang="en" lang="en">
   
 
 
-
+
 
 Ambari - Issue Tracking
 
@@ -335,7 +335,7 @@
 
 
 
-  Last Published: 
2017-01-19 |
+  Last Published: 
2017-02-09 |
   Version: 2.4.2
 
 

Modified: ambari/site/license.html
URL: 
http://svn.apache.org/viewvc/ambari/site/license.html?rev=1782381=1782380=1782381=diff
==
--- ambari/site/license.html (original)
+++ ambari/site/license.html Thu Feb  9 19:54:28 2017
@@ -1,13 +1,13 @@
 
 
 http://www.w3.org/1999/xhtml; xml:lang="en" lang="en">
   
 
 
-
+
 
 Ambari - Project License
 
@@ -335,7 +335,7 @@
 
 
 
-  Last Published: 
2017-01-19 |
+  Last Published: 
2017-02-09 |
   Version: 2.4.2
 
 

Modified: ambari/site/mail-lists.html
URL: 
http://svn.apache.org/viewvc/ambari/site/mail-lists.html?rev=1782381=1782380=1782381=diff
==
--- ambari/site/mail-lists.html (original)
+++ ambari/site/mail-lists.html Thu Feb  9 19:54:28 2017
@@ -1,13 +1,13 @@
 
 
 http://www.w3.org/1999/xhtml; xml:lang="en" 

ambari git commit: Updated team page. (yusaku)

2017-02-09 Thread yusaku
Repository: ambari
Updated Branches:
  refs/heads/trunk 6addaf50e -> d5755ba15


Updated team page. (yusaku)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d5755ba1
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d5755ba1
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d5755ba1

Branch: refs/heads/trunk
Commit: d5755ba15a979aa94fd53338be27d2206f108065
Parents: 6addaf5
Author: Yusaku Sako 
Authored: Thu Feb 9 11:53:15 2017 -0800
Committer: Yusaku Sako 
Committed: Thu Feb 9 11:53:15 2017 -0800

--
 docs/pom.xml | 16 ++--
 1 file changed, 14 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d5755ba1/docs/pom.xml
--
diff --git a/docs/pom.xml b/docs/pom.xml
index a128775..db907d1 100644
--- a/docs/pom.xml
+++ b/docs/pom.xml
@@ -151,6 +151,18 @@
 
 
 
+adoroszlai
+Attila Doroszlai
+adorosz...@apache.org
++1
+
+Committer
+
+
+Hortonworks
+
+
+
 ajit
 Ajit Kumar
 a...@apache.org
@@ -740,7 +752,7 @@
 Committer
 
 
-Teraware
+ITRenew Inc
 
 
 
@@ -1271,7 +1283,7 @@
 
 
   Vivek Ratnavel Subramanian
-  The Ohio State University
+  Hortonworks
 
 
   Pramod Thangali



ambari git commit: AMBARI-19841: Add 'yarn.client.failover-proxy-provider' in yarn-site.xml by default for all HA enabled clusters - addendum (Madhuvanthi Radhakrishnan via jluniya)

2017-02-09 Thread jluniya
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 bbbe15d96 -> 2ea4a0328


AMBARI-19841: Add 'yarn.client.failover-proxy-provider' in yarn-site.xml by 
default for all HA enabled clusters - addendum (Madhuvanthi Radhakrishnan via 
jluniya)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2ea4a032
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2ea4a032
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2ea4a032

Branch: refs/heads/branch-2.5
Commit: 2ea4a0328781e63dbde55d5efb2174f61cb3b743
Parents: bbbe15d
Author: Jayush Luniya 
Authored: Thu Feb 9 11:37:35 2017 -0800
Committer: Jayush Luniya 
Committed: Thu Feb 9 11:40:21 2017 -0800

--
 .../stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2ea4a032/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml
index 555768e..58b528e 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml
@@ -19,7 +19,7 @@
 
   
 yarn.client.failover-proxy-provider
-
org.apache.hadoop.yarn.client.ConfiguredRMFailoverProxyProvider
+
org.apache.hadoop.yarn.client.RequestHedgingRMFailoverProxyProvider
 When HA is enabled, the class to be used by Clients, AMs and 
NMs to failover to the Active RM. It should extend 
org.apache.hadoop.yarn.client.RMFailoverProxyProvider
 
   



ambari git commit: AMBARI-19933. HSI is not started with configured Hiveserver2 heap size, upgrade changes (smohanty)

2017-02-09 Thread smohanty
Repository: ambari
Updated Branches:
  refs/heads/trunk 259f31ae1 -> 6addaf50e


AMBARI-19933. HSI is not started with configured Hiveserver2 heap size, upgrade 
changes (smohanty)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6addaf50
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6addaf50
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6addaf50

Branch: refs/heads/trunk
Commit: 6addaf50e27d42d0da119cd006ae28f3dd1e678f
Parents: 259f31a
Author: Sumit Mohanty 
Authored: Thu Feb 9 10:55:18 2017 -0800
Committer: Sumit Mohanty 
Committed: Thu Feb 9 11:39:43 2017 -0800

--
 .../server/upgrade/UpgradeCatalog250.java   | 28 ++--
 .../server/upgrade/UpgradeCatalog250Test.java   | 69 
 2 files changed, 90 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6addaf50/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
index b617dc4..2082048 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
@@ -686,6 +686,8 @@ public class UpgradeCatalog250 extends 
AbstractUpgradeCatalog {
* @throws AmbariException
*/
   private static final String HIVE_INTERACTIVE_SITE = "hive-interactive-site";
+  private static final String HIVE_INTERACTIVE_ENV = "hive-interactive-env";
+  private static final String HIVE_ENV = "hive-env";
   protected void updateHIVEInteractiveConfigs() throws AmbariException {
 AmbariManagementController ambariManagementController = 
injector.getInstance(AmbariManagementController.class);
 Clusters clusters = ambariManagementController.getClusters();
@@ -696,24 +698,36 @@ public class UpgradeCatalog250 extends 
AbstractUpgradeCatalog {
 for (final Cluster cluster : clusterMap.values()) {
   Config hiveInteractiveSite = 
cluster.getDesiredConfigByType(HIVE_INTERACTIVE_SITE);
   if (hiveInteractiveSite != null) {
-updateConfigurationProperties(HIVE_INTERACTIVE_SITE, 
Collections.singletonMap("hive.tez.container.size",
-"SET_ON_FIRST_INVOCATION"), true, true);
+Map newProperties = new HashMap<>();
+newProperties.put("hive.auto.convert.join.noconditionaltask.size", 
"10");
 
-updateConfigurationProperties(HIVE_INTERACTIVE_SITE, 
Collections.singletonMap("hive.auto.convert.join.noconditionaltask.size",
-"10"), true, true);
 String llapRpcPortString = 
hiveInteractiveSite.getProperties().get("hive.llap.daemon.rpc.port");
 if (StringUtils.isNotBlank(llapRpcPortString)) {
   try {
 int llapRpcPort = Integer.parseInt(llapRpcPortString);
 if (llapRpcPort == 15001) {
-  updateConfigurationProperties(HIVE_INTERACTIVE_SITE,
-  Collections.singletonMap("hive.llap.daemon.rpc.port", 
"0"),
-  true, true);
+  newProperties.put("hive.llap.daemon.rpc.port", "0");
+  LOG.info("Updating HSI hive.llap.daemon.rpc.port to: 0");
 }
   } catch (NumberFormatException e) {
 LOG.warn("Unable to parse llap.rpc.port as integer: " + 
llapRpcPortString);
   }
 }
+updateConfigurationProperties(HIVE_INTERACTIVE_SITE, 
newProperties, true, true);
+  }
+
+  Config hiveInteractiveEnv = 
cluster.getDesiredConfigByType(HIVE_INTERACTIVE_ENV);
+  Config hiveEnv = cluster.getDesiredConfigByType(HIVE_ENV);
+  if (hiveInteractiveEnv != null) {
+String hsiHeapSize = "512";
+if (hiveEnv != null) {
+  if (hiveEnv.getProperties().containsKey("hive.heapsize")) {
+hsiHeapSize = hiveEnv.getProperties().get("hive.heapsize");
+LOG.info("Updating HSI heap size to: " + hsiHeapSize);
+  }
+}
+updateConfigurationProperties(HIVE_INTERACTIVE_ENV, 
Collections.singletonMap("hive_heapsize",
+   
  hsiHeapSize), true, true);
   }
 }
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/6addaf50/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java

ambari git commit: AMBARI-19933. HSI is not started with configured Hiveserver2 heap size, upgrade changes (smohanty)

2017-02-09 Thread smohanty
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 6632caf53 -> bbbe15d96


AMBARI-19933. HSI is not started with configured Hiveserver2 heap size, upgrade 
changes (smohanty)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bbbe15d9
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bbbe15d9
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bbbe15d9

Branch: refs/heads/branch-2.5
Commit: bbbe15d96136c5153e3dc3e0388e447717cd0779
Parents: 6632caf
Author: Sumit Mohanty 
Authored: Thu Feb 9 10:55:18 2017 -0800
Committer: Sumit Mohanty 
Committed: Thu Feb 9 10:55:23 2017 -0800

--
 .../server/upgrade/UpgradeCatalog250.java   | 28 ++--
 .../server/upgrade/UpgradeCatalog250Test.java   | 69 
 2 files changed, 90 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/bbbe15d9/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
index 3ea9f9e..dd0d048 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
@@ -681,6 +681,8 @@ public class UpgradeCatalog250 extends 
AbstractUpgradeCatalog {
* @throws AmbariException
*/
   private static final String HIVE_INTERACTIVE_SITE = "hive-interactive-site";
+  private static final String HIVE_INTERACTIVE_ENV = "hive-interactive-env";
+  private static final String HIVE_ENV = "hive-env";
   protected void updateHIVEInteractiveConfigs() throws AmbariException {
 AmbariManagementController ambariManagementController = 
injector.getInstance(AmbariManagementController.class);
 Clusters clusters = ambariManagementController.getClusters();
@@ -691,24 +693,36 @@ public class UpgradeCatalog250 extends 
AbstractUpgradeCatalog {
 for (final Cluster cluster : clusterMap.values()) {
   Config hiveInteractiveSite = 
cluster.getDesiredConfigByType(HIVE_INTERACTIVE_SITE);
   if (hiveInteractiveSite != null) {
-updateConfigurationProperties(HIVE_INTERACTIVE_SITE, 
Collections.singletonMap("hive.tez.container.size",
-"SET_ON_FIRST_INVOCATION"), true, true);
+Map newProperties = new HashMap<>();
+newProperties.put("hive.auto.convert.join.noconditionaltask.size", 
"10");
 
-updateConfigurationProperties(HIVE_INTERACTIVE_SITE, 
Collections.singletonMap("hive.auto.convert.join.noconditionaltask.size",
-"10"), true, true);
 String llapRpcPortString = 
hiveInteractiveSite.getProperties().get("hive.llap.daemon.rpc.port");
 if (StringUtils.isNotBlank(llapRpcPortString)) {
   try {
 int llapRpcPort = Integer.parseInt(llapRpcPortString);
 if (llapRpcPort == 15001) {
-  updateConfigurationProperties(HIVE_INTERACTIVE_SITE,
-  Collections.singletonMap("hive.llap.daemon.rpc.port", 
"0"),
-  true, true);
+  newProperties.put("hive.llap.daemon.rpc.port", "0");
+  LOG.info("Updating HSI hive.llap.daemon.rpc.port to: 0");
 }
   } catch (NumberFormatException e) {
 LOG.warn("Unable to parse llap.rpc.port as integer: " + 
llapRpcPortString);
   }
 }
+updateConfigurationProperties(HIVE_INTERACTIVE_SITE, 
newProperties, true, true);
+  }
+
+  Config hiveInteractiveEnv = 
cluster.getDesiredConfigByType(HIVE_INTERACTIVE_ENV);
+  Config hiveEnv = cluster.getDesiredConfigByType(HIVE_ENV);
+  if (hiveInteractiveEnv != null) {
+String hsiHeapSize = "512";
+if (hiveEnv != null) {
+  if (hiveEnv.getProperties().containsKey("hive.heapsize")) {
+hsiHeapSize = hiveEnv.getProperties().get("hive.heapsize");
+LOG.info("Updating HSI heap size to: " + hsiHeapSize);
+  }
+}
+updateConfigurationProperties(HIVE_INTERACTIVE_ENV, 
Collections.singletonMap("hive_heapsize",
+   
  hsiHeapSize), true, true);
   }
 }
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/bbbe15d9/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java

ambari git commit: AMBARI-19841: Add 'yarn.client.failover-proxy-provider' in yarn-site.xml by default for all HA enabled clusters - addendum (Madhuvanthi Radhakrishnan via jluniya)

2017-02-09 Thread jluniya
Repository: ambari
Updated Branches:
  refs/heads/trunk 43323f997 -> 259f31ae1


AMBARI-19841: Add 'yarn.client.failover-proxy-provider' in yarn-site.xml by 
default for all HA enabled clusters - addendum (Madhuvanthi Radhakrishnan via 
jluniya)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/259f31ae
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/259f31ae
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/259f31ae

Branch: refs/heads/trunk
Commit: 259f31ae11840c0b807e1aa9623df20d7b382da8
Parents: 43323f9
Author: Jayush Luniya 
Authored: Thu Feb 9 11:37:35 2017 -0800
Committer: Jayush Luniya 
Committed: Thu Feb 9 11:37:35 2017 -0800

--
 .../stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/259f31ae/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml
index 555768e..58b528e 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml
@@ -19,7 +19,7 @@
 
   
 yarn.client.failover-proxy-provider
-
org.apache.hadoop.yarn.client.ConfiguredRMFailoverProxyProvider
+
org.apache.hadoop.yarn.client.RequestHedgingRMFailoverProxyProvider
 When HA is enabled, the class to be used by Clients, AMs and 
NMs to failover to the Active RM. It should extend 
org.apache.hadoop.yarn.client.RMFailoverProxyProvider
 
   



[2/2] ambari git commit: AMBARI-19831. HDP 3.0 TP - Support changed configs and scripts for YARN/MR (alejandro)

2017-02-09 Thread alejandro
AMBARI-19831. HDP 3.0 TP - Support changed configs and scripts for YARN/MR 
(alejandro)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/43323f99
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/43323f99
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/43323f99

Branch: refs/heads/trunk
Commit: 43323f997b34a0bbb4ee9122734311e0b1205fcb
Parents: 00e1872
Author: Alejandro Fernandez 
Authored: Fri Feb 3 15:47:02 2017 -0800
Committer: Alejandro Fernandez 
Committed: Thu Feb 9 11:27:49 2017 -0800

--
 .../HDFS/3.0.0.3.0/configuration/core-site.xml  |  30 +--
 .../HDFS/3.0.0.3.0/configuration/hadoop-env.xml |  42 ++--
 .../hadoop-metrics2.properties.xml  |   2 +-
 .../3.0.0.3.0/configuration/hadoop-policy.xml   |  22 +-
 .../HDFS/3.0.0.3.0/configuration/hdfs-log4j.xml |   2 +-
 .../configuration/hdfs-logsearch-conf.xml   |   6 +-
 .../HDFS/3.0.0.3.0/configuration/hdfs-site.xml  | 109 +
 .../HDFS/3.0.0.3.0/configuration/ssl-client.xml |  14 +-
 .../HDFS/3.0.0.3.0/configuration/ssl-server.xml |  16 +-
 .../configuration-mapred/mapred-env.xml |  14 +-
 .../mapred-logsearch-conf.xml   |   6 +-
 .../configuration-mapred/mapred-site.xml|  90 
 .../YARN/3.0.0.3.0/configuration/yarn-env.xml   |  26 +--
 .../YARN/3.0.0.3.0/configuration/yarn-log4j.xml |   2 +-
 .../configuration/yarn-logsearch-conf.xml   |   6 +-
 .../YARN/3.0.0.3.0/configuration/yarn-site.xml  | 225 ++-
 .../common-services/YARN/3.0.0.3.0/metainfo.xml |   6 +-
 .../3.0.0.3.0/package/scripts/status_params.py  |  10 +-
 18 files changed, 324 insertions(+), 304 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/43323f99/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/configuration/core-site.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/configuration/core-site.xml
 
b/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/configuration/core-site.xml
index 20b1930..f323faa 100644
--- 
a/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/configuration/core-site.xml
+++ 
b/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/configuration/core-site.xml
@@ -22,7 +22,7 @@
 ha.failover-controller.active-standby-elector.zk.op.retries
 120
 ZooKeeper Failover Controller retries setting for your 
environment
-
+
   
   
   
@@ -32,21 +32,21 @@
   The size of this buffer should probably be a multiple of hardware
   page size (4096 on Intel x86), and it determines how much data is
   buffered during read and write operations.
-
+
   
   
 io.serializations
 org.apache.hadoop.io.serializer.WritableSerialization
  A list of comma-delimited serialization classes that can be 
used for obtaining serializers and deserializers.
 
-
+
   
   
 io.compression.codecs
 
org.apache.hadoop.io.compress.GzipCodec,org.apache.hadoop.io.compress.DefaultCodec,org.apache.hadoop.io.compress.SnappyCodec
 A list of the compression codec classes that can be used
  for compression/decompression.
-
+
   
   
   
@@ -67,7 +67,7 @@
 If trash is disabled server side then the client side configuration is 
checked.
 If trash is enabled on the server side then the value configured on 
the server is used and the client configuration value is ignored.
 
-
+
   
   
   
@@ -76,7 +76,7 @@
 Defines the threshold number of connections after which
connections will be inspected for idleness.
   
-
+
   
   
 ipc.client.connection.maxidletime
@@ -84,13 +84,13 @@
 The maximum time after which a client will bring down the
connection to the server.
   
-
+
   
   
 ipc.client.connect.max.retries
 50
 Defines the maximum number of retries for IPC 
connections.
-
+
   
   
 ipc.server.tcpnodelay
@@ -101,7 +101,7 @@
   decrease latency
   with a cost of more/smaller packets.
 
-
+
   
   
   
@@ -112,7 +112,7 @@
 not be exposed to public. Enable this option if the interfaces
 are only reachable by those who have the right authorization.
   
-
+
   
   
 hadoop.security.authentication
@@ -121,7 +121,7 @@
Set the authentication for the cluster. Valid values are: simple or
kerberos.

-
+
   
   
 hadoop.security.authorization
@@ -129,7 +129,7 @@
 
  Enable authorization for different protocols.
   
-
+
   
   
 hadoop.security.auth_to_local
@@ -175,7 +175,7 @@ DEFAULT
 
   

[1/2] ambari git commit: AMBARI-19831. HDP 3.0 TP - Support changed configs and scripts for YARN/MR (alejandro)

2017-02-09 Thread alejandro
Repository: ambari
Updated Branches:
  refs/heads/trunk 00e18721e -> 43323f997


http://git-wip-us.apache.org/repos/asf/ambari/blob/43323f99/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/configuration/yarn-site.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/configuration/yarn-site.xml
 
b/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/configuration/yarn-site.xml
index 4f30cb9..dd5e9a4 100644
--- 
a/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/configuration/yarn-site.xml
+++ 
b/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/configuration/yarn-site.xml
@@ -56,7 +56,7 @@
 yarn.resourcemanager.scheduler.class
 
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler
 The class to use as the resource scheduler.
-
+
   
   
 yarn.scheduler.minimum-allocation-mb
@@ -80,7 +80,7 @@
 yarn.nodemanager.resource.memory-mb
   
 
-
+
   
   
 yarn.scheduler.maximum-allocation-mb
@@ -104,7 +104,7 @@
 yarn.nodemanager.resource.memory-mb
   
 
-
+
   
   
 yarn.acl.enable
@@ -116,7 +116,7 @@
 ranger-yarn-plugin-enabled
   
 
-
+
   
   
 yarn.admin.acl
@@ -125,14 +125,14 @@
 
   true
 
-
+
   
   
   
 yarn.nodemanager.address
 0.0.0.0:45454
 The address of the container manager in the NM.
-
+
   
   
 yarn.nodemanager.resource.memory-mb
@@ -147,13 +147,13 @@
   MB
   256
 
-
+
   
   
 yarn.application.classpath
 
$HADOOP_CONF_DIR,{{stack_root}}/current/hadoop-client/*,{{stack_root}}/current/hadoop-client/lib/*,{{stack_root}}/current/hadoop-hdfs-client/*,{{stack_root}}/current/hadoop-hdfs-client/lib/*,{{stack_root}}/current/hadoop-yarn-client/*,{{stack_root}}/current/hadoop-yarn-client/lib/*
 Classpath for typical applications.
-
+
   
   
 yarn.nodemanager.vmem-pmem-ratio
@@ -170,7 +170,7 @@
   5.0
   0.1
 
-
+
   
   
 yarn.nodemanager.linux-container-executor.group
@@ -186,11 +186,12 @@
 user_group
   
 
-
+
   
   
 yarn.nodemanager.aux-services
-mapreduce_shuffle,spark_shuffle,spark2_shuffle
+
+mapreduce_shuffle
 Auxilliary services of NodeManager. A valid service name 
should only contain a-zA-Z0-9_ and cannot start with numbers
 
   
@@ -198,7 +199,7 @@
 yarn.nodemanager.aux-services.mapreduce_shuffle.class
 org.apache.hadoop.mapred.ShuffleHandler
 The auxiliary service class to use 
-
+
   
   
 yarn.nodemanager.log-dirs
@@ -213,7 +214,7 @@
 
   directories
 
-
+
   
   
 yarn.nodemanager.local-dirs
@@ -228,7 +229,7 @@
 
   directories
 
-
+
   
   
 yarn.nodemanager.container-monitor.interval-ms
@@ -237,19 +238,19 @@
   The interval, in milliseconds, for which the node manager
   waits  between two cycles of monitoring its containers' memory usage.
 
-
+
   
   
 yarn.nodemanager.health-checker.interval-ms
 135000
 Frequency of running node health script.
-
+
   
   
 yarn.nodemanager.health-checker.script.timeout-ms
 6
 Script time out period.
-
+
   
   
 yarn.nodemanager.log.retain-seconds
@@ -258,7 +259,7 @@
   Time in seconds to retain user logs. Only applicable if
   log aggregation is disabled.
 
-
+
   
   
 yarn.log-aggregation-enable
@@ -268,14 +269,14 @@
 
   boolean
 
-
+
   
   
 yarn.nodemanager.remote-app-log-dir
 /app-logs
 Location to aggregate logs to. 
 NOT_MANAGED_HDFS_PATH
-
+
   
   
 yarn.nodemanager.remote-app-log-dir-suffix
@@ -284,7 +285,7 @@
   The remote log dir will be created at
   {yarn.nodemanager.remote-app-log-dir}/${user}/{thisParam}.
 
-
+
   
   
 yarn.nodemanager.log-aggregation.compression-type
@@ -292,7 +293,7 @@
 
   T-file compression types used to compress aggregated logs.
 
-
+
   
   
 yarn.nodemanager.delete.debug-delay-sec
@@ -312,7 +313,7 @@
   of the Yarn applications' log directories is configurable with the
   yarn.nodemanager.log-dirs property (see also below).
 
-
+
   
   
 yarn.log-aggregation.retain-seconds
@@ -321,7 +322,7 @@
   How long to keep aggregation logs before deleting them. -1 disables.
   Be careful set this too small and you will spam the name node.
 
-
+
   
   
 yarn.nodemanager.admin-env
@@ -330,7 +331,7 @@
   Environment variables that should be forwarded from the NodeManager's
   environment to the container's.
 
-
+
   
   
 yarn.nodemanager.disk-health-checker.min-healthy-disks
@@ -342,7 +343,7 @@
   If there are less number of healthy local-dirs 

ambari git commit: AMBARI-19942 Unexpected paging behavior on Hosts page. (atkach)

2017-02-09 Thread atkach
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 714e60115 -> 6632caf53


AMBARI-19942 Unexpected paging behavior on Hosts page. (atkach)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6632caf5
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6632caf5
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6632caf5

Branch: refs/heads/branch-2.5
Commit: 6632caf53dd4ea9d7bf171743713f5af90f60bbb
Parents: 714e601
Author: Andrii Tkach 
Authored: Thu Feb 9 15:43:33 2017 +0200
Committer: Andrii Tkach 
Committed: Thu Feb 9 20:07:47 2017 +0200

--
 ambari-web/app/views/main/host.js | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6632caf5/ambari-web/app/views/main/host.js
--
diff --git a/ambari-web/app/views/main/host.js 
b/ambari-web/app/views/main/host.js
index fd4e085..a7cdb29 100644
--- a/ambari-web/app/views/main/host.js
+++ b/ambari-web/app/views/main/host.js
@@ -175,6 +175,7 @@ App.MainHostView = 
App.TableView.extend(App.TableServerViewMixin, {
 }
 this._super();
 this.set('startIndex', this.get('controller.startIndex'));
+this.set('displayLength', 
this.get('controller.paginationProps').findProperty('name', 
'displayLength').value);
 this.addObserver('pageContent.@each.selected', this, 
this.selectedHostsObserver);
   },
 



ambari git commit: AMBARI-19942 Unexpected paging behavior on Hosts page. (atkach)

2017-02-09 Thread atkach
Repository: ambari
Updated Branches:
  refs/heads/trunk dbb356774 -> 00e18721e


AMBARI-19942 Unexpected paging behavior on Hosts page. (atkach)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/00e18721
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/00e18721
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/00e18721

Branch: refs/heads/trunk
Commit: 00e18721ee47ae227e848bf4e68d3e8a4a2c40e3
Parents: dbb3567
Author: Andrii Tkach 
Authored: Thu Feb 9 18:22:27 2017 +0200
Committer: Andrii Tkach 
Committed: Thu Feb 9 20:07:14 2017 +0200

--
 ambari-web/app/views/main/host.js   |  1 +
 ambari-web/test/views/main/host_test.js | 18 +-
 2 files changed, 18 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/00e18721/ambari-web/app/views/main/host.js
--
diff --git a/ambari-web/app/views/main/host.js 
b/ambari-web/app/views/main/host.js
index 9183f6b..8959dde 100644
--- a/ambari-web/app/views/main/host.js
+++ b/ambari-web/app/views/main/host.js
@@ -174,6 +174,7 @@ App.MainHostView = 
App.TableView.extend(App.TableServerViewMixin, {
 }
 this._super();
 this.set('startIndex', this.get('controller.startIndex'));
+this.set('displayLength', 
this.get('controller.paginationProps').findProperty('name', 
'displayLength').value);
 this.addObserver('pageContent.@each.selected', this, 
this.selectedHostsObserver);
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/00e18721/ambari-web/test/views/main/host_test.js
--
diff --git a/ambari-web/test/views/main/host_test.js 
b/ambari-web/test/views/main/host_test.js
index 50279e6..a5fce45 100644
--- a/ambari-web/test/views/main/host_test.js
+++ b/ambari-web/test/views/main/host_test.js
@@ -29,7 +29,14 @@ function getView() {
 },
 updateHost: Em.K
   }),
-  name: 'ctrl1'
+  name: 'ctrl1',
+  startIndex: 1,
+  paginationProps: [
+{
+  name: 'displayLength',
+  value: 100
+}
+  ]
 })
   });
 }
@@ -344,11 +351,15 @@ describe('App.MainHostView', function () {
 beforeEach(function() {
   sinon.stub(view, 'clearFilterConditionsFromLocalStorage').returns(true);
   sinon.stub(view, 'addObserver');
+  sinon.stub(view, 'saveStartIndex');
+  sinon.stub(view, 'updatePaging');
 });
 
 afterEach(function() {
   view.clearFilterConditionsFromLocalStorage.restore();
   view.addObserver.restore();
+  view.saveStartIndex.restore();
+  view.updatePaging.restore();
 });
 
 it("filterChangeHappened should be true", function() {
@@ -363,6 +374,11 @@ describe('App.MainHostView', function () {
   expect(view.get('startIndex')).to.be.equal(10);
 });
 
+it("displayLength should be 10", function() {
+  view.willInsertElement();
+  expect(view.get('displayLength')).to.be.equal(100);
+});
+
 it("addObserver should be called", function() {
   view.willInsertElement();
   expect(view.addObserver.calledWith('pageContent.@each.selected', view, 
view.selectedHostsObserver)).to.be.true;



ambari git commit: AMBARI-19939 Service Config pages load very slowly

2017-02-09 Thread dbuzhor
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 d64fd8f1e -> 714e60115


AMBARI-19939 Service Config pages load very slowly


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/714e6011
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/714e6011
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/714e6011

Branch: refs/heads/branch-2.5
Commit: 714e60115db46584920e3cb1eae7c84ae31b9f5d
Parents: d64fd8f
Author: Denys Buzhor 
Authored: Thu Feb 9 14:16:32 2017 +0200
Committer: Denys Buzhor 
Committed: Thu Feb 9 19:07:00 2017 +0200

--
 .../controllers/main/service/info/configs.js| 13 ++-
 .../app/mixins/common/configs/configs_loader.js |  2 +-
 .../app/mixins/common/track_request_mixin.js| 36 +++-
 ambari-web/app/routes/main.js   | 15 +++-
 .../main/host/configs_service_test.js   |  2 +
 .../main/service/info/config_test.js| 87 +++-
 6 files changed, 144 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/714e6011/ambari-web/app/controllers/main/service/info/configs.js
--
diff --git a/ambari-web/app/controllers/main/service/info/configs.js 
b/ambari-web/app/controllers/main/service/info/configs.js
index 59dbe1d..265a216 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -235,6 +235,7 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.AddSecurityConfi
*/
   clearStep: function () {
 this.abortRequests();
+App.router.get('mainController').stopPolling();
 App.set('componentToBeAdded', {});
 App.set('componentToBeDeleted', {});
 this.clearLoadInfo();
@@ -289,7 +290,7 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.AddSecurityConfi
   acc.push(i);
   return Array.prototype.concat.apply(acc, 
App.StackService.find(i).get('dependentServiceNames').toArray()).without(serviceName).uniq();
 }, []));
-this.trackRequest(this.loadConfigTheme(serviceName).always(function () {
+this.trackRequestChain(this.loadConfigTheme(serviceName).always(function 
() {
   if (self.get('preSelectedConfigVersion')) {
 self.loadPreSelectedConfigVersion();
   } else {
@@ -300,6 +301,16 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.AddSecurityConfi
   },
 
   /**
+   * Turn on polling when all requests are finished
+   */
+  trackRequestsDidChange: function() {
+var allCompleted = 
this.get('requestsInProgress').everyProperty('completed', true);
+if (this.get('requestsInProgress').length && allCompleted) {
+  App.router.get('mainController').startPolling();
+}
+  }.observes('requestsInProgress.@each.completed'),
+
+  /**
* Generate "finger-print" for current stepConfigs[0]
* Used to determine, if user has some unsaved changes (comparing with 
hash)
* @returns {string|null}

http://git-wip-us.apache.org/repos/asf/ambari/blob/714e6011/ambari-web/app/mixins/common/configs/configs_loader.js
--
diff --git a/ambari-web/app/mixins/common/configs/configs_loader.js 
b/ambari-web/app/mixins/common/configs/configs_loader.js
index c888a3e..458c38f 100644
--- a/ambari-web/app/mixins/common/configs/configs_loader.js
+++ b/ambari-web/app/mixins/common/configs/configs_loader.js
@@ -103,7 +103,7 @@ App.ConfigsLoader = Em.Mixin.create(App.GroupsMappingMixin, 
{
 this.set('versionLoaded', false);
 this.set('selectedVersion', this.get('currentDefaultVersion'));
 this.set('preSelectedConfigVersion', null);
-this.trackRequest(App.ajax.send({
+this.trackRequestChain(App.ajax.send({
   name: 'service.serviceConfigVersions.get.current',
   sender: this,
   data: {

http://git-wip-us.apache.org/repos/asf/ambari/blob/714e6011/ambari-web/app/mixins/common/track_request_mixin.js
--
diff --git a/ambari-web/app/mixins/common/track_request_mixin.js 
b/ambari-web/app/mixins/common/track_request_mixin.js
index 6fcc991..07eaf6e 100644
--- a/ambari-web/app/mixins/common/track_request_mixin.js
+++ b/ambari-web/app/mixins/common/track_request_mixin.js
@@ -28,7 +28,36 @@ App.TrackRequestMixin = Em.Mixin.create({
* @method trackRequest
*/
   trackRequest: function (request) {
-this.get('requestsInProgress').push(request);
+var requestId = this.get('requestsInProgress').length;
+var self = this;
+this.get('requestsInProgress').pushObject({
+  request: request,
+  id: requestId,
+  status: request.state(),
+  completed: 

ambari git commit: AMBARI-19939 Service Config pages load very slowly

2017-02-09 Thread dbuzhor
Repository: ambari
Updated Branches:
  refs/heads/trunk ca09c208e -> dbb356774


AMBARI-19939 Service Config pages load very slowly


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/dbb35677
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dbb35677
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dbb35677

Branch: refs/heads/trunk
Commit: dbb3567740c9a2f5d48baab390c7f10711380f98
Parents: ca09c20
Author: Denys Buzhor 
Authored: Thu Feb 9 15:55:18 2017 +0200
Committer: Denys Buzhor 
Committed: Thu Feb 9 19:03:05 2017 +0200

--
 .../controllers/main/service/info/configs.js| 13 ++-
 .../app/mixins/common/configs/configs_loader.js |  2 +-
 .../app/mixins/common/track_request_mixin.js| 36 +++-
 ambari-web/app/routes/main.js   | 15 +++-
 .../main/host/configs_service_test.js   |  2 +
 .../test/controllers/main/host/details_test.js  |  1 +
 .../main/service/info/config_test.js| 87 +++-
 .../common/configs/configs_loader_test.js   |  7 +-
 8 files changed, 148 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/dbb35677/ambari-web/app/controllers/main/service/info/configs.js
--
diff --git a/ambari-web/app/controllers/main/service/info/configs.js 
b/ambari-web/app/controllers/main/service/info/configs.js
index 319610c..c49bfae 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -235,6 +235,7 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.AddSecurityConfi
*/
   clearStep: function () {
 this.abortRequests();
+App.router.get('mainController').stopPolling();
 App.set('componentToBeAdded', {});
 App.set('componentToBeDeleted', {});
 this.clearLoadInfo();
@@ -288,7 +289,7 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.AddSecurityConfi
   acc.push(i);
   return Array.prototype.concat.apply(acc, 
App.StackService.find(i).get('dependentServiceNames').toArray()).without(serviceName).uniq();
 }, []));
-this.trackRequest(this.loadConfigTheme(serviceName).always(function () {
+this.trackRequestChain(this.loadConfigTheme(serviceName).always(function 
() {
   if (self.get('preSelectedConfigVersion')) {
 self.loadPreSelectedConfigVersion();
   } else {
@@ -299,6 +300,16 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.AddSecurityConfi
   },
 
   /**
+   * Turn on polling when all requests are finished
+   */
+  trackRequestsDidChange: function() {
+var allCompleted = 
this.get('requestsInProgress').everyProperty('completed', true);
+if (this.get('requestsInProgress').length && allCompleted) {
+  App.router.get('mainController').startPolling();
+}
+  }.observes('requestsInProgress.@each.completed'),
+
+  /**
* Generate "finger-print" for current stepConfigs[0]
* Used to determine, if user has some unsaved changes (comparing with 
hash)
* @returns {string|null}

http://git-wip-us.apache.org/repos/asf/ambari/blob/dbb35677/ambari-web/app/mixins/common/configs/configs_loader.js
--
diff --git a/ambari-web/app/mixins/common/configs/configs_loader.js 
b/ambari-web/app/mixins/common/configs/configs_loader.js
index 666cef8..403b871 100644
--- a/ambari-web/app/mixins/common/configs/configs_loader.js
+++ b/ambari-web/app/mixins/common/configs/configs_loader.js
@@ -107,7 +107,7 @@ App.ConfigsLoader = Em.Mixin.create(App.GroupsMappingMixin, 
{
 this.set('versionLoaded', false);
 this.set('selectedVersion', this.get('currentDefaultVersion'));
 this.set('preSelectedConfigVersion', null);
-this.trackRequest(App.ajax.send({
+this.trackRequestChain(App.ajax.send({
   name: 'service.serviceConfigVersions.get.current',
   sender: this,
   data: {

http://git-wip-us.apache.org/repos/asf/ambari/blob/dbb35677/ambari-web/app/mixins/common/track_request_mixin.js
--
diff --git a/ambari-web/app/mixins/common/track_request_mixin.js 
b/ambari-web/app/mixins/common/track_request_mixin.js
index 6fcc991..07eaf6e 100644
--- a/ambari-web/app/mixins/common/track_request_mixin.js
+++ b/ambari-web/app/mixins/common/track_request_mixin.js
@@ -28,7 +28,36 @@ App.TrackRequestMixin = Em.Mixin.create({
* @method trackRequest
*/
   trackRequest: function (request) {
-this.get('requestsInProgress').push(request);
+var requestId = this.get('requestsInProgress').length;
+var self = this;
+

ambari git commit: AMBARI-19345 Storm REST metrics are not available when Storm UI is running in HTTPS (dsen)

2017-02-09 Thread dsen
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 21798024f -> d64fd8f1e


AMBARI-19345 Storm REST metrics are not available when Storm UI is running in 
HTTPS (dsen)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d64fd8f1
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d64fd8f1
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d64fd8f1

Branch: refs/heads/branch-2.5
Commit: d64fd8f1e80d4cbc78e95499161044734478b433
Parents: 2179802
Author: Dmytro Sen 
Authored: Thu Feb 9 18:44:15 2017 +0200
Committer: Dmytro Sen 
Committed: Thu Feb 9 18:44:15 2017 +0200

--
 .../HDP/2.1.1/services/STORM/metrics.json   |  10 +-
 .../metrics/RestMetricsPropertyProvider.java| 106 ---
 .../server/upgrade/UpgradeCatalog250.java   |  47 
 .../common-services/STORM/0.10.0/metrics.json   |   8 +-
 .../common-services/STORM/0.9.1/alerts.json |  30 +-
 .../common-services/STORM/0.9.1/metrics.json|   8 +-
 .../STORM/0.9.1/quicklinks/quicklinks.json  |  25 -
 .../common-services/STORM/0.9.3/metrics.json|   8 +-
 .../RestMetricsPropertyProviderTest.java|   4 +-
 .../server/upgrade/UpgradeCatalog250Test.java   |  94 
 .../HDP/2.1.1/services/STORM/metrics.json   |  10 +-
 11 files changed, 266 insertions(+), 84 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d64fd8f1/ambari-funtest/src/test/resources/stacks/HDP/2.1.1/services/STORM/metrics.json
--
diff --git 
a/ambari-funtest/src/test/resources/stacks/HDP/2.1.1/services/STORM/metrics.json
 
b/ambari-funtest/src/test/resources/stacks/HDP/2.1.1/services/STORM/metrics.json
index 7c149bb..247e59e 100644
--- 
a/ambari-funtest/src/test/resources/stacks/HDP/2.1.1/services/STORM/metrics.json
+++ 
b/ambari-funtest/src/test/resources/stacks/HDP/2.1.1/services/STORM/metrics.json
@@ -7,7 +7,9 @@
   "default_port": "8745",
   "port_config_type": "storm-site",
   "port_property_name": "storm.port",
-  "protocol": "http"
+  "protocol": "http",
+  "https_port_property_name" : "ui.https.port",
+  "https_property_name" : "ui.https.keystore.type"
 },
 "metrics": {
   "default": {
@@ -62,7 +64,9 @@
   "default_port": "8745",
   "port_config_type": "storm-site",
   "port_property_name": "storm.port",
-  "protocol": "http"
+  "protocol": "http",
+  "https_port_property_name" : "ui.https.port",
+  "https_property_name" : "ui.https.keystore.type"
 },
 "metrics": {
   "default": {
@@ -111,4 +115,4 @@
   }
 ]
   }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/d64fd8f1/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProvider.java
index 8c23fe0..7a6021f 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProvider.java
@@ -102,16 +102,17 @@ public class RestMetricsPropertyProvider extends 
ThreadPoolEnabledPropertyProvid
   private static final String DEFAULT_PORT_PROPERTY = "default_port";
   private static final String PORT_CONFIG_TYPE_PROPERTY = "port_config_type";
   private static final String PORT_PROPERTY_NAME_PROPERTY = 
"port_property_name";
+  private static final String HTTPS_PORT_PROPERTY_NAME_PROPERTY = 
"https_port_property_name";
 
   /**
* Protocol to use when connecting
*/
   private static final String PROTOCOL_OVERRIDE_PROPERTY = "protocol";
+  private static final String HTTPS_PROTOCOL_PROPERTY = "https_property_name";
   private static final String HTTP_PROTOCOL = "http";
   private static final String HTTPS_PROTOCOL = "https";
   private static final String DEFAULT_PROTOCOL = HTTP_PROTOCOL;
 
-
   /**
* String that separates JSON URL from path inside JSON in metrics path
*/
@@ -208,7 +209,7 @@ public class RestMetricsPropertyProvider extends 
ThreadPoolEnabledPropertyProvid
   // If there are no metrics defined for the given component then there is 
nothing to do.
   return resource;
 }
-String protocol = resolveProtocol();
+String protocol = null;
 String port = "-1";
 String hostname = null;
 try {
@@ 

ambari git commit: AMBARI-19345 Storm REST metrics are not available when Storm UI is running in HTTPS (dsen)

2017-02-09 Thread dsen
Repository: ambari
Updated Branches:
  refs/heads/trunk 0458ec851 -> ca09c208e


AMBARI-19345 Storm REST metrics are not available when Storm UI is running in 
HTTPS (dsen)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ca09c208
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ca09c208
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ca09c208

Branch: refs/heads/trunk
Commit: ca09c208ea602e1f7b612d4e40b42b63861231a6
Parents: 0458ec8
Author: Dmytro Sen 
Authored: Thu Feb 9 18:40:15 2017 +0200
Committer: Dmytro Sen 
Committed: Thu Feb 9 18:40:15 2017 +0200

--
 .../HDP/2.1.1/services/STORM/metrics.json   |  10 +-
 .../metrics/RestMetricsPropertyProvider.java| 106 +-
 .../server/upgrade/UpgradeCatalog250.java   |  47 ++
 .../common-services/STORM/0.10.0/metrics.json   |   8 +-
 .../common-services/STORM/0.9.1/alerts.json |  30 +---
 .../common-services/STORM/0.9.1/metrics.json|   8 +-
 .../STORM/0.9.1/quicklinks/quicklinks.json  |  25 +++-
 .../common-services/STORM/0.9.3/metrics.json|   8 +-
 .../RestMetricsPropertyProviderTest.java|   4 +-
 .../server/upgrade/UpgradeCatalog250Test.java   | 146 +++
 .../HDP/2.1.1/services/STORM/metrics.json   |  10 +-
 11 files changed, 292 insertions(+), 110 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ca09c208/ambari-funtest/src/test/resources/stacks/HDP/2.1.1/services/STORM/metrics.json
--
diff --git 
a/ambari-funtest/src/test/resources/stacks/HDP/2.1.1/services/STORM/metrics.json
 
b/ambari-funtest/src/test/resources/stacks/HDP/2.1.1/services/STORM/metrics.json
index 7c149bb..247e59e 100644
--- 
a/ambari-funtest/src/test/resources/stacks/HDP/2.1.1/services/STORM/metrics.json
+++ 
b/ambari-funtest/src/test/resources/stacks/HDP/2.1.1/services/STORM/metrics.json
@@ -7,7 +7,9 @@
   "default_port": "8745",
   "port_config_type": "storm-site",
   "port_property_name": "storm.port",
-  "protocol": "http"
+  "protocol": "http",
+  "https_port_property_name" : "ui.https.port",
+  "https_property_name" : "ui.https.keystore.type"
 },
 "metrics": {
   "default": {
@@ -62,7 +64,9 @@
   "default_port": "8745",
   "port_config_type": "storm-site",
   "port_property_name": "storm.port",
-  "protocol": "http"
+  "protocol": "http",
+  "https_port_property_name" : "ui.https.port",
+  "https_property_name" : "ui.https.keystore.type"
 },
 "metrics": {
   "default": {
@@ -111,4 +115,4 @@
   }
 ]
   }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/ca09c208/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProvider.java
index 8c23fe0..7a6021f 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProvider.java
@@ -102,16 +102,17 @@ public class RestMetricsPropertyProvider extends 
ThreadPoolEnabledPropertyProvid
   private static final String DEFAULT_PORT_PROPERTY = "default_port";
   private static final String PORT_CONFIG_TYPE_PROPERTY = "port_config_type";
   private static final String PORT_PROPERTY_NAME_PROPERTY = 
"port_property_name";
+  private static final String HTTPS_PORT_PROPERTY_NAME_PROPERTY = 
"https_port_property_name";
 
   /**
* Protocol to use when connecting
*/
   private static final String PROTOCOL_OVERRIDE_PROPERTY = "protocol";
+  private static final String HTTPS_PROTOCOL_PROPERTY = "https_property_name";
   private static final String HTTP_PROTOCOL = "http";
   private static final String HTTPS_PROTOCOL = "https";
   private static final String DEFAULT_PROTOCOL = HTTP_PROTOCOL;
 
-
   /**
* String that separates JSON URL from path inside JSON in metrics path
*/
@@ -208,7 +209,7 @@ public class RestMetricsPropertyProvider extends 
ThreadPoolEnabledPropertyProvid
   // If there are no metrics defined for the given component then there is 
nothing to do.
   return resource;
 }
-String protocol = resolveProtocol();
+String protocol = null;
 String port = "-1";
 String hostname = null;
 try {
@@ -221,7 +222,8 @@ 

[1/2] ambari git commit: AMBARI-19943. Ambari-agent fails to restart in non-root if was running as root before (aonishuk)

2017-02-09 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 681f89c53 -> 21798024f
  refs/heads/trunk 2d11e5059 -> 0458ec851


AMBARI-19943. Ambari-agent fails to restart in non-root if was running as root 
before (aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0458ec85
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0458ec85
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0458ec85

Branch: refs/heads/trunk
Commit: 0458ec8513c85d23016ba5fdcc6e86fd78e5d4a4
Parents: 2d11e50
Author: Andrew Onishuk 
Authored: Thu Feb 9 17:10:20 2017 +0200
Committer: Andrew Onishuk 
Committed: Thu Feb 9 17:10:20 2017 +0200

--
 ambari-agent/conf/unix/ambari-agent | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0458ec85/ambari-agent/conf/unix/ambari-agent
--
diff --git a/ambari-agent/conf/unix/ambari-agent 
b/ambari-agent/conf/unix/ambari-agent
index 10913f8..70f58ed 100755
--- a/ambari-agent/conf/unix/ambari-agent
+++ b/ambari-agent/conf/unix/ambari-agent
@@ -175,7 +175,7 @@ case "${1:-}" in
 fi
 echo "Checking for previously running Ambari Agent..."
 if [ -f $PIDFILE ]; then
-  PID=`cat $PIDFILE`
+  PID=`ambari-sudo.sh cat $PIDFILE`
   if ! (ps -p $PID >/dev/null 2>/dev/null); then
 echo "$PIDFILE found with no process. Removing $PID..."
 ambari-sudo.sh rm -f $PIDFILE
@@ -223,7 +223,7 @@ case "${1:-}" in
 ;;
   status)
 if [ -f $PIDFILE ]; then
-  PID=`cat $PIDFILE`
+  PID=`ambari-sudo.sh cat $PIDFILE`
   echo "Found $AMBARI_AGENT PID: $PID"
   if ! (ps -p $PID >/dev/null 2>/dev/null); then
 echo "$AMBARI_AGENT not running. Stale PID File at: $PIDFILE"
@@ -249,7 +249,7 @@ case "${1:-}" in
   exit -1
 fi
 if [ -f $PIDFILE ]; then
-  PID=`cat $PIDFILE`
+  PID=`ambari-sudo.sh cat $PIDFILE`
   echo "Found $AMBARI_AGENT PID: $PID"
   if ! (ps -p $PID >/dev/null 2>/dev/null); then
 tput bold



[2/2] ambari git commit: AMBARI-19943. Ambari-agent fails to restart in non-root if was running as root before (aonishuk)

2017-02-09 Thread aonishuk
AMBARI-19943. Ambari-agent fails to restart in non-root if was running as root 
before (aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/21798024
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/21798024
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/21798024

Branch: refs/heads/branch-2.5
Commit: 21798024f6eb313c73d23895e2cdede0b9ca1c53
Parents: 681f89c
Author: Andrew Onishuk 
Authored: Thu Feb 9 17:10:24 2017 +0200
Committer: Andrew Onishuk 
Committed: Thu Feb 9 17:10:24 2017 +0200

--
 ambari-agent/conf/unix/ambari-agent | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/21798024/ambari-agent/conf/unix/ambari-agent
--
diff --git a/ambari-agent/conf/unix/ambari-agent 
b/ambari-agent/conf/unix/ambari-agent
index 10913f8..70f58ed 100755
--- a/ambari-agent/conf/unix/ambari-agent
+++ b/ambari-agent/conf/unix/ambari-agent
@@ -175,7 +175,7 @@ case "${1:-}" in
 fi
 echo "Checking for previously running Ambari Agent..."
 if [ -f $PIDFILE ]; then
-  PID=`cat $PIDFILE`
+  PID=`ambari-sudo.sh cat $PIDFILE`
   if ! (ps -p $PID >/dev/null 2>/dev/null); then
 echo "$PIDFILE found with no process. Removing $PID..."
 ambari-sudo.sh rm -f $PIDFILE
@@ -223,7 +223,7 @@ case "${1:-}" in
 ;;
   status)
 if [ -f $PIDFILE ]; then
-  PID=`cat $PIDFILE`
+  PID=`ambari-sudo.sh cat $PIDFILE`
   echo "Found $AMBARI_AGENT PID: $PID"
   if ! (ps -p $PID >/dev/null 2>/dev/null); then
 echo "$AMBARI_AGENT not running. Stale PID File at: $PIDFILE"
@@ -249,7 +249,7 @@ case "${1:-}" in
   exit -1
 fi
 if [ -f $PIDFILE ]; then
-  PID=`cat $PIDFILE`
+  PID=`ambari-sudo.sh cat $PIDFILE`
   echo "Found $AMBARI_AGENT PID: $PID"
   if ! (ps -p $PID >/dev/null 2>/dev/null); then
 tput bold



ambari git commit: AMBARI-19937 Restart Indicator in Service > Config page does not disappear automatically - page refresh required. (atkach)

2017-02-09 Thread atkach
Repository: ambari
Updated Branches:
  refs/heads/trunk a6de4ac27 -> 2d11e5059


AMBARI-19937 Restart Indicator in Service > Config page does not disappear 
automatically - page refresh required. (atkach)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2d11e505
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2d11e505
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2d11e505

Branch: refs/heads/trunk
Commit: 2d11e505939f172404b80d5950ac288c214fa503
Parents: a6de4ac
Author: Andrii Tkach 
Authored: Thu Feb 9 15:41:06 2017 +0200
Committer: Andrii Tkach 
Committed: Thu Feb 9 15:41:06 2017 +0200

--
 ambari-web/app/mappers/component_config_mapper.js | 12 
 1 file changed, 12 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2d11e505/ambari-web/app/mappers/component_config_mapper.js
--
diff --git a/ambari-web/app/mappers/component_config_mapper.js 
b/ambari-web/app/mappers/component_config_mapper.js
index c1568e0..8df81f4 100644
--- a/ambari-web/app/mappers/component_config_mapper.js
+++ b/ambari-web/app/mappers/component_config_mapper.js
@@ -37,6 +37,18 @@ App.componentConfigMapper = App.QuickDataMapper.create({
   map: function (json) {
 console.time('App.componentConfigMapper execution time');
 var staleConfigHostsMap = App.cache.staleConfigsComponentHosts;
+var componentsNeedRestart = 
json.items.mapProperty('ServiceComponentInfo.component_name');
+var components = App.MasterComponent.find().toArray()
+  .concat(App.ClientComponent.find().toArray())
+  .concat(App.SlaveComponent.find().toArray());
+
+//clear stale config hosts of component after restart
+components.forEach(function(component) {
+  if (!componentsNeedRestart.contains(component.get('componentName'))) {
+staleConfigHostsMap[component.get('componentName')] = [];
+component.set('staleConfigHosts', []);
+  }
+});
 
 json.items.forEach(function(item) {
   var componentName = item.ServiceComponentInfo.component_name;



ambari git commit: AMBARI-19645 ADDENDUM Log Search should use Credential Store API to store keystore/truststore passwords - ambari side (mgergely)

2017-02-09 Thread mgergely
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 7921518f5 -> 681f89c53


AMBARI-19645 ADDENDUM Log Search should use Credential Store API to store 
keystore/truststore passwords - ambari side (mgergely)

Change-Id: I74fa1b11f186672b4ba815dc1a25519b3d1d8c93


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/681f89c5
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/681f89c5
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/681f89c5

Branch: refs/heads/branch-2.5
Commit: 681f89c53e98f0891e205eaf1ba4805b2dee2866
Parents: 7921518
Author: Miklos Gergely 
Authored: Thu Feb 9 14:39:04 2017 +0100
Committer: Miklos Gergely 
Committed: Thu Feb 9 14:39:04 2017 +0100

--
 .../src/test/python/stacks/2.4/LOGSEARCH/test_logfeeder.py | 2 +-
 .../src/test/python/stacks/2.4/LOGSEARCH/test_logsearch.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/681f89c5/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logfeeder.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logfeeder.py 
b/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logfeeder.py
index 00e8e1f..064978b 100644
--- a/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logfeeder.py
+++ b/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logfeeder.py
@@ -61,7 +61,7 @@ class TestLogFeeder(RMFTestCase):
   content=''
   )
 self.assertResourceCalled('PropertiesFile', 
'/etc/ambari-logsearch-logfeeder/conf/logfeeder.properties',
-  
properties={'hadoop.security.credential.provider.path': 
'jceks://file/etc/ambari-logsearch-logfeeder/conf/logfeeder-env.jceks',
+  
properties={'hadoop.security.credential.provider.path': 
'jceks://file/etc/ambari-logsearch-logfeeder/conf/logfeeder.jceks',
   'logfeeder.checkpoint.folder': 
'/etc/ambari-logsearch-logfeeder/conf/checkpoints',
   'logfeeder.config.files': 
'output.config.json,input.config-ambari.json,global.config.json,input.config-logsearch.json,input.config-zookeeper.json',
   'logfeeder.metrics.collector.hosts': 
'',

http://git-wip-us.apache.org/repos/asf/ambari/blob/681f89c5/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logsearch.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logsearch.py 
b/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logsearch.py
index 380151c..db9cbb9 100644
--- a/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logsearch.py
+++ b/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logsearch.py
@@ -77,7 +77,7 @@ class TestLogSearch(RMFTestCase):
   content = ''
 )
 self.assertResourceCalled('PropertiesFile', 
'/etc/ambari-logsearch-portal/conf/logsearch.properties',
-  properties = 
{'hadoop.security.credential.provider.path': 
'jceks://file/etc/ambari-logsearch-portal/conf/logsearch-env.jceks',
+  properties = 
{'hadoop.security.credential.provider.path': 
'jceks://file/etc/ambari-logsearch-portal/conf/logsearch.jceks',
 
'logsearch.audit.logs.split.interval.mins': '1',
 
'logsearch.auth.external_auth.enabled': 'false',
 
'logsearch.auth.external_auth.host_url': 'http://c6401.ambari.apache.org:8080',



ambari git commit: AMBARI-19645 ADDENDUM Log Search should use Credential Store API to store keystore/truststore passwords - ambari side (mgergely)

2017-02-09 Thread mgergely
Repository: ambari
Updated Branches:
  refs/heads/trunk 10a0ba464 -> a6de4ac27


AMBARI-19645 ADDENDUM Log Search should use Credential Store API to store 
keystore/truststore passwords - ambari side (mgergely)

Change-Id: I4665e934c8cc492b7b1581ce130b2072f145004d


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a6de4ac2
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a6de4ac2
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a6de4ac2

Branch: refs/heads/trunk
Commit: a6de4ac27b7504cb03c4fee3affd6c3330589a60
Parents: 10a0ba4
Author: Miklos Gergely 
Authored: Thu Feb 9 14:38:01 2017 +0100
Committer: Miklos Gergely 
Committed: Thu Feb 9 14:38:34 2017 +0100

--
 .../src/test/python/stacks/2.4/LOGSEARCH/test_logfeeder.py | 2 +-
 .../src/test/python/stacks/2.4/LOGSEARCH/test_logsearch.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a6de4ac2/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logfeeder.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logfeeder.py 
b/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logfeeder.py
index 00e8e1f..064978b 100644
--- a/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logfeeder.py
+++ b/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logfeeder.py
@@ -61,7 +61,7 @@ class TestLogFeeder(RMFTestCase):
   content=''
   )
 self.assertResourceCalled('PropertiesFile', 
'/etc/ambari-logsearch-logfeeder/conf/logfeeder.properties',
-  
properties={'hadoop.security.credential.provider.path': 
'jceks://file/etc/ambari-logsearch-logfeeder/conf/logfeeder-env.jceks',
+  
properties={'hadoop.security.credential.provider.path': 
'jceks://file/etc/ambari-logsearch-logfeeder/conf/logfeeder.jceks',
   'logfeeder.checkpoint.folder': 
'/etc/ambari-logsearch-logfeeder/conf/checkpoints',
   'logfeeder.config.files': 
'output.config.json,input.config-ambari.json,global.config.json,input.config-logsearch.json,input.config-zookeeper.json',
   'logfeeder.metrics.collector.hosts': 
'',

http://git-wip-us.apache.org/repos/asf/ambari/blob/a6de4ac2/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logsearch.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logsearch.py 
b/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logsearch.py
index 380151c..db9cbb9 100644
--- a/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logsearch.py
+++ b/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logsearch.py
@@ -77,7 +77,7 @@ class TestLogSearch(RMFTestCase):
   content = ''
 )
 self.assertResourceCalled('PropertiesFile', 
'/etc/ambari-logsearch-portal/conf/logsearch.properties',
-  properties = 
{'hadoop.security.credential.provider.path': 
'jceks://file/etc/ambari-logsearch-portal/conf/logsearch-env.jceks',
+  properties = 
{'hadoop.security.credential.provider.path': 
'jceks://file/etc/ambari-logsearch-portal/conf/logsearch.jceks',
 
'logsearch.audit.logs.split.interval.mins': '1',
 
'logsearch.auth.external_auth.enabled': 'false',
 
'logsearch.auth.external_auth.host_url': 'http://c6401.ambari.apache.org:8080',



ambari git commit: AMBARI-19937 Restart Indicator in Service > Config page does not disappear automatically - page refresh required. (atkach)

2017-02-09 Thread atkach
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 0ff74fc31 -> 7921518f5


AMBARI-19937 Restart Indicator in Service > Config page does not disappear 
automatically - page refresh required. (atkach)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7921518f
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7921518f
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7921518f

Branch: refs/heads/branch-2.5
Commit: 7921518f56b01312d081590e6c609e3082cf4fdc
Parents: 0ff74fc
Author: Andrii Tkach 
Authored: Thu Feb 9 12:55:45 2017 +0200
Committer: Andrii Tkach 
Committed: Thu Feb 9 15:37:36 2017 +0200

--
 ambari-web/app/mappers/component_config_mapper.js | 12 
 1 file changed, 12 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7921518f/ambari-web/app/mappers/component_config_mapper.js
--
diff --git a/ambari-web/app/mappers/component_config_mapper.js 
b/ambari-web/app/mappers/component_config_mapper.js
index c1568e0..8df81f4 100644
--- a/ambari-web/app/mappers/component_config_mapper.js
+++ b/ambari-web/app/mappers/component_config_mapper.js
@@ -37,6 +37,18 @@ App.componentConfigMapper = App.QuickDataMapper.create({
   map: function (json) {
 console.time('App.componentConfigMapper execution time');
 var staleConfigHostsMap = App.cache.staleConfigsComponentHosts;
+var componentsNeedRestart = 
json.items.mapProperty('ServiceComponentInfo.component_name');
+var components = App.MasterComponent.find().toArray()
+  .concat(App.ClientComponent.find().toArray())
+  .concat(App.SlaveComponent.find().toArray());
+
+//clear stale config hosts of component after restart
+components.forEach(function(component) {
+  if (!componentsNeedRestart.contains(component.get('componentName'))) {
+staleConfigHostsMap[component.get('componentName')] = [];
+component.set('staleConfigHosts', []);
+  }
+});
 
 json.items.forEach(function(item) {
   var componentName = item.ServiceComponentInfo.component_name;



[1/2] ambari git commit: AMBARI-19941. Hive start fails in non-root if agent previously ran as root (aonishuk)

2017-02-09 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 a879b8ac4 -> 0ff74fc31
  refs/heads/trunk 8561542e6 -> 10a0ba464


AMBARI-19941. Hive start fails in non-root if agent previously ran as root 
(aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/10a0ba46
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/10a0ba46
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/10a0ba46

Branch: refs/heads/trunk
Commit: 10a0ba464bf1575775b09c2b9e1f210c8dfaf549
Parents: 8561542
Author: Andrew Onishuk 
Authored: Thu Feb 9 15:19:58 2017 +0200
Committer: Andrew Onishuk 
Committed: Thu Feb 9 15:19:58 2017 +0200

--
 .../python/resource_management/TestContentSources.py | 11 +++
 .../src/main/python/resource_management/core/source.py   |  8 +++-
 2 files changed, 10 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/10a0ba46/ambari-agent/src/test/python/resource_management/TestContentSources.py
--
diff --git 
a/ambari-agent/src/test/python/resource_management/TestContentSources.py 
b/ambari-agent/src/test/python/resource_management/TestContentSources.py
index 5f4ee06..eb5eee2 100644
--- a/ambari-agent/src/test/python/resource_management/TestContentSources.py
+++ b/ambari-agent/src/test/python/resource_management/TestContentSources.py
@@ -20,6 +20,13 @@ from unittest import TestCase
 from mock.mock import patch, MagicMock
 from only_for_platform import get_platform, not_for_platform, os_distro_value, 
PLATFORM_WINDOWS
 
+import os
+
+if get_platform() != PLATFORM_WINDOWS:
+  with patch.object(os, "geteuid", return_value=0):
+from resource_management.core import sudo
+reload(sudo)
+
 from ambari_commons.os_check import OSCheck
 
 from resource_management.core import Environment
@@ -29,12 +36,8 @@ from resource_management.core.source import DownloadSource
 from resource_management.core.source import Template
 from resource_management.core.source import InlineTemplate
 
-if get_platform() != PLATFORM_WINDOWS:
-  from resource_management.core import sudo
-
 from ambari_jinja2 import UndefinedError, TemplateNotFound
 import urllib2
-import os
 
 
 @patch.object(OSCheck, "os_distribution", new = MagicMock(return_value = 
os_distro_value))

http://git-wip-us.apache.org/repos/asf/ambari/blob/10a0ba46/ambari-common/src/main/python/resource_management/core/source.py
--
diff --git a/ambari-common/src/main/python/resource_management/core/source.py 
b/ambari-common/src/main/python/resource_management/core/source.py
index 916a618..cee6f57 100644
--- a/ambari-common/src/main/python/resource_management/core/source.py
+++ b/ambari-common/src/main/python/resource_management/core/source.py
@@ -25,6 +25,7 @@ from resource_management.core.environment import Environment
 from resource_management.core.logger import Logger
 from resource_management.core.exceptions import Fail
 from resource_management.core.utils import checked_unite
+from resource_management.core import sudo
 
 __all__ = ["Source", "Template", "InlineTemplate", "StaticFile", 
"DownloadSource"]
 
@@ -197,12 +198,9 @@ class DownloadSource(Source):
   content = web_file.read()
   
   if self.cache:
-with open(filepath, 'w') as fp:
-  fp.write(content)
+sudo.create_file(filepath, content)
 else:
   Logger.info("Not downloading the file from {0}, because {1} already 
exists".format(self.url, filepath))
-
-  with open(filepath) as fp:
-content = fp.read()
+  content = sudo.read_file(filepath)
 
 return content



[2/2] ambari git commit: AMBARI-19941. Hive start fails in non-root if agent previously ran as root (aonishuk)

2017-02-09 Thread aonishuk
AMBARI-19941. Hive start fails in non-root if agent previously ran as root 
(aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0ff74fc3
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0ff74fc3
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0ff74fc3

Branch: refs/heads/branch-2.5
Commit: 0ff74fc3161823522e7f8f4d3fd7ad076eead8b3
Parents: a879b8a
Author: Andrew Onishuk 
Authored: Thu Feb 9 15:20:01 2017 +0200
Committer: Andrew Onishuk 
Committed: Thu Feb 9 15:20:01 2017 +0200

--
 .../python/resource_management/TestContentSources.py | 11 +++
 .../src/main/python/resource_management/core/source.py   |  8 +++-
 2 files changed, 10 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0ff74fc3/ambari-agent/src/test/python/resource_management/TestContentSources.py
--
diff --git 
a/ambari-agent/src/test/python/resource_management/TestContentSources.py 
b/ambari-agent/src/test/python/resource_management/TestContentSources.py
index 5f4ee06..eb5eee2 100644
--- a/ambari-agent/src/test/python/resource_management/TestContentSources.py
+++ b/ambari-agent/src/test/python/resource_management/TestContentSources.py
@@ -20,6 +20,13 @@ from unittest import TestCase
 from mock.mock import patch, MagicMock
 from only_for_platform import get_platform, not_for_platform, os_distro_value, 
PLATFORM_WINDOWS
 
+import os
+
+if get_platform() != PLATFORM_WINDOWS:
+  with patch.object(os, "geteuid", return_value=0):
+from resource_management.core import sudo
+reload(sudo)
+
 from ambari_commons.os_check import OSCheck
 
 from resource_management.core import Environment
@@ -29,12 +36,8 @@ from resource_management.core.source import DownloadSource
 from resource_management.core.source import Template
 from resource_management.core.source import InlineTemplate
 
-if get_platform() != PLATFORM_WINDOWS:
-  from resource_management.core import sudo
-
 from ambari_jinja2 import UndefinedError, TemplateNotFound
 import urllib2
-import os
 
 
 @patch.object(OSCheck, "os_distribution", new = MagicMock(return_value = 
os_distro_value))

http://git-wip-us.apache.org/repos/asf/ambari/blob/0ff74fc3/ambari-common/src/main/python/resource_management/core/source.py
--
diff --git a/ambari-common/src/main/python/resource_management/core/source.py 
b/ambari-common/src/main/python/resource_management/core/source.py
index 916a618..cee6f57 100644
--- a/ambari-common/src/main/python/resource_management/core/source.py
+++ b/ambari-common/src/main/python/resource_management/core/source.py
@@ -25,6 +25,7 @@ from resource_management.core.environment import Environment
 from resource_management.core.logger import Logger
 from resource_management.core.exceptions import Fail
 from resource_management.core.utils import checked_unite
+from resource_management.core import sudo
 
 __all__ = ["Source", "Template", "InlineTemplate", "StaticFile", 
"DownloadSource"]
 
@@ -197,12 +198,9 @@ class DownloadSource(Source):
   content = web_file.read()
   
   if self.cache:
-with open(filepath, 'w') as fp:
-  fp.write(content)
+sudo.create_file(filepath, content)
 else:
   Logger.info("Not downloading the file from {0}, because {1} already 
exists".format(self.url, filepath))
-
-  with open(filepath) as fp:
-content = fp.read()
+  content = sudo.read_file(filepath)
 
 return content



ambari git commit: AMBARI-19927. Some services were not started after adding in Kerberize cluster.(echekanskiy via vbrodetskyi)

2017-02-09 Thread vbrodetskyi
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 fa3b473c8 -> a879b8ac4


AMBARI-19927. Some services were not started after adding in Kerberize 
cluster.(echekanskiy via vbrodetskyi)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a879b8ac
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a879b8ac
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a879b8ac

Branch: refs/heads/branch-2.5
Commit: a879b8ac463dbc4e73ebfd5889103ea95bcce442
Parents: fa3b473
Author: Vitaly Brodetskyi 
Authored: Thu Feb 9 15:18:39 2017 +0200
Committer: Vitaly Brodetskyi 
Committed: Thu Feb 9 15:18:39 2017 +0200

--
 .../stacks/HDP/2.0.6/services/stack_advisor.py  | 50 ++--
 1 file changed, 46 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a879b8ac/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
index 7cf4345..1ef7ac3 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
@@ -16,9 +16,10 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 """
-
+import random
 import re
 import os
+import string
 import sys
 import socket
 
@@ -218,12 +219,50 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
  ambari_user = ambari_user.split('@')[0]
 return ambari_user
 
+  PROXYUSER_SPECIAL_RE = 
[r"\$\{(?:([\w\-\.]+)/)?([\w\-\.]+)(?:\s*\|\s*(.+?))?\}"]
+
+  @classmethod
+  def preserve_special_values(cls, value):
+"""
+Replace matches of PROXYUSER_SPECIAL_RE with random strings.
+
+:param value: input string
+:return: result string and dictionary that contains mapping random string 
to original value
+"""
+def gen_random_str():
+  return ''.join(random.choice(string.digits + string.ascii_letters) for _ 
in range(20))
+
+result = value
+replacements_dict = {}
+for regexp in cls.PROXYUSER_SPECIAL_RE:
+  for match in re.finditer(regexp, value):
+matched_string = match.string[match.start():match.end()]
+rand_str = gen_random_str()
+result = result.replace(matched_string, rand_str)
+replacements_dict[rand_str] = matched_string
+return result, replacements_dict
+
+  @staticmethod
+  def restore_special_values(data, replacement_dict):
+"""
+Replace random strings in data set to their original values using 
replacement_dict.
+
+:param data:
+:param replacement_dict:
+:return:
+"""
+for replacement, original in replacement_dict.iteritems():
+  data.remove(replacement)
+  data.add(original)
+
   def get_data_for_proxyuser(self, user_name, services, configurations, 
groups=False):
 """
 Returns values of proxyuser properties for given user. Properties can be
 hadoop.proxyuser.username.groups or hadoop.proxyuser.username.hosts
+
 :param user_name:
 :param services:
+:param configurations:
 :param groups: if true, will return values for group property, not hosts
 :return: tuple (wildcard_value, set[values]), where wildcard_value 
indicates if property value was *
 """
@@ -240,11 +279,14 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
   if property_value == "*":
 return True, set()
   else:
-result_values = set()
+property_value, replacement_map = 
self.preserve_special_values(property_value)
+result_values = set([v.strip() for v in property_value.split(",")])
 if "core-site" in configurations:
   if property_name in configurations["core-site"]['properties']:
-result_values = 
result_values.union(configurations["core-site"]['properties'][property_name].split(","))
-result_values = result_values.union(property_value.split(","))
+additional_value, additional_replacement_map = 
self.preserve_special_values(configurations["core-site"]['properties'][property_name])
+replacement_map.update(additional_replacement_map)
+result_values = result_values.union([v.strip() for v in 
additional_value.split(",")])
+self.restore_special_values(result_values, replacement_map)
 return False, result_values
 return False, set()
 



ambari git commit: AMBARI-19927. Some services were not started after adding in Kerberize cluster.(echekanskiy via vbrodetskyi)

2017-02-09 Thread vbrodetskyi
Repository: ambari
Updated Branches:
  refs/heads/trunk a1bd2987a -> 8561542e6


AMBARI-19927. Some services were not started after adding in Kerberize 
cluster.(echekanskiy via vbrodetskyi)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8561542e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8561542e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8561542e

Branch: refs/heads/trunk
Commit: 8561542e6eda848ef4aef53a70c6e13dce01175b
Parents: a1bd298
Author: Vitaly Brodetskyi 
Authored: Thu Feb 9 15:11:51 2017 +0200
Committer: Vitaly Brodetskyi 
Committed: Thu Feb 9 15:11:51 2017 +0200

--
 .../src/main/resources/stacks/stack_advisor.py  | 51 ++--
 1 file changed, 48 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8561542e/ambari-server/src/main/resources/stacks/stack_advisor.py
--
diff --git a/ambari-server/src/main/resources/stacks/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/stack_advisor.py
index d4b9ab7..abcd762 100644
--- a/ambari-server/src/main/resources/stacks/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/stack_advisor.py
@@ -20,8 +20,10 @@ limitations under the License.
 # Python Imports
 import imp
 import os
+import random
 import re
 import socket
+import string
 import traceback
 from math import ceil, floor
 from urlparse import urlparse
@@ -2238,6 +2240,42 @@ class DefaultStackAdvisor(StackAdvisor):
   #endregion
 
   #region Generic
+  PROXYUSER_SPECIAL_RE = 
[r"\$\{(?:([\w\-\.]+)/)?([\w\-\.]+)(?:\s*\|\s*(.+?))?\}"]
+
+  @classmethod
+  def preserve_special_values(cls, value):
+"""
+Replace matches of PROXYUSER_SPECIAL_RE with random strings.
+
+:param value: input string
+:return: result string and dictionary that contains mapping random string 
to original value
+"""
+def gen_random_str():
+  return ''.join(random.choice(string.digits + string.ascii_letters) for _ 
in range(20))
+
+result = value
+replacements_dict = {}
+for regexp in cls.PROXYUSER_SPECIAL_RE:
+  for match in re.finditer(regexp, value):
+matched_string = match.string[match.start():match.end()]
+rand_str = gen_random_str()
+result = result.replace(matched_string, rand_str)
+replacements_dict[rand_str] = matched_string
+return result, replacements_dict
+
+  @staticmethod
+  def restore_special_values(data, replacement_dict):
+"""
+Replace random strings in data set to their original values using 
replacement_dict.
+
+:param data:
+:param replacement_dict:
+:return:
+"""
+for replacement, original in replacement_dict.iteritems():
+  data.remove(replacement)
+  data.add(original)
+
   def put_proxyuser_value(self, user_name, value, is_groups=False, 
services=None, configurations=None, put_function=None):
 is_wildcard_value, current_value = self.get_data_for_proxyuser(user_name, 
services, configurations, is_groups)
 result_value = "*"
@@ -2256,8 +2294,10 @@ class DefaultStackAdvisor(StackAdvisor):
 """
 Returns values of proxyuser properties for given user. Properties can be
 hadoop.proxyuser.username.groups or hadoop.proxyuser.username.hosts
+
 :param user_name:
 :param services:
+:param configurations:
 :param groups: if true, will return values for group property, not hosts
 :return: tuple (wildcard_value, set[values]), where wildcard_value 
indicates if property value was *
 """
@@ -2274,11 +2314,16 @@ class DefaultStackAdvisor(StackAdvisor):
   if property_value == "*":
 return True, set()
   else:
-result_values = set()
+property_value, replacement_map = 
self.preserve_special_values(property_value)
+result_values = set([v.strip() for v in property_value.split(",")])
 if "core-site" in configurations:
   if property_name in configurations["core-site"]['properties']:
-result_values = 
result_values.union(configurations["core-site"]['properties'][property_name].split(","))
-result_values = result_values.union(property_value.split(","))
+additional_value, additional_replacement_map = 
self.preserve_special_values(
+configurations["core-site"]['properties'][property_name]
+)
+replacement_map.update(additional_replacement_map)
+result_values = result_values.union([v.strip() for v in 
additional_value.split(",")])
+self.restore_special_values(result_values, replacement_map)
 return False, result_values
 return False, set()
 



ambari git commit: AMBARI-19645 Log Search should use Credential Store API to store keystore/truststore passwords - ambari side (mgergely)

2017-02-09 Thread mgergely
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 6fed7e276 -> fa3b473c8


AMBARI-19645 Log Search should use Credential Store API to store 
keystore/truststore passwords - ambari side (mgergely)

Change-Id: Ieba7ed3e0a0a7440a07131913d1949d8b5f1579b


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fa3b473c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fa3b473c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fa3b473c

Branch: refs/heads/branch-2.5
Commit: fa3b473c8b1ddc257abaf227bb090f94d80576c5
Parents: 6fed7e2
Author: Miklos Gergely 
Authored: Thu Feb 9 13:37:55 2017 +0100
Committer: Miklos Gergely 
Committed: Thu Feb 9 13:37:55 2017 +0100

--
 .../0.5.0/configuration/logfeeder-env.xml   |  2 ++
 .../0.5.0/configuration/logsearch-env.xml   |  2 ++
 .../LOGSEARCH/0.5.0/metainfo.xml|  6 +
 .../LOGSEARCH/0.5.0/package/scripts/params.py   | 22 ---
 .../0.5.0/package/scripts/setup_logfeeder.py| 28 ++--
 .../0.5.0/package/scripts/setup_logsearch.py| 22 ++-
 .../stacks/2.4/LOGSEARCH/test_logfeeder.py  | 23 ++--
 .../stacks/2.4/LOGSEARCH/test_logsearch.py  | 19 +++--
 8 files changed, 45 insertions(+), 79 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/fa3b473c/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logfeeder-env.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logfeeder-env.xml
 
b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logfeeder-env.xml
index 508ef4e..e308479 100644
--- 
a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logfeeder-env.xml
+++ 
b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logfeeder-env.xml
@@ -90,6 +90,7 @@
 Password to open the trust store file.
 
   password
+  true
 
 
   
@@ -115,6 +116,7 @@
 Password to open the key store file.
 
   password
+  true
 
 
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/fa3b473c/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-env.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-env.xml
 
b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-env.xml
index 10b21be..f1e871d 100644
--- 
a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-env.xml
+++ 
b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-env.xml
@@ -135,6 +135,7 @@
 Password to open the trust store file.
 
   password
+  true
 
 
   
@@ -160,6 +161,7 @@
 Password to open the key store file.
 
   password
+  true
 
 
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/fa3b473c/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/metainfo.xml 
b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/metainfo.xml
index 2b95b78..245a94d 100644
--- 
a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/metainfo.xml
+++ 
b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/metainfo.xml
@@ -24,6 +24,12 @@
   Log aggregation, analysis, and visualization for Ambari managed 
services. This service is bTechnical Preview/b.
   0.5.0
 
+
+  
+true
+true
+  
+
   
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/fa3b473c/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py
index 08c0a7b..fecd802 100644
--- 
a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py
@@ -18,6 +18,8 @@ See the License for the specific language governing 
permissions and
 limitations under the License.
 
 """
+
+import os
 from ambari_commons.constants import AMBARI_SUDO_BINARY
 from 

ambari git commit: AMBARI-19645 Log Search should use Credential Store API to store keystore/truststore passwords - ambari side (mgergely)

2017-02-09 Thread mgergely
Repository: ambari
Updated Branches:
  refs/heads/trunk e9f07973f -> a1bd2987a


AMBARI-19645 Log Search should use Credential Store API to store 
keystore/truststore passwords - ambari side (mgergely)

Change-Id: I0d7cf0c85f2cb5e1cbfabd681a6f6aab2d66bcb9


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a1bd2987
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a1bd2987
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a1bd2987

Branch: refs/heads/trunk
Commit: a1bd2987aad13f84cc0e93ae7f87c10d11b034d0
Parents: e9f0797
Author: Miklos Gergely 
Authored: Thu Feb 9 13:36:03 2017 +0100
Committer: Miklos Gergely 
Committed: Thu Feb 9 13:37:03 2017 +0100

--
 .../0.5.0/configuration/logfeeder-env.xml   |  2 ++
 .../0.5.0/configuration/logsearch-env.xml   |  2 ++
 .../LOGSEARCH/0.5.0/metainfo.xml|  6 +
 .../LOGSEARCH/0.5.0/package/scripts/params.py   | 22 ---
 .../0.5.0/package/scripts/setup_logfeeder.py| 28 ++--
 .../0.5.0/package/scripts/setup_logsearch.py| 22 ++-
 .../stacks/2.4/LOGSEARCH/test_logfeeder.py  | 23 ++--
 .../stacks/2.4/LOGSEARCH/test_logsearch.py  | 19 +++--
 8 files changed, 45 insertions(+), 79 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a1bd2987/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logfeeder-env.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logfeeder-env.xml
 
b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logfeeder-env.xml
index 508ef4e..e308479 100644
--- 
a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logfeeder-env.xml
+++ 
b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logfeeder-env.xml
@@ -90,6 +90,7 @@
 Password to open the trust store file.
 
   password
+  true
 
 
   
@@ -115,6 +116,7 @@
 Password to open the key store file.
 
   password
+  true
 
 
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/a1bd2987/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-env.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-env.xml
 
b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-env.xml
index 10b21be..f1e871d 100644
--- 
a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-env.xml
+++ 
b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-env.xml
@@ -135,6 +135,7 @@
 Password to open the trust store file.
 
   password
+  true
 
 
   
@@ -160,6 +161,7 @@
 Password to open the key store file.
 
   password
+  true
 
 
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/a1bd2987/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/metainfo.xml 
b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/metainfo.xml
index 8a9105e..5f6ec51 100644
--- 
a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/metainfo.xml
+++ 
b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/metainfo.xml
@@ -24,6 +24,12 @@
   Log aggregation, analysis, and visualization for Ambari managed 
services. This service is bTechnical Preview/b.
   0.5.0
   TECH_PREVIEW
+  
+  
+true
+true
+  
+  
   
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/a1bd2987/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py
index 08c0a7b..fecd802 100644
--- 
a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py
@@ -18,6 +18,8 @@ See the License for the specific language governing 
permissions and
 limitations under the License.
 
 """
+
+import os
 from ambari_commons.constants import 

ambari git commit: AMBARI-19934. Confusing Auto Start settings page behavior when loading and API takes a while (onechiporenko)

2017-02-09 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 7b40c5bad -> e9f07973f


AMBARI-19934. Confusing Auto Start settings page behavior when loading and API 
takes a while (onechiporenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e9f07973
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e9f07973
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e9f07973

Branch: refs/heads/trunk
Commit: e9f07973f4c516590aca3e57e320a72a0bcedfe7
Parents: 7b40c5b
Author: Oleg Nechiporenko 
Authored: Thu Feb 9 12:15:02 2017 +0200
Committer: Oleg Nechiporenko 
Committed: Thu Feb 9 14:29:53 2017 +0200

--
 .../templates/main/admin/service_auto_start.hbs | 28 +++-
 .../app/views/main/admin/service_auto_start.js  |  8 +++---
 .../views/main/admin/service_auto_start_test.js |  2 ++
 3 files changed, 20 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e9f07973/ambari-web/app/templates/main/admin/service_auto_start.hbs
--
diff --git a/ambari-web/app/templates/main/admin/service_auto_start.hbs 
b/ambari-web/app/templates/main/admin/service_auto_start.hbs
index 0de7d40..6dc7dc5 100644
--- a/ambari-web/app/templates/main/admin/service_auto_start.hbs
+++ b/ambari-web/app/templates/main/admin/service_auto_start.hbs
@@ -19,21 +19,21 @@
 
   {{t admin.serviceAutoStart.header}}
   {{t admin.serviceAutoStart.header.text}}
-  
-
-  {{t admin.serviceAutoStart.body.text}}
-
-
-  {{view App.CheckboxView checkedBinding="controller.servicesAutoStart"}}
-
-
-  
-{{t 
common.discard}}
-{{t 
common.save}}
+  {{#if view.isLoaded}}
+
+  
+{{t admin.serviceAutoStart.body.text}}
+  
+  
+{{view App.CheckboxView checkedBinding="controller.servicesAutoStart"}}
+  
+  
+
+  {{t 
common.discard}}
+  {{t 
common.save}}
+
   
 
-  
-  {{#if view.isLoaded}}
 
 
   
@@ -99,5 +99,7 @@
 
   
 
+  {{else}}
+{{view App.SpinnerView}}
   {{/if}}
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/e9f07973/ambari-web/app/views/main/admin/service_auto_start.js
--
diff --git a/ambari-web/app/views/main/admin/service_auto_start.js 
b/ambari-web/app/views/main/admin/service_auto_start.js
index 317b029..6f7d644 100644
--- a/ambari-web/app/views/main/admin/service_auto_start.js
+++ b/ambari-web/app/views/main/admin/service_auto_start.js
@@ -30,12 +30,10 @@ App.MainAdminServiceAutoStartView = Em.View.extend({
   isDisabled: false,
 
   didInsertElement: function () {
-var self = this;
-
 this.set('isDisabled', !App.isAuthorized('CLUSTER.MANAGE_AUTO_START'));
-this.get('controller').load().then(function() {
-  self.set('isLoaded', true);
-  self.initSwitcher();
+this.get('controller').load().then(() => {
+  this.set('isLoaded', true);
+  Em.run.next(() => this.initSwitcher());
 });
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/e9f07973/ambari-web/test/views/main/admin/service_auto_start_test.js
--
diff --git a/ambari-web/test/views/main/admin/service_auto_start_test.js 
b/ambari-web/test/views/main/admin/service_auto_start_test.js
index f45f784..0edcf28 100644
--- a/ambari-web/test/views/main/admin/service_auto_start_test.js
+++ b/ambari-web/test/views/main/admin/service_auto_start_test.js
@@ -34,6 +34,7 @@ describe('App.MainAdminServiceAutoStartView', function () {
 
 beforeEach(function() {
   sinon.stub(view, 'initSwitcher');
+  sinon.stub(Em.run, 'next', Em.clb);
   sinon.stub(view.get('controller'), 'load').returns({
 then: Em.clb
   })
@@ -42,6 +43,7 @@ describe('App.MainAdminServiceAutoStartView', function () {
 afterEach(function() {
   view.initSwitcher.restore();
   view.get('controller').load.restore();
+  Em.run.next.restore();
 });
 
 it('initSwitcher should be called', function() {



ambari git commit: AMBARI-19934. Confusing Auto Start settings page behavior when loading and API takes a while (onechiporenko)

2017-02-09 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 971887938 -> 6fed7e276


AMBARI-19934. Confusing Auto Start settings page behavior when loading and API 
takes a while (onechiporenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6fed7e27
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6fed7e27
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6fed7e27

Branch: refs/heads/branch-2.5
Commit: 6fed7e276d86f5536edea73d2ac246a268d63b34
Parents: 9718879
Author: Oleg Nechiporenko 
Authored: Thu Feb 9 11:45:26 2017 +0200
Committer: Oleg Nechiporenko 
Committed: Thu Feb 9 14:29:35 2017 +0200

--
 .../templates/main/admin/service_auto_start.hbs   | 10 +++---
 .../app/views/main/admin/service_auto_start.js| 18 +-
 2 files changed, 20 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6fed7e27/ambari-web/app/templates/main/admin/service_auto_start.hbs
--
diff --git a/ambari-web/app/templates/main/admin/service_auto_start.hbs 
b/ambari-web/app/templates/main/admin/service_auto_start.hbs
index 87fc915..eec159c 100644
--- a/ambari-web/app/templates/main/admin/service_auto_start.hbs
+++ b/ambari-web/app/templates/main/admin/service_auto_start.hbs
@@ -24,8 +24,9 @@
 {{t admin.serviceAutoStart.header.text}}
   
   
+  {{#if view.isLoaded}}
   
-  
+  
   {{t admin.serviceAutoStart.body.text}}
   
   
@@ -38,9 +39,9 @@
   
 {{#if view.switcherValue}}
 
-{{t 
common.service}}{{t common.component}}{{t common.status}}
+{{t 
common.service}}{{t common.component}}{{t common.status}}
 
-
+
 {{#each tab in controller.tabs}}
 
 
@@ -74,4 +75,7 @@
 
 
 {{/if}}
+  {{else}}
+{{view App.SpinnerView}}
+  {{/if}}
 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/6fed7e27/ambari-web/app/views/main/admin/service_auto_start.js
--
diff --git a/ambari-web/app/views/main/admin/service_auto_start.js 
b/ambari-web/app/views/main/admin/service_auto_start.js
index be928ed..ce487d0 100644
--- a/ambari-web/app/views/main/admin/service_auto_start.js
+++ b/ambari-web/app/views/main/admin/service_auto_start.js
@@ -30,6 +30,12 @@ App.MainAdminServiceAutoStartView = Em.View.extend({
 
   savedRecoveryEnabled: false,
 
+  /**
+   * @type {boolean}
+   * @default false
+   */
+  isLoaded: false,
+
   isDisabled: false,
 
   didInsertElement: function () {
@@ -47,11 +53,13 @@ App.MainAdminServiceAutoStartView = Em.View.extend({
 self.set('controller.clusterConfigs', data[0].properties);
 self.set('switcherValue', data[0].properties.recovery_enabled === 
'true');
 self.set('savedRecoveryEnabled', self.get('switcherValue'));
-// plugin should be initiated after applying binding for switcherValue
-Em.run.later('sync', function() {
-  self.initSwitcher();
-}.bind(self), 10);
-self.get('controller').loadComponentsConfigs();
+self.get('controller').loadComponentsConfigs().then(function () {
+  Em.run.later('sync', function() {
+// plugin should be initiated after applying binding for 
switcherValue
+self.initSwitcher();
+  }.bind(self), 10);
+  self.set('isLoaded', true);
+});
   });
 });
   },



ambari git commit: AMBARI-19917. Error to tag is not coming for the action node upon copying.(Padma Priya N via gauravn7)

2017-02-09 Thread gnagar
Repository: ambari
Updated Branches:
  refs/heads/trunk af8b1cdfe -> 7b40c5bad


AMBARI-19917. Error to tag is not coming for the action node upon 
copying.(Padma Priya N via gauravn7)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7b40c5ba
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7b40c5ba
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7b40c5ba

Branch: refs/heads/trunk
Commit: 7b40c5badbc262ced220d239d029423e4c48500b
Parents: af8b1cd
Author: Gaurav Nagar 
Authored: Thu Feb 9 17:10:31 2017 +0530
Committer: Gaurav Nagar 
Committed: Thu Feb 9 17:11:19 2017 +0530

--
 .../views/wfmanager/src/main/resources/ui/app/domain/workflow.js| 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7b40c5ba/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js
--
diff --git 
a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js 
b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js
index 3ca20d2..02842c5 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js
@@ -116,6 +116,7 @@ var Workflow= Ember.Object.extend(FindNodeMixin,{
 }else{
   generatedNode = this.nodeFactory.createActionNode(type);
   generatedNode.addTransitionTo(target);
+  
generatedNode.addTransitionTo(this.get('killNodes').findBy('name',Constants.defaultKillNodeName),
 "error");
 }
 return generatedNode;
   },



ambari git commit: AMBARI-19917. Error to tag is not coming for the action node upon copying.(Padma Priya N via gauravn7)

2017-02-09 Thread gnagar
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 a512b3e67 -> 971887938


AMBARI-19917. Error to tag is not coming for the action node upon 
copying.(Padma Priya N via gauravn7)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/97188793
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/97188793
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/97188793

Branch: refs/heads/branch-2.5
Commit: 971887938eb4afb536c0de35610dcbe5929c6e92
Parents: a512b3e
Author: Gaurav Nagar 
Authored: Thu Feb 9 17:10:31 2017 +0530
Committer: Gaurav Nagar 
Committed: Thu Feb 9 17:10:31 2017 +0530

--
 .../views/wfmanager/src/main/resources/ui/app/domain/workflow.js| 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/97188793/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js
--
diff --git 
a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js 
b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js
index 3ca20d2..02842c5 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js
@@ -116,6 +116,7 @@ var Workflow= Ember.Object.extend(FindNodeMixin,{
 }else{
   generatedNode = this.nodeFactory.createActionNode(type);
   generatedNode.addTransitionTo(target);
+  
generatedNode.addTransitionTo(this.get('killNodes').findBy('name',Constants.defaultKillNodeName),
 "error");
 }
 return generatedNode;
   },



ambari git commit: AMBARI-19891 - Extend View URL's to auto instances This commit creates a default view URL for each view using the view name.(Ashwin Rajeev via gauravn7)

2017-02-09 Thread gnagar
Repository: ambari
Updated Branches:
  refs/heads/trunk 9c07b8b54 -> af8b1cdfe


AMBARI-19891 - Extend View URL's to auto instances This commit creates a 
default view URL for each view using the view name.(Ashwin Rajeev via gauravn7)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/af8b1cdf
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/af8b1cdf
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/af8b1cdf

Branch: refs/heads/trunk
Commit: af8b1cdfee14c11c2b37a0da6faa1aa3361ddf36
Parents: 9c07b8b
Author: Gaurav Nagar 
Authored: Thu Feb 9 15:59:09 2017 +0530
Committer: Gaurav Nagar 
Committed: Thu Feb 9 15:59:35 2017 +0530

--
 .../apache/ambari/server/orm/dao/ViewDAO.java   |  8 ++-
 .../apache/ambari/server/view/ViewRegistry.java | 62 
 2 files changed, 67 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/af8b1cdf/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ViewDAO.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ViewDAO.java 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ViewDAO.java
index ab6dcf4..192e426 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ViewDAO.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ViewDAO.java
@@ -26,6 +26,7 @@ import javax.persistence.TypedQuery;
 import org.apache.ambari.server.orm.RequiresSession;
 import org.apache.ambari.server.orm.entities.ViewEntity;
 
+import com.google.common.collect.Lists;
 import com.google.inject.Inject;
 import com.google.inject.Provider;
 import com.google.inject.Singleton;
@@ -62,15 +63,16 @@ public class ViewDAO {
* @return  a matching view or null
*/
   @RequiresSession
-  public ViewEntity findByCommonName(String viewCommonName) {
+  public List findByCommonName(String viewCommonName) {
+List list = Lists.newArrayList();
 if (viewCommonName != null) {
   for (ViewEntity viewEntity : findAll()) {
 if (viewCommonName.equals(viewEntity.getCommonName())) {
-  return viewEntity;
+  list.add(viewEntity);
 }
   }
 }
-return null;
+return list;
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/af8b1cdf/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java 
b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
index 6316b5b..81c4734 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
@@ -71,6 +71,7 @@ import org.apache.ambari.server.orm.dao.ResourceTypeDAO;
 import org.apache.ambari.server.orm.dao.UserDAO;
 import org.apache.ambari.server.orm.dao.ViewDAO;
 import org.apache.ambari.server.orm.dao.ViewInstanceDAO;
+import org.apache.ambari.server.orm.dao.ViewURLDAO;
 import org.apache.ambari.server.orm.entities.GroupEntity;
 import org.apache.ambari.server.orm.entities.MemberEntity;
 import org.apache.ambari.server.orm.entities.PermissionEntity;
@@ -86,6 +87,7 @@ import 
org.apache.ambari.server.orm.entities.ViewInstanceDataEntity;
 import org.apache.ambari.server.orm.entities.ViewInstanceEntity;
 import org.apache.ambari.server.orm.entities.ViewParameterEntity;
 import org.apache.ambari.server.orm.entities.ViewResourceEntity;
+import org.apache.ambari.server.orm.entities.ViewURLEntity;
 import org.apache.ambari.server.security.SecurityHelper;
 import org.apache.ambari.server.security.authorization.AuthorizationHelper;
 import org.apache.ambari.server.security.authorization.ResourceType;
@@ -125,6 +127,8 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.xml.sax.SAXException;
 
+import com.google.common.base.Optional;
+import com.google.common.base.Preconditions;
 import com.google.common.collect.Sets;
 import com.google.common.eventbus.AllowConcurrentEvents;
 import com.google.common.eventbus.Subscribe;
@@ -133,6 +137,7 @@ import com.google.inject.Guice;
 import com.google.inject.Injector;
 import com.google.inject.persist.Transactional;
 
+
 /**
  * Registry for view and view instance definitions.
  */
@@ -153,6 +158,7 @@ public class ViewRegistry {
   private static final String LOG4J = "log4j.";
 
   public static final String API_PREFIX = "/api/v1/clusters/";
+  public static final String DEFAULT_AUTO_INSTANCE_URL = "auto_instance";
 
   /**
* Thread pool
@@ -317,6 +323,9 @@ public class ViewRegistry {
   @Inject
   

ambari git commit: AMBARI-19916. HiveView2.0: No option to search for jobs in the jobs tab. (dipayanb)

2017-02-09 Thread dbhowmick
Repository: ambari
Updated Branches:
  refs/heads/trunk e6dcc0920 -> 9c07b8b54


AMBARI-19916. HiveView2.0: No option to search for jobs in the jobs tab. 
(dipayanb)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9c07b8b5
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9c07b8b5
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9c07b8b5

Branch: refs/heads/trunk
Commit: 9c07b8b54c52d332d3f0268e9cbf920e959af208
Parents: e6dcc09
Author: Dipayan Bhowmick 
Authored: Thu Feb 9 15:54:11 2017 +0530
Committer: Dipayan Bhowmick 
Committed: Thu Feb 9 15:54:38 2017 +0530

--
 .../resources/ui/app/components/jobs-browser.js | 39 ++--
 .../src/main/resources/ui/app/styles/app.scss   |  2 +-
 .../app/templates/components/jobs-browser.hbs   | 17 +++--
 3 files changed, 49 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/9c07b8b5/contrib/views/hive20/src/main/resources/ui/app/components/jobs-browser.js
--
diff --git 
a/contrib/views/hive20/src/main/resources/ui/app/components/jobs-browser.js 
b/contrib/views/hive20/src/main/resources/ui/app/components/jobs-browser.js
index b0a82b0..7179d45 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/components/jobs-browser.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/components/jobs-browser.js
@@ -22,15 +22,33 @@ export default Ember.Component.extend({
   startTime: null,
   endTime: null,
   maxEndTime: null,
-  statusCounts: Ember.computed('jobs', function() {
-return this.get('jobs').reduce((acc, item, index) => {
+  statusFilter: null,
+  titleFilter: null,
+
+  titleFilteredJobs: Ember.computed('jobs', 'titleFilter', function() {
+if (!Ember.isEmpty(this.get('titleFilter'))) {
+  return (this.get('jobs').filter((entry) => 
entry.get('title').toLowerCase().indexOf(this.get('titleFilter').toLowerCase()) 
>= 0));
+} else {
+  return this.get('jobs');
+}
+  }),
+
+  filteredJobs: Ember.computed('titleFilteredJobs', 'statusFilter', function 
() {
+if (this.get('statusFilter')) {
+  return  this.get('titleFilteredJobs').filter((entry) => 
entry.get('status').toLowerCase() === this.get('statusFilter'));
+} else {
+  return this.get('titleFilteredJobs');
+}
+  }),
+
+  statusCounts: Ember.computed('titleFilteredJobs', function () {
+return this.get('titleFilteredJobs').reduce((acc, item, index) => {
   let status = item.get('status').toLowerCase();
-  if(Ember.isEmpty(acc[status])) {
+  if (Ember.isEmpty(acc[status])) {
 acc[status] = 1;
   } else {
 acc[status] = acc[status] + 1;
   }
-
   return acc;
 }, {});
   }),
@@ -39,6 +57,19 @@ export default Ember.Component.extend({
   actions: {
 setDateRange(startDate, endDate) {
   this.sendAction('filterChanged', startDate, endDate);
+},
+
+selectJobForStatus(status) {
+  let s = status.toLowerCase();
+  if (s === 'all') {
+this.set('statusFilter');
+  } else {
+this.set('statusFilter', s);
+  }
+},
+
+clearTitleFilter() {
+  this.set('titleFilter');
 }
   }
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/9c07b8b5/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss
--
diff --git a/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss 
b/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss
index 4f73ef8..0dae396 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss
+++ b/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss
@@ -787,7 +787,7 @@ pre {
   border-top: 1px solid darken($body-bg, 10%);
   border-bottom: 1px solid darken($body-bg, 10%);
   .strip {
-margin-top: 25px;
+margin-top: 20px;
   }
 }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/9c07b8b5/contrib/views/hive20/src/main/resources/ui/app/templates/components/jobs-browser.hbs
--
diff --git 
a/contrib/views/hive20/src/main/resources/ui/app/templates/components/jobs-browser.hbs
 
b/contrib/views/hive20/src/main/resources/ui/app/templates/components/jobs-browser.hbs
index abb4a97..014691e 100644
--- 
a/contrib/views/hive20/src/main/resources/ui/app/templates/components/jobs-browser.hbs
+++ 
b/contrib/views/hive20/src/main/resources/ui/app/templates/components/jobs-browser.hbs
@@ -18,15 +18,24 @@
 
 
   
-
+
   
-
+
+  {{titleFilteredJobs.length}} All
   {{#each-in statusCounts as |status count|}}
-{{count}} {{status}}
+

ambari git commit: AMBARI-19916. HiveView2.0: No option to search for jobs in the jobs tab. (dipayanb)

2017-02-09 Thread dbhowmick
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 38cf7a63d -> a512b3e67


AMBARI-19916. HiveView2.0: No option to search for jobs in the jobs tab. 
(dipayanb)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a512b3e6
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a512b3e6
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a512b3e6

Branch: refs/heads/branch-2.5
Commit: a512b3e67f6023166471dd6b05e9fb2e5c497454
Parents: 38cf7a6
Author: Dipayan Bhowmick 
Authored: Thu Feb 9 15:54:11 2017 +0530
Committer: Dipayan Bhowmick 
Committed: Thu Feb 9 15:54:11 2017 +0530

--
 .../resources/ui/app/components/jobs-browser.js | 39 ++--
 .../src/main/resources/ui/app/styles/app.scss   |  2 +-
 .../app/templates/components/jobs-browser.hbs   | 17 +++--
 3 files changed, 49 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a512b3e6/contrib/views/hive20/src/main/resources/ui/app/components/jobs-browser.js
--
diff --git 
a/contrib/views/hive20/src/main/resources/ui/app/components/jobs-browser.js 
b/contrib/views/hive20/src/main/resources/ui/app/components/jobs-browser.js
index b0a82b0..7179d45 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/components/jobs-browser.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/components/jobs-browser.js
@@ -22,15 +22,33 @@ export default Ember.Component.extend({
   startTime: null,
   endTime: null,
   maxEndTime: null,
-  statusCounts: Ember.computed('jobs', function() {
-return this.get('jobs').reduce((acc, item, index) => {
+  statusFilter: null,
+  titleFilter: null,
+
+  titleFilteredJobs: Ember.computed('jobs', 'titleFilter', function() {
+if (!Ember.isEmpty(this.get('titleFilter'))) {
+  return (this.get('jobs').filter((entry) => 
entry.get('title').toLowerCase().indexOf(this.get('titleFilter').toLowerCase()) 
>= 0));
+} else {
+  return this.get('jobs');
+}
+  }),
+
+  filteredJobs: Ember.computed('titleFilteredJobs', 'statusFilter', function 
() {
+if (this.get('statusFilter')) {
+  return  this.get('titleFilteredJobs').filter((entry) => 
entry.get('status').toLowerCase() === this.get('statusFilter'));
+} else {
+  return this.get('titleFilteredJobs');
+}
+  }),
+
+  statusCounts: Ember.computed('titleFilteredJobs', function () {
+return this.get('titleFilteredJobs').reduce((acc, item, index) => {
   let status = item.get('status').toLowerCase();
-  if(Ember.isEmpty(acc[status])) {
+  if (Ember.isEmpty(acc[status])) {
 acc[status] = 1;
   } else {
 acc[status] = acc[status] + 1;
   }
-
   return acc;
 }, {});
   }),
@@ -39,6 +57,19 @@ export default Ember.Component.extend({
   actions: {
 setDateRange(startDate, endDate) {
   this.sendAction('filterChanged', startDate, endDate);
+},
+
+selectJobForStatus(status) {
+  let s = status.toLowerCase();
+  if (s === 'all') {
+this.set('statusFilter');
+  } else {
+this.set('statusFilter', s);
+  }
+},
+
+clearTitleFilter() {
+  this.set('titleFilter');
 }
   }
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/a512b3e6/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss
--
diff --git a/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss 
b/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss
index 4f73ef8..0dae396 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss
+++ b/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss
@@ -787,7 +787,7 @@ pre {
   border-top: 1px solid darken($body-bg, 10%);
   border-bottom: 1px solid darken($body-bg, 10%);
   .strip {
-margin-top: 25px;
+margin-top: 20px;
   }
 }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/a512b3e6/contrib/views/hive20/src/main/resources/ui/app/templates/components/jobs-browser.hbs
--
diff --git 
a/contrib/views/hive20/src/main/resources/ui/app/templates/components/jobs-browser.hbs
 
b/contrib/views/hive20/src/main/resources/ui/app/templates/components/jobs-browser.hbs
index abb4a97..014691e 100644
--- 
a/contrib/views/hive20/src/main/resources/ui/app/templates/components/jobs-browser.hbs
+++ 
b/contrib/views/hive20/src/main/resources/ui/app/templates/components/jobs-browser.hbs
@@ -18,15 +18,24 @@
 
 
   
-
+
   
-
+
+  {{titleFilteredJobs.length}} All
   {{#each-in statusCounts as |status count|}}
-{{count}} {{status}}
+  

ambari git commit: AMBARI-19914. Hive View 2.0: Go to Table manager and click on statistics, the panel does not come up. (dipayanb)

2017-02-09 Thread dbhowmick
Repository: ambari
Updated Branches:
  refs/heads/trunk 170497e92 -> e6dcc0920


AMBARI-19914. Hive View 2.0: Go to Table manager and click on statistics, the 
panel does not come up. (dipayanb)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e6dcc092
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e6dcc092
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e6dcc092

Branch: refs/heads/trunk
Commit: e6dcc0920b053f6b294323575f2c28982af4e943
Parents: 170497e
Author: Dipayan Bhowmick 
Authored: Thu Feb 9 15:43:14 2017 +0530
Committer: Dipayan Bhowmick 
Committed: Thu Feb 9 15:44:01 2017 +0530

--
 .../src/main/resources/ui/app/components/table-statistics.js   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e6dcc092/contrib/views/hive20/src/main/resources/ui/app/components/table-statistics.js
--
diff --git 
a/contrib/views/hive20/src/main/resources/ui/app/components/table-statistics.js 
b/contrib/views/hive20/src/main/resources/ui/app/components/table-statistics.js
index d53a41f..1623e0e 100644
--- 
a/contrib/views/hive20/src/main/resources/ui/app/components/table-statistics.js
+++ 
b/contrib/views/hive20/src/main/resources/ui/app/components/table-statistics.js
@@ -28,7 +28,7 @@ export default Ember.Component.extend({
 
   columnStatsAccurate: Ember.computed('table.tableStats.columnStatsAccurate', 
function () {
 let columnStatsJson = this.get('table.tableStats.columnStatsAccurate');
-return JSON.parse(columnStatsJson.replace(/\\\"/g, '"'));
+return Ember.isEmpty(columnStatsJson) ? {} : 
JSON.parse(columnStatsJson.replace(/\\\"/g, '"'));
   }),
 
   columnsWithStatistics: Ember.computed('columnStatsAccurate', function () {



ambari git commit: AMBARI-19914. Hive View 2.0: Go to Table manager and click on statistics, the panel does not come up. (dipayanb)

2017-02-09 Thread dbhowmick
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 a2c5addcf -> 38cf7a63d


AMBARI-19914. Hive View 2.0: Go to Table manager and click on statistics, the 
panel does not come up. (dipayanb)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/38cf7a63
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/38cf7a63
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/38cf7a63

Branch: refs/heads/branch-2.5
Commit: 38cf7a63dfd1e5b0f9f538ce114d8cc4b50f1acb
Parents: a2c5add
Author: Dipayan Bhowmick 
Authored: Thu Feb 9 15:43:14 2017 +0530
Committer: Dipayan Bhowmick 
Committed: Thu Feb 9 15:43:14 2017 +0530

--
 .../src/main/resources/ui/app/components/table-statistics.js   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/38cf7a63/contrib/views/hive20/src/main/resources/ui/app/components/table-statistics.js
--
diff --git 
a/contrib/views/hive20/src/main/resources/ui/app/components/table-statistics.js 
b/contrib/views/hive20/src/main/resources/ui/app/components/table-statistics.js
index d53a41f..1623e0e 100644
--- 
a/contrib/views/hive20/src/main/resources/ui/app/components/table-statistics.js
+++ 
b/contrib/views/hive20/src/main/resources/ui/app/components/table-statistics.js
@@ -28,7 +28,7 @@ export default Ember.Component.extend({
 
   columnStatsAccurate: Ember.computed('table.tableStats.columnStatsAccurate', 
function () {
 let columnStatsJson = this.get('table.tableStats.columnStatsAccurate');
-return JSON.parse(columnStatsJson.replace(/\\\"/g, '"'));
+return Ember.isEmpty(columnStatsJson) ? {} : 
JSON.parse(columnStatsJson.replace(/\\\"/g, '"'));
   }),
 
   columnsWithStatistics: Ember.computed('columnStatsAccurate', function () {



ambari git commit: AMBARI-19918 : Reset Workflow on newly created workflow blocks UI(Venkata Sairam via nitirajrathore)

2017-02-09 Thread nitiraj
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 8f22a3b88 -> a2c5addcf


AMBARI-19918 : Reset Workflow on newly created workflow blocks UI(Venkata 
Sairam via nitirajrathore)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a2c5addc
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a2c5addc
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a2c5addc

Branch: refs/heads/branch-2.5
Commit: a2c5addcf3eebb26f203bd23d6a423ac07c97491
Parents: 8f22a3b
Author: Nitiraj Singh Rathore 
Authored: Thu Feb 9 15:11:37 2017 +0530
Committer: Nitiraj Singh Rathore 
Committed: Thu Feb 9 15:11:37 2017 +0530

--
 .../ui/app/components/bundle-config.js  |  1 +
 .../resources/ui/app/components/coord-config.js |  1 +
 .../ui/app/components/designer-workspace.js | 37 ++-
 .../resources/ui/app/components/drafts-wf.js|  2 +-
 .../ui/app/components/flow-designer.js  |  2 +
 .../src/main/resources/ui/app/routes/design.js  |  7 ---
 .../templates/components/designer-workspace.hbs | 66 +++-
 7 files changed, 64 insertions(+), 52 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a2c5addc/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js
--
diff --git 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js
index 445b86e..658cbc0 100644
--- 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js
+++ 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js
@@ -304,6 +304,7 @@ export default Ember.Component.extend(Ember.Evented, 
Validations, {
 },
 resetBundle(){
   this.get('errors').clear();
+  this.set('showingResetConfirmation', false);
   if(this.get('bundleFilePath')){
 this.importBundle(this.get('bundleFilePath'));
   }else {

http://git-wip-us.apache.org/repos/asf/ambari/blob/a2c5addc/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js
--
diff --git 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js
index b045798..39b9d11 100644
--- 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js
+++ 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js
@@ -558,6 +558,7 @@ export default Ember.Component.extend(Validations, 
Ember.Evented, {
 },
 resetCoordinator(){
   this.get("errors").clear();
+  this.set('showingResetConfirmation', false);
   if(this.get('coordinatorFilePath')){
 this.importCoordinator(this.get('coordinatorFilePath'));
   }else{

http://git-wip-us.apache.org/repos/asf/ambari/blob/a2c5addc/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js
--
diff --git 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js
 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js
index 0b689b0..aa2e791 100644
--- 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js
+++ 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js
@@ -34,6 +34,7 @@ export default Ember.Component.extend({
   }),
   tabsObserver : Ember.observer('tabs.[]', 'ta...@each.name', 
'tabs.@each.filePath', function(){
 this.get('workspaceManager').saveTabs(this.get('tabs'));
+this.tabManager();
   }),
   initialize : function(){
 if (Constants.isProjectManagerEnabled) {
@@ -66,20 +67,7 @@ export default Ember.Component.extend({
   });
   }.on('init'),
   elementsInserted : function(){
-this.$('.nav-tabs a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
-  var id = this.$(e.target).attr('href').slice(1);
-  this.get('workspaceManager').setLastActiveTab(id);
-  var tab = this.get('tabs').findBy('id', id);
-  if(tab.type === 'dashboard'){
-this.sendAction('showDashboard');
-  } else if (tab.type === 'Projects') {
-this.createOrShowProjManager();
-  }
-  else{
-this.sendAction('hideDashboard');
-  }
-}.bind(this));
-
+this.tabManager();
 if(this.get('tabs') && this.get('tabs').length > 0){
   var lastActiveTabId = this.get('workspaceManager').getLastActiveTab();
   var activeTab = this.get('tabs').findBy('id', lastActiveTabId);
@@ -98,6 +86,23 @@ 

ambari git commit: AMBARI-19918 : Reset Workflow on newly created workflow blocks UI(Venkata Sairam via nitirajrathore)

2017-02-09 Thread nitiraj
Repository: ambari
Updated Branches:
  refs/heads/trunk f14168330 -> 170497e92


AMBARI-19918 : Reset Workflow on newly created workflow blocks UI(Venkata 
Sairam via nitirajrathore)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/170497e9
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/170497e9
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/170497e9

Branch: refs/heads/trunk
Commit: 170497e92ff558f3505314153acf76954ba9ca3b
Parents: f141683
Author: Nitiraj Singh Rathore 
Authored: Thu Feb 9 15:11:37 2017 +0530
Committer: Nitiraj Singh Rathore 
Committed: Thu Feb 9 15:12:34 2017 +0530

--
 .../ui/app/components/bundle-config.js  |  1 +
 .../resources/ui/app/components/coord-config.js |  1 +
 .../ui/app/components/designer-workspace.js | 37 ++-
 .../resources/ui/app/components/drafts-wf.js|  2 +-
 .../ui/app/components/flow-designer.js  |  2 +
 .../src/main/resources/ui/app/routes/design.js  |  7 ---
 .../templates/components/designer-workspace.hbs | 66 +++-
 7 files changed, 64 insertions(+), 52 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/170497e9/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js
--
diff --git 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js
index 445b86e..658cbc0 100644
--- 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js
+++ 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js
@@ -304,6 +304,7 @@ export default Ember.Component.extend(Ember.Evented, 
Validations, {
 },
 resetBundle(){
   this.get('errors').clear();
+  this.set('showingResetConfirmation', false);
   if(this.get('bundleFilePath')){
 this.importBundle(this.get('bundleFilePath'));
   }else {

http://git-wip-us.apache.org/repos/asf/ambari/blob/170497e9/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js
--
diff --git 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js
index b045798..39b9d11 100644
--- 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js
+++ 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js
@@ -558,6 +558,7 @@ export default Ember.Component.extend(Validations, 
Ember.Evented, {
 },
 resetCoordinator(){
   this.get("errors").clear();
+  this.set('showingResetConfirmation', false);
   if(this.get('coordinatorFilePath')){
 this.importCoordinator(this.get('coordinatorFilePath'));
   }else{

http://git-wip-us.apache.org/repos/asf/ambari/blob/170497e9/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js
--
diff --git 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js
 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js
index 0b689b0..aa2e791 100644
--- 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js
+++ 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js
@@ -34,6 +34,7 @@ export default Ember.Component.extend({
   }),
   tabsObserver : Ember.observer('tabs.[]', 'ta...@each.name', 
'tabs.@each.filePath', function(){
 this.get('workspaceManager').saveTabs(this.get('tabs'));
+this.tabManager();
   }),
   initialize : function(){
 if (Constants.isProjectManagerEnabled) {
@@ -66,20 +67,7 @@ export default Ember.Component.extend({
   });
   }.on('init'),
   elementsInserted : function(){
-this.$('.nav-tabs a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
-  var id = this.$(e.target).attr('href').slice(1);
-  this.get('workspaceManager').setLastActiveTab(id);
-  var tab = this.get('tabs').findBy('id', id);
-  if(tab.type === 'dashboard'){
-this.sendAction('showDashboard');
-  } else if (tab.type === 'Projects') {
-this.createOrShowProjManager();
-  }
-  else{
-this.sendAction('hideDashboard');
-  }
-}.bind(this));
-
+this.tabManager();
 if(this.get('tabs') && this.get('tabs').length > 0){
   var lastActiveTabId = this.get('workspaceManager').getLastActiveTab();
   var activeTab = this.get('tabs').findBy('id', lastActiveTabId);
@@ -98,6 +86,23 @@ export 

ambari git commit: AMBARI-19891 - Extend View URL's to auto instances This commit creates a default view URL for each view using the view name . (Ashwin Rajeev via gauravn7)

2017-02-09 Thread gnagar
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 28bff4a7a -> 8f22a3b88


AMBARI-19891 - Extend View URL's to auto instances This commit creates a 
default view URL for each view using the view name . (Ashwin Rajeev via 
gauravn7)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8f22a3b8
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8f22a3b8
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8f22a3b8

Branch: refs/heads/branch-2.5
Commit: 8f22a3b884111d23c1a0ef505a7b246640858fa4
Parents: 28bff4a
Author: Gaurav Nagar 
Authored: Thu Feb 9 15:07:04 2017 +0530
Committer: Gaurav Nagar 
Committed: Thu Feb 9 15:07:04 2017 +0530

--
 .../apache/ambari/server/orm/dao/ViewDAO.java   |   9 +-
 .../apache/ambari/server/view/ViewRegistry.java | 210 ---
 2 files changed, 143 insertions(+), 76 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8f22a3b8/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ViewDAO.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ViewDAO.java 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ViewDAO.java
index 213a6b8..7f5f82b 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ViewDAO.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ViewDAO.java
@@ -18,6 +18,7 @@
 
 package org.apache.ambari.server.orm.dao;
 
+import com.google.common.collect.Lists;
 import com.google.inject.Inject;
 import com.google.inject.Provider;
 import com.google.inject.Singleton;
@@ -27,6 +28,7 @@ import org.apache.ambari.server.orm.entities.ViewEntity;
 
 import javax.persistence.EntityManager;
 import javax.persistence.TypedQuery;
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -60,15 +62,16 @@ public class ViewDAO {
* @return  a matching view or null
*/
   @RequiresSession
-  public ViewEntity findByCommonName(String viewCommonName) {
+  public List findByCommonName(String viewCommonName) {
+List list = Lists.newArrayList();
 if (viewCommonName != null) {
   for (ViewEntity viewEntity : findAll()) {
 if (viewCommonName.equals(viewEntity.getCommonName())) {
-  return viewEntity;
+  list.add(viewEntity);
 }
   }
 }
-return null;
+return list;
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f22a3b8/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java 
b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
index a012d1e..3bb06d7 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
@@ -43,6 +43,8 @@ import java.util.concurrent.LinkedBlockingQueue;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
 
+import com.google.common.base.Optional;
+import com.google.common.base.Preconditions;
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.ClusterNotFoundException;
 import org.apache.ambari.server.api.resources.ResourceInstanceFactoryImpl;
@@ -70,6 +72,7 @@ import org.apache.ambari.server.orm.dao.ResourceTypeDAO;
 import org.apache.ambari.server.orm.dao.UserDAO;
 import org.apache.ambari.server.orm.dao.ViewDAO;
 import org.apache.ambari.server.orm.dao.ViewInstanceDAO;
+import org.apache.ambari.server.orm.dao.ViewURLDAO;
 import org.apache.ambari.server.orm.entities.GroupEntity;
 import org.apache.ambari.server.orm.entities.MemberEntity;
 import org.apache.ambari.server.orm.entities.PermissionEntity;
@@ -85,6 +88,7 @@ import 
org.apache.ambari.server.orm.entities.ViewInstanceDataEntity;
 import org.apache.ambari.server.orm.entities.ViewInstanceEntity;
 import org.apache.ambari.server.orm.entities.ViewParameterEntity;
 import org.apache.ambari.server.orm.entities.ViewResourceEntity;
+import org.apache.ambari.server.orm.entities.ViewURLEntity;
 import org.apache.ambari.server.security.SecurityHelper;
 import org.apache.ambari.server.security.authorization.AuthorizationHelper;
 import org.apache.ambari.server.security.authorization.ResourceType;
@@ -151,6 +155,7 @@ public class ViewRegistry {
   private static final String LOG4J = "log4j.";
 
   public static final String API_PREFIX = "/api/v1/clusters/";
+  public static final String DEFAULT_AUTO_INSTANCE_URL = "auto_instance";
 
   /**
* Thread pool
@@ -166,25 +171,25 @@ public class ViewRegistry {
* Mapping 

ambari git commit: AMBARI-19913 : hive next view : corrected imports and package names (nitirajrathore)

2017-02-09 Thread nitiraj
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 dcd0631aa -> 28bff4a7a


AMBARI-19913 : hive next view : corrected imports and package names 
(nitirajrathore)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/28bff4a7
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/28bff4a7
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/28bff4a7

Branch: refs/heads/branch-2.5
Commit: 28bff4a7ad309886e4828249ccb020f2feeffabf
Parents: dcd0631
Author: Nitiraj Singh Rathore 
Authored: Thu Feb 9 14:52:44 2017 +0530
Committer: Nitiraj Singh Rathore 
Committed: Thu Feb 9 14:53:12 2017 +0530

--
 .../org/apache/ambari/view/hive2/resources/uploads/CSVParams.java  | 2 +-
 .../apache/ambari/view/hive2/resources/uploads/UploadService.java  | 2 +-
 .../ambari/view/hive2/resources/uploads/query/QueryGenerator.java  | 1 -
 .../ambari/view/hive2/resources/uploads/query/RowFormat.java   | 2 +-
 .../ambari/view/hive2/resources/uploads/query/TableInfo.java   | 2 +-
 .../ambari/view/hive2/resources/upload/QueryGeneratorTest.java | 2 +-
 6 files changed, 5 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/28bff4a7/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/CSVParams.java
--
diff --git 
a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/CSVParams.java
 
b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/CSVParams.java
index 355ed6a..89040b4 100644
--- 
a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/CSVParams.java
+++ 
b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/CSVParams.java
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-package org.apache.ambari.view.hive.resources.uploads;
+package org.apache.ambari.view.hive2.resources.uploads;
 
 import java.io.Serializable;
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/28bff4a7/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/UploadService.java
--
diff --git 
a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/UploadService.java
 
b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/UploadService.java
index 0826945..a979dc9 100644
--- 
a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/UploadService.java
+++ 
b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/UploadService.java
@@ -21,7 +21,7 @@ package org.apache.ambari.view.hive2.resources.uploads;
 import com.sun.jersey.core.header.FormDataContentDisposition;
 import com.sun.jersey.multipart.FormDataParam;
 import org.apache.ambari.view.ViewContext;
-import org.apache.ambari.view.hive.resources.uploads.CSVParams;
+import org.apache.ambari.view.hive2.resources.uploads.CSVParams;
 import org.apache.ambari.view.hive2.BaseService;
 import org.apache.ambari.view.hive2.ConnectionFactory;
 import org.apache.ambari.view.hive2.ConnectionSystem;

http://git-wip-us.apache.org/repos/asf/ambari/blob/28bff4a7/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/query/QueryGenerator.java
--
diff --git 
a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/query/QueryGenerator.java
 
b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/query/QueryGenerator.java
index 72f3b7a..fc6be5c 100644
--- 
a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/query/QueryGenerator.java
+++ 
b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/query/QueryGenerator.java
@@ -18,7 +18,6 @@
 
 package org.apache.ambari.view.hive2.resources.uploads.query;
 
-import org.apache.ambari.view.hive.resources.uploads.query.RowFormat;
 import org.apache.ambari.view.hive2.client.ColumnDescription;
 import org.apache.ambari.view.hive2.resources.uploads.ColumnDescriptionImpl;
 import org.apache.ambari.view.hive2.resources.uploads.HiveFileType;

http://git-wip-us.apache.org/repos/asf/ambari/blob/28bff4a7/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/query/RowFormat.java
--
diff --git 
a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/query/RowFormat.java
 

ambari git commit: AMBARI-19913 : hive next view : corrected imports and package names (nitirajrathore)

2017-02-09 Thread nitiraj
Repository: ambari
Updated Branches:
  refs/heads/trunk bb7ed8952 -> f14168330


AMBARI-19913 : hive next view : corrected imports and package names 
(nitirajrathore)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f1416833
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f1416833
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f1416833

Branch: refs/heads/trunk
Commit: f14168330fecd0ff0d78b2d1d1af692feee83c92
Parents: bb7ed89
Author: Nitiraj Singh Rathore 
Authored: Thu Feb 9 14:52:44 2017 +0530
Committer: Nitiraj Singh Rathore 
Committed: Thu Feb 9 14:54:01 2017 +0530

--
 .../org/apache/ambari/view/hive2/resources/uploads/CSVParams.java  | 2 +-
 .../apache/ambari/view/hive2/resources/uploads/UploadService.java  | 2 +-
 .../ambari/view/hive2/resources/uploads/query/QueryGenerator.java  | 1 -
 .../ambari/view/hive2/resources/uploads/query/RowFormat.java   | 2 +-
 .../ambari/view/hive2/resources/uploads/query/TableInfo.java   | 2 +-
 .../ambari/view/hive2/resources/upload/QueryGeneratorTest.java | 2 +-
 6 files changed, 5 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f1416833/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/CSVParams.java
--
diff --git 
a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/CSVParams.java
 
b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/CSVParams.java
index 355ed6a..89040b4 100644
--- 
a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/CSVParams.java
+++ 
b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/CSVParams.java
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-package org.apache.ambari.view.hive.resources.uploads;
+package org.apache.ambari.view.hive2.resources.uploads;
 
 import java.io.Serializable;
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/f1416833/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/UploadService.java
--
diff --git 
a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/UploadService.java
 
b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/UploadService.java
index 0826945..a979dc9 100644
--- 
a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/UploadService.java
+++ 
b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/UploadService.java
@@ -21,7 +21,7 @@ package org.apache.ambari.view.hive2.resources.uploads;
 import com.sun.jersey.core.header.FormDataContentDisposition;
 import com.sun.jersey.multipart.FormDataParam;
 import org.apache.ambari.view.ViewContext;
-import org.apache.ambari.view.hive.resources.uploads.CSVParams;
+import org.apache.ambari.view.hive2.resources.uploads.CSVParams;
 import org.apache.ambari.view.hive2.BaseService;
 import org.apache.ambari.view.hive2.ConnectionFactory;
 import org.apache.ambari.view.hive2.ConnectionSystem;

http://git-wip-us.apache.org/repos/asf/ambari/blob/f1416833/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/query/QueryGenerator.java
--
diff --git 
a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/query/QueryGenerator.java
 
b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/query/QueryGenerator.java
index 72f3b7a..fc6be5c 100644
--- 
a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/query/QueryGenerator.java
+++ 
b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/query/QueryGenerator.java
@@ -18,7 +18,6 @@
 
 package org.apache.ambari.view.hive2.resources.uploads.query;
 
-import org.apache.ambari.view.hive.resources.uploads.query.RowFormat;
 import org.apache.ambari.view.hive2.client.ColumnDescription;
 import org.apache.ambari.view.hive2.resources.uploads.ColumnDescriptionImpl;
 import org.apache.ambari.view.hive2.resources.uploads.HiveFileType;

http://git-wip-us.apache.org/repos/asf/ambari/blob/f1416833/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/query/RowFormat.java
--
diff --git 
a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/query/RowFormat.java
 

ambari git commit: AMBARI-19921. Js errors appear when user try to delete widgets from dashboard (onechiporenko)

2017-02-09 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 7c3bcc9e8 -> bb7ed8952


AMBARI-19921. Js errors appear when user try to delete widgets from dashboard 
(onechiporenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bb7ed895
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bb7ed895
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bb7ed895

Branch: refs/heads/trunk
Commit: bb7ed895212845201cbc1a159a10b6395f48bf51
Parents: 7c3bcc9
Author: Oleg Nechiporenko 
Authored: Wed Feb 8 14:13:38 2017 +0200
Committer: Oleg Nechiporenko 
Committed: Thu Feb 9 11:22:45 2017 +0200

--
 .../app/templates/main/dashboard/widgets.hbs|  10 +-
 ambari-web/app/views/main/dashboard/widget.js   |  11 +-
 ambari-web/app/views/main/dashboard/widgets.js  | 116 -
 .../test/views/main/dashboard/widget_test.js|  21 +--
 .../test/views/main/dashboard/widgets_test.js   | 161 +++
 5 files changed, 221 insertions(+), 98 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/bb7ed895/ambari-web/app/templates/main/dashboard/widgets.hbs
--
diff --git a/ambari-web/app/templates/main/dashboard/widgets.hbs 
b/ambari-web/app/templates/main/dashboard/widgets.hbs
index 8e04f1c..4b7a269 100644
--- a/ambari-web/app/templates/main/dashboard/widgets.hbs
+++ b/ambari-web/app/templates/main/dashboard/widgets.hbs
@@ -47,11 +47,11 @@
   
 
   
-{{#if view.visibleWidgets.length}}
-  {{#each widget in view.visibleWidgets}}
- {{view widget.viewClass widgetBinding="widget"}}
-  {{/each}}
-{{/if}}
+{{#each widget in view.allWidgets}}
+  {{#if widget.isVisible}}
+{{view widget.viewClass widgetBinding="widget"}}
+  {{/if}}
+{{/each}}
   
 
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/bb7ed895/ambari-web/app/views/main/dashboard/widget.js
--
diff --git a/ambari-web/app/views/main/dashboard/widget.js 
b/ambari-web/app/views/main/dashboard/widget.js
index cacac1a..e7a626c 100644
--- a/ambari-web/app/views/main/dashboard/widget.js
+++ b/ambari-web/app/views/main/dashboard/widget.js
@@ -186,16 +186,7 @@ App.DashboardWidgetView = Em.View.extend({
* delete widget
*/
   deleteWidget: function () {
-var parent = this.get('parentView');
-var userPreferences = parent.get('userPreferences');
-var deletedId = this.get('id');
-var newValue = {
-  visible: userPreferences.visible.slice(0).without(deletedId),
-  hidden: userPreferences.hidden.concat([deletedId]),
-  threshold: userPreferences.threshold
-};
-parent.saveWidgetsSettings(newValue);
-parent.renderWidgets();
+this.get('parentView').hideWidget(this.get('id'));
   },
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/bb7ed895/ambari-web/app/views/main/dashboard/widgets.js
--
diff --git a/ambari-web/app/views/main/dashboard/widgets.js 
b/ambari-web/app/views/main/dashboard/widgets.js
index 0c6b7aa..572625d 100644
--- a/ambari-web/app/views/main/dashboard/widgets.js
+++ b/ambari-web/app/views/main/dashboard/widgets.js
@@ -17,7 +17,16 @@
  */
 
 var App = require('app');
-var filters = require('views/common/filter_view');
+
+const WidgetObject = Em.Object.extend({
+  id: '',
+  threshold: '',
+  viewClass: null,
+  sourceName: '',
+  title: '',
+  checked: false,
+  isVisible: true
+});
 
 App.MainDashboardWidgetsView = Em.View.extend(App.UserPref, App.LocalStorage, 
App.TimeRangeMixin, {
   name: 'mainDashboardWidgetsView',
@@ -202,6 +211,10 @@ App.MainDashboardWidgetsView = 
Em.View.extend(App.UserPref, App.LocalStorage, Ap
 }
   ],
 
+  widgetsDefinitionMap: function () {
+return this.get('widgetsDefinition').toMapByProperty('id');
+  }.property('widgetsDefinition.[]'),
+
   /**
* List of services
* @type {Ember.Enumerable}
@@ -226,16 +239,23 @@ App.MainDashboardWidgetsView = 
Em.View.extend(App.UserPref, App.LocalStorage, Ap
   isMoving: false,
 
   /**
+   * @type {WidgetObject[]}
+   */
+  allWidgets: [],
+
+  /**
* List of visible widgets
-   * @type {Ember.Enumerable}
+   *
+   * @type {WidgetObject[]}
*/
-  visibleWidgets: [],
+  visibleWidgets: Em.computed.filterBy('allWidgets', 'isVisible', true),
 
   /**
* List of hidden widgets
-   * @type {Ember.Enumerable}
+   *
+   * @type {WidgetObject[]}
*/
-  hiddenWidgets: [], // widget child view will push object in this array if 
deleted
+  hiddenWidgets: Em.computed.filterBy('allWidgets', 'isVisible', false),