You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2014/09/22 19:47:59 UTC
[01/16] git commit: AMBARI-7421. Slider View should support secured
cluster (srimanth)
Repository: ambari
Updated Branches:
refs/heads/branch-alerts-dev 7f86e75c0 -> e6cc05872
AMBARI-7421. Slider View should support secured cluster (srimanth)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d46bbdfa
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d46bbdfa
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d46bbdfa
Branch: refs/heads/branch-alerts-dev
Commit: d46bbdfa95e52063899c62d5711b3fcab31c5d81
Parents: 327accb
Author: Srimanth Gunturi <sg...@hortonworks.com>
Authored: Sat Sep 20 17:58:19 2014 -0700
Committer: Srimanth Gunturi <sg...@hortonworks.com>
Committed: Sat Sep 20 18:10:36 2014 -0700
----------------------------------------------------------------------
contrib/views/slider/docs/index.md | 63 ++++++++++++++++++
.../view/slider/SliderAppsViewController.java | 8 +++
.../slider/SliderAppsViewControllerImpl.java | 69 ++++++++++----------
.../views/slider/src/main/resources/view.xml | 25 +++++++
4 files changed, 132 insertions(+), 33 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/d46bbdfa/contrib/views/slider/docs/index.md
----------------------------------------------------------------------
diff --git a/contrib/views/slider/docs/index.md b/contrib/views/slider/docs/index.md
new file mode 100644
index 0000000..534f317
--- /dev/null
+++ b/contrib/views/slider/docs/index.md
@@ -0,0 +1,63 @@
+# Slider Apps View
+
+## Security Guide
+*Slider Apps View* can optionally connect to a Kerberos secured cluster by following the below steps.
+
+#### Step-1: Deploy a HDP cluster and secure it using *Kerberos*
+After deploying a HDP cluster through Ambari, it can be secured by using the *Enable Security* button in *Admin > Seurity* page.
+
+#### Step-2: Create *Kerberos* principal for view
+We need to provide a *Kerberos* identity for the process in which the view is run. We shall identify the user as `view-principal`. Since views are generally hosted by Ambari server, typically this can be named as *ambari*.
+
+On the machine where *KDC Server* is hosted, create user principal by running below command
+
+```
+kadmin.local -q "addprinc -randkey view-principal@EXAMPLE.COM"
+```
+Next, extract keytab file
+
+```
+kadmin.local -q "xst -k /path/to/keytab/view-principal.headless.keytab view-principal@EXAMPLE.COM"
+```
+The keytab file should then be copied over to the keytabs location on the host where the view is hosted.
+
+```
+cp /path/to/keytab/view-principal.headless.keytab /etc/security/keytabs/
+```
+
+Change file permissions so that only necessary users can access it.
+
+```
+chmod 440 /etc/security/keytabs/view-principal.headless.keytab
+```
+
+#### Step-3: Configure *proxyuser* for created principal
+Add the following configurations in *Custom core-site* section of *HDFS* service.
+
+* hadoop.proxyuser.ambari.groups = *
+* hadoop.proxyuser.ambari.hosts = `view-server-host`
+
+This will in-turn show up in *core-site.xml* as
+
+```
+<property>
+ <name>hadoop.proxyuser.view-principal.groups</name>
+ <value>*</value>
+</property>
+
+<property>
+ <name>hadoop.proxyuser.view-principal.hosts</name>
+ <value>view-server-host.ambari.apache.org</value>
+</property>
+```
+Restart HDFS and YARN services.
+
+#### Step-4: Create *Slider Apps View* with security parameters
+
+From *Ambari-Admin* create a *Slider Apps View* with the below parameters populated
+
+* slider.security.enabled = true
+* yarn.resourcemanager.principal = `rm/_HOST@EXAMPLE.COM`
+* dfs.namenode.kerberos.principal = `nn/_HOST@EXAMPLE.COM`
+* view.kerberos.principal = `view-principal`
+* view.kerberos.principal.keytab = `/etc/security/keytabs/view-principal.headless.keytab`
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/d46bbdfa/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewController.java
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewController.java b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewController.java
index 64ab78c..0cf5d15 100644
--- a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewController.java
+++ b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewController.java
@@ -35,6 +35,14 @@ public interface SliderAppsViewController {
public static final String PROPERTY_YARN_RM_ADDRESS = "yarn.resourcemanager.address";
public static final String PROPERTY_YARN_RM_SCHEDULER_ADDRESS = "yarn.resourcemanager.scheduler.address";
public static final String PROPERTY_ZK_QUOROM = "zookeeper.quorum";
+ public static final String PROPERTY_GANGLIA_SERVER_HOSTNAME = "ganglia.server.hostname";
+ public static final String PROPERTY_GANGLIA_CUSTOM_CLUSTERS = "ganglia.custom.clusters";
+ public static final String PROPERTY_SLIDER_USER = "slider.user";
+ public static final String PROPERTY_SLIDER_SECURITY_ENABLED = "slider.security.enabled";
+ public static final String PROPERTY_YARN_RM_PRINCIPAL = "yarn.resourcemanager.principal";
+ public static final String PROPERTY_HDFS_NN_PRINCIPAL = "dfs.namenode.kerberos.principal";
+ public static final String PROPERTY_VIEW_PRINCIPAL = "view.kerberos.principal";
+ public static final String PROPERTY_VIEW_PRINCIPAL_KEYTAB= "view.kerberos.principal.keytab";
public ViewStatus getViewStatus();
http://git-wip-us.apache.org/repos/asf/ambari/blob/d46bbdfa/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
index 6580d90..93c95a0 100644
--- a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
+++ b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
@@ -126,16 +126,37 @@ public class SliderAppsViewControllerImpl implements SliderAppsViewController {
}
return null;
}
-
+
private static interface SliderClientContextRunnable<T> {
public T run(SliderClient sliderClient) throws YarnException, IOException, InterruptedException;
}
-
+
+ private String getUserToRunAs() {
+ String user = viewContext.getProperties().get(PROPERTY_SLIDER_USER);
+ if (user == null || user.trim().length() < 1) {
+ return "yarn";
+ } else if ("${username}".equals(user)) {
+ return viewContext.getUsername();
+ } else {
+ return user;
+ }
+ }
+
private <T> T invokeSliderClientRunnable(final SliderClientContextRunnable<T> runnable) throws IOException, InterruptedException {
ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
try {
- T value = UserGroupInformation.getBestUGI(null, viewContext.getUsername()).doAs(
+ boolean securityEnabled = Boolean.valueOf(viewContext.getProperties().get(PROPERTY_SLIDER_SECURITY_ENABLED));
+ UserGroupInformation sliderUser;
+ if (securityEnabled) {
+ String viewPrincipal = viewContext.getProperties().get(PROPERTY_VIEW_PRINCIPAL);
+ String viewPrincipalKeytab = viewContext.getProperties().get(PROPERTY_VIEW_PRINCIPAL_KEYTAB);
+ UserGroupInformation ambariUser = UserGroupInformation.loginUserFromKeytabAndReturnUGI(viewPrincipal, viewPrincipalKeytab);
+ sliderUser = UserGroupInformation.createProxyUser(getUserToRunAs(), ambariUser);
+ } else {
+ sliderUser = UserGroupInformation.getBestUGI(null, getUserToRunAs());
+ }
+ T value = sliderUser.doAs(
new PrivilegedExceptionAction<T>() {
@Override
public T run() throws Exception {
@@ -396,36 +417,6 @@ public class SliderAppsViewControllerImpl implements SliderAppsViewController {
Configuration sliderClientConfiguration = getSliderClientConfiguration();
SliderClient client = new SliderClient() {
@Override
- public String getUsername() throws IOException {
- return viewContext.getUsername();
- }
-
- @Override
- protected void initHadoopBinding() throws IOException, SliderException {
- super.initHadoopBinding();
- // Override the default FS client to the calling user
- try {
- FileSystem fs = FileSystem.get(FileSystem.getDefaultUri(getConfig()),
- getConfig(), viewContext.getUsername());
- SliderFileSystem fileSystem = new SliderFileSystem(fs, getConfig());
- Field fsField = SliderClient.class
- .getDeclaredField("sliderFileSystem");
- fsField.setAccessible(true);
- fsField.set(this, fileSystem);
- } catch (InterruptedException e) {
- throw new SliderException("Slider view unable to override filesystem of Slider client", e);
- } catch (NoSuchFieldException e) {
- throw new SliderException("Slider view unable to override filesystem of Slider client", e);
- } catch (SecurityException e) {
- throw new SliderException("Slider view unable to override filesystem of Slider client", e);
- } catch (IllegalArgumentException e) {
- throw new SliderException("Slider view unable to override filesystem of Slider client", e);
- } catch (IllegalAccessException e) {
- throw new SliderException("Slider view unable to override filesystem of Slider client", e);
- }
- }
-
- @Override
public void init(Configuration conf) {
super.init(conf);
try {
@@ -468,6 +459,8 @@ public class SliderAppsViewControllerImpl implements SliderAppsViewController {
String rmAddress = viewContext.getProperties().get(PROPERTY_YARN_RM_ADDRESS);
String rmSchedulerAddress = viewContext.getProperties().get(PROPERTY_YARN_RM_SCHEDULER_ADDRESS);
String zkQuorum = viewContext.getProperties().get(PROPERTY_ZK_QUOROM);
+ boolean securedCluster = Boolean.getBoolean(viewContext.getProperties().get(PROPERTY_SLIDER_SECURITY_ENABLED));
+
HdfsConfiguration hdfsConfig = new HdfsConfiguration();
YarnConfiguration yarnConfig = new YarnConfiguration(hdfsConfig);
@@ -479,6 +472,16 @@ public class SliderAppsViewControllerImpl implements SliderAppsViewController {
yarnConfig.set("slider.zookeeper.quorum", zkQuorum.toString());
yarnConfig.set("yarn.application.classpath",
"/etc/hadoop/conf,/usr/lib/hadoop/*,/usr/lib/hadoop/lib/*,/usr/lib/hadoop-hdfs/*,/usr/lib/hadoop-hdfs/lib/*,/usr/lib/hadoop-yarn/*,/usr/lib/hadoop-yarn/lib/*,/usr/lib/hadoop-mapreduce/*,/usr/lib/hadoop-mapreduce/lib/*");
+
+ if (securedCluster) {
+ String rmPrincipal = viewContext.getProperties().get(PROPERTY_YARN_RM_PRINCIPAL);
+ String nnPrincipal = viewContext.getProperties().get(PROPERTY_HDFS_NN_PRINCIPAL);
+ yarnConfig.set("yarn.resourcemanager.principal", rmPrincipal);
+ yarnConfig.set("dfs.namenode.kerberos.principal", nnPrincipal);
+ yarnConfig.set("hadoop.security.authorization", "true");
+ yarnConfig.set("hadoop.security.authentication", "kerberos");
+ yarnConfig.set("slider.security.enabled", "true");
+ }
return yarnConfig;
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/d46bbdfa/contrib/views/slider/src/main/resources/view.xml
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/view.xml b/contrib/views/slider/src/main/resources/view.xml
index 25d81a1..7a05fa3 100644
--- a/contrib/views/slider/src/main/resources/view.xml
+++ b/contrib/views/slider/src/main/resources/view.xml
@@ -53,6 +53,31 @@ limitations under the License. Kerberos, LDAP, Custom. Binary/Htt
<description>Slider user</description>
<required>false</required>
</parameter>
+ <parameter>
+ <name>slider.security.enabled</name>
+ <description>Indicates whether cluster has been secured or not.</description>
+ <required>true</required>
+ </parameter>
+ <parameter>
+ <name>yarn.resourcemanager.principal</name>
+ <description>Kerberos principal used to access YARN ResourceManager. For example: rm/_HOST@EXAMPLE.COM</description>
+ <required>optional</required>
+ </parameter>
+ <parameter>
+ <name>dfs.namenode.kerberos.principal</name>
+ <description>Kerberos principal used to access YARN ResourceManager. For example: nn/_HOST@EXAMPLE.COM</description>
+ <required>optional</required>
+ </parameter>
+ <parameter>
+ <name>view.kerberos.principal</name>
+ <description>Kerberos principal associated with this view. For example: ambari/_HOST@EXAMPLE.COM</description>
+ <required>optional</required>
+ </parameter>
+ <parameter>
+ <name>view.kerberos.principal.keytab</name>
+ <description>Path to the Kerberos principal keytab. For example: /etc/security/keytabs/ambari.headless.keytab</description>
+ <required>optional</required>
+ </parameter>
<resource>
<name>status</name>
<service-class>org.apache.ambari.view.slider.rest.ViewStatusResource</service-class>
[15/16] git commit: AMBARI-7355 Add possibility to filter config
groups through api by host name (dsen)
Posted by jo...@apache.org.
AMBARI-7355 Add possibility to filter config groups through api by host name (dsen)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/802df768
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/802df768
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/802df768
Branch: refs/heads/branch-alerts-dev
Commit: 802df768ac0415e91e951c61592ea370a5975957
Parents: 57030a4
Author: Dmytro Sen <ds...@hortonworks.com>
Authored: Mon Sep 22 20:18:13 2014 +0300
Committer: Dmytro Sen <ds...@hortonworks.com>
Committed: Mon Sep 22 20:18:13 2014 +0300
----------------------------------------------------------------------
.../internal/ConfigGroupResourceProvider.java | 15 ++++++--
.../ConfigGroupResourceProviderTest.java | 37 ++++++++++++++++++--
2 files changed, 48 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/802df768/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
index 46e9016..c73a8d4 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
@@ -78,6 +78,8 @@ public class ConfigGroupResourceProvider extends
.getPropertyId("ConfigGroup", "service_config_version_note");
protected static final String CONFIGGROUP_HOSTNAME_PROPERTY_ID =
PropertyHelper.getPropertyId(null, "host_name");
+ protected static final String CONFIGGROUP_HOSTS_HOSTNAME_PROPERTY_ID =
+ PropertyHelper.getPropertyId("ConfigGroup", "hosts/host_name");
public static final String CONFIGGROUP_HOSTS_PROPERTY_ID = PropertyHelper
.getPropertyId("ConfigGroup", "hosts");
public static final String CONFIGGROUP_CONFIGS_PROPERTY_ID =
@@ -138,6 +140,10 @@ public class ConfigGroupResourceProvider extends
Set<String> requestedIds = getRequestPropertyIds(request, predicate);
Set<Resource> resources = new HashSet<Resource>();
+ if (requestedIds.contains(CONFIGGROUP_HOSTS_HOSTNAME_PROPERTY_ID)) {
+ requestedIds.add(CONFIGGROUP_HOSTS_PROPERTY_ID);
+ }
+
for (ConfigGroupResponse response : responses) {
Resource resource = new ResourceImpl(Resource.Type.ConfigGroup);
@@ -618,14 +624,19 @@ public class ConfigGroupResourceProvider extends
Map<String, Config> configurations = new HashMap<String, Config>();
Set<String> hosts = new HashSet<String>();
+ String hostnameKey = CONFIGGROUP_HOSTNAME_PROPERTY_ID;
Object hostObj = properties.get(CONFIGGROUP_HOSTS_PROPERTY_ID);
+ if (hostObj == null) {
+ hostnameKey = CONFIGGROUP_HOSTS_HOSTNAME_PROPERTY_ID;
+ hostObj = properties.get(CONFIGGROUP_HOSTS_HOSTNAME_PROPERTY_ID);
+ }
if (hostObj != null) {
if (hostObj instanceof HashSet<?>) {
try {
Set<Map<String, String>> hostsSet = (Set<Map<String, String>>) hostObj;
for (Map<String, String> hostMap : hostsSet) {
- if (hostMap.containsKey(CONFIGGROUP_HOSTNAME_PROPERTY_ID)) {
- String hostname = hostMap.get(CONFIGGROUP_HOSTNAME_PROPERTY_ID);
+ if (hostMap.containsKey(hostnameKey)) {
+ String hostname = hostMap.get(hostnameKey);
hosts.add(hostname);
}
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/802df768/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProviderTest.java
index 4194979..db324e5 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProviderTest.java
@@ -432,7 +432,7 @@ public class ConfigGroupResourceProviderTest {
assertEquals("t3", resources.iterator().next().getPropertyValue
(ConfigGroupResourceProvider.CONFIGGROUP_TAG_PROPERTY_ID));
- // Read by hostname
+ // Read by hostname (hosts=h1)
predicate = new PredicateBuilder().property(ConfigGroupResourceProvider
.CONFIGGROUP_CLUSTER_NAME_PROPERTY_ID).equals("Cluster100").and()
.property(ConfigGroupResourceProvider.CONFIGGROUP_HOSTS_PROPERTY_ID)
@@ -448,8 +448,24 @@ public class ConfigGroupResourceProviderTest {
assertEquals("h1", hostSet.iterator().next().get
(ConfigGroupResourceProvider.CONFIGGROUP_HOSTNAME_PROPERTY_ID));
+ // Read by hostname (hosts/host_name=h1)
+ predicate = new PredicateBuilder().property(ConfigGroupResourceProvider
+ .CONFIGGROUP_CLUSTER_NAME_PROPERTY_ID).equals("Cluster100").and()
+ .property(ConfigGroupResourceProvider.CONFIGGROUP_HOSTS_HOSTNAME_PROPERTY_ID)
+ .equals("h1").toPredicate();
+
+ resources = resourceProvider.getResources(request, predicate);
- // Read by tag and hostname - Positive
+ assertEquals(1, resources.size());
+ hostSet = (Set<Map<String, Object>>)
+ resources.iterator().next()
+ .getPropertyValue(ConfigGroupResourceProvider
+ .CONFIGGROUP_HOSTS_PROPERTY_ID);
+ assertEquals("h1", hostSet.iterator().next().get
+ (ConfigGroupResourceProvider.CONFIGGROUP_HOSTNAME_PROPERTY_ID));
+
+
+ // Read by tag and hostname (hosts=h1) - Positive
predicate = new PredicateBuilder().property(ConfigGroupResourceProvider
.CONFIGGROUP_CLUSTER_NAME_PROPERTY_ID).equals("Cluster100").and()
.property(ConfigGroupResourceProvider.CONFIGGROUP_TAG_PROPERTY_ID)
@@ -466,6 +482,23 @@ public class ConfigGroupResourceProviderTest {
assertEquals("h1", hostSet.iterator().next().get
(ConfigGroupResourceProvider.CONFIGGROUP_HOSTNAME_PROPERTY_ID));
+ // Read by tag and hostname (hosts/host_name=h1) - Positive
+ predicate = new PredicateBuilder().property(ConfigGroupResourceProvider
+ .CONFIGGROUP_CLUSTER_NAME_PROPERTY_ID).equals("Cluster100").and()
+ .property(ConfigGroupResourceProvider.CONFIGGROUP_TAG_PROPERTY_ID)
+ .equals("t4").and().property(ConfigGroupResourceProvider
+ .CONFIGGROUP_HOSTS_HOSTNAME_PROPERTY_ID).equals("h1").toPredicate();
+
+ resources = resourceProvider.getResources(request, predicate);
+
+ assertEquals(1, resources.size());
+ hostSet = (Set<Map<String, Object>>)
+ resources.iterator().next()
+ .getPropertyValue(ConfigGroupResourceProvider
+ .CONFIGGROUP_HOSTS_PROPERTY_ID);
+ assertEquals("h1", hostSet.iterator().next().get
+ (ConfigGroupResourceProvider.CONFIGGROUP_HOSTNAME_PROPERTY_ID));
+
// Read by id
predicate = new PredicateBuilder().property(ConfigGroupResourceProvider
.CONFIGGROUP_ID_PROPERTY_ID).equals(11L).and().property
[09/16] git commit: AMBARI-7432 Sqoop service check fails for HDP2.2
(dsen)
Posted by jo...@apache.org.
AMBARI-7432 Sqoop service check fails for HDP2.2 (dsen)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f4ddfd65
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f4ddfd65
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f4ddfd65
Branch: refs/heads/branch-alerts-dev
Commit: f4ddfd65b9f070f23fb9489ad09e893bd5257be8
Parents: 201b7e9
Author: Dmytro Sen <ds...@hortonworks.com>
Authored: Mon Sep 22 17:03:05 2014 +0300
Committer: Dmytro Sen <ds...@hortonworks.com>
Committed: Mon Sep 22 17:03:05 2014 +0300
----------------------------------------------------------------------
.../stacks/HDP/2.0.6/services/SQOOP/package/scripts/params.py | 2 ++
.../HDP/2.0.6/services/SQOOP/package/scripts/service_check.py | 1 +
.../src/test/python/stacks/2.0.6/SQOOP/test_service_check.py | 2 ++
3 files changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/f4ddfd65/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/params.py
index e97bb9f..ff200b8 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/params.py
@@ -30,11 +30,13 @@ if rpm_version is not None:
sqoop_lib = '/usr/hdp/current/sqoop/lib'
hbase_home = '/usr/hdp/current/hbase'
hive_home = '/usr/hdp/current/hive'
+ sqoop_bin_dir = '/usr/hdp/current/sqoop/bin/'
else:
sqoop_conf_dir = "/usr/lib/sqoop/conf"
sqoop_lib = "/usr/lib/sqoop/lib"
hbase_home = "/usr"
hive_home = "/usr"
+ sqoop_bin_dir = "/usr/bin"
zoo_conf_dir = "/etc/zookeeper"
security_enabled = config['configurations']['cluster-env']['security_enabled']
http://git-wip-us.apache.org/repos/asf/ambari/blob/f4ddfd65/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/service_check.py
index c42501a..98edc1c 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/service_check.py
@@ -30,6 +30,7 @@ class SqoopServiceCheck(Script):
Execute(format("{kinit_path_local} -kt {smoke_user_keytab} {smokeuser}"))
Execute("sqoop version",
user = params.smokeuser,
+ path = params.sqoop_bin_dir,
logoutput = True
)
http://git-wip-us.apache.org/repos/asf/ambari/blob/f4ddfd65/ambari-server/src/test/python/stacks/2.0.6/SQOOP/test_service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/SQOOP/test_service_check.py b/ambari-server/src/test/python/stacks/2.0.6/SQOOP/test_service_check.py
index fa87bc6..21f9663 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/SQOOP/test_service_check.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/SQOOP/test_service_check.py
@@ -31,6 +31,7 @@ class TestSqoopServiceCheck(RMFTestCase):
self.assertResourceCalled('Execute', '/usr/bin/kinit -kt /etc/security/keytabs/smokeuser.headless.keytab ambari-qa',)
self.assertResourceCalled('Execute', 'sqoop version',
logoutput = True,
+ path = ['/usr/bin'],
user = 'ambari-qa',)
self.assertNoMoreResources()
@@ -42,6 +43,7 @@ class TestSqoopServiceCheck(RMFTestCase):
)
self.assertResourceCalled('Execute', 'sqoop version',
logoutput = True,
+ path = ['/usr/bin'],
user = 'ambari-qa',)
self.assertNoMoreResources()
[03/16] git commit: AMBARI-7427 It is not possible to change "Custom"
Created dates again. (Buzhor Denys via ababiichuk)
Posted by jo...@apache.org.
AMBARI-7427 It is not possible to change "Custom" Created dates again. (Buzhor Denys via ababiichuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/af150a1b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/af150a1b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/af150a1b
Branch: refs/heads/branch-alerts-dev
Commit: af150a1be3dd007625397c5dc03aa6547343cf28
Parents: 3590d7d
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Mon Sep 22 14:40:03 2014 +0300
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Mon Sep 22 14:40:03 2014 +0300
----------------------------------------------------------------------
.../main/dashboard/config_history_controller.js | 1 +
ambari-web/app/views/common/filter_view.js | 74 +++++++++++++++++++-
.../views/main/dashboard/config_history_view.js | 10 ++-
3 files changed, 82 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/af150a1b/ambari-web/app/controllers/main/dashboard/config_history_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/dashboard/config_history_controller.js b/ambari-web/app/controllers/main/dashboard/config_history_controller.js
index e6d8614..582874c 100644
--- a/ambari-web/app/controllers/main/dashboard/config_history_controller.js
+++ b/ambari-web/app/controllers/main/dashboard/config_history_controller.js
@@ -127,6 +127,7 @@ App.MainConfigHistoryController = Em.ArrayController.extend(App.TableServerMixin
time = curTime - 2592000000;
break;
case 'Custom':
+ case 'Custom2':
customDatePopup.showCustomDatePopup(this, this.get('actualValues'));
break;
case 'Any':
http://git-wip-us.apache.org/repos/asf/ambari/blob/af150a1b/ambari-web/app/views/common/filter_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/filter_view.js b/ambari-web/app/views/common/filter_view.js
index f279fd3..83d23a7 100644
--- a/ambari-web/app/views/common/filter_view.js
+++ b/ambari-web/app/views/common/filter_view.js
@@ -50,6 +50,24 @@ var wrapperView = Ember.View.extend({
*/
fieldId: null,
+ /**
+ * This option is useful for Em.Select, if you want get events when same option selected more than one time a raw.
+ * This property is Object[] (for example see App.MainConfigHistoryView.modifiedFilterView),
+ * that have followed structure:
+ *
+ * <code>
+ * [
+ * {
+ * values: ['DefinedValue1', 'DefinedValue2'], // this properties should be defined in `content` property
+ * displayAs: 'Choose me' // this value will be displayed
+ * }
+ * ]
+ * </code>
+ * @type {Array}
+ *
+ **/
+ triggeredOnSameValue: null,
+
clearFilter: function(){
this.set('value', this.get('emptyValue'));
if(this.get('setPropertyOnApply')){
@@ -136,6 +154,60 @@ var wrapperView = Ember.View.extend({
var parent = this.$().parent();
this.set('parentNode', parent);
parent.addClass('notActive');
+ this.checkSelectSpecialOptions();
+ },
+
+ /**
+ * Check for Em.Select that should use dispatching event when option with same value selected more than one time.
+ **/
+ checkSelectSpecialOptions: function() {
+ // check predefined property
+ if (!this.get('triggeredOnSameValue') || !this.get('triggeredOnSameValue').length) return;
+ // add custom additional observer that will handle property changes
+ this.addObserver('value', this, 'valueCustomObserver');
+ // get the full class attribute to find our select
+ var classInlineAttr = this.get('fieldType').split(',')
+ .map(function(className) {
+ return '.' + className.trim();
+ }).join('');
+ this.set('classInlineAttr', classInlineAttr);
+ this.get('triggeredOnSameValue').forEach(function(triggeredValue) {
+ triggeredValue.values.forEach(function(value, index) {
+ // option with property `value`
+ var $optionEl = $(this.get('element')).find(classInlineAttr)
+ .find('option[value="' + value + '"]');
+ // should be displayed with `displayAs` caption
+ $optionEl.text(triggeredValue.displayAs);
+ // the second one option should be hidden
+ // as the result, on init stage we show only one option that could be selected
+ if (index == 1) {
+ $optionEl.css('display', 'none');
+ }
+ }, this);
+ }, this);
+ },
+ /**
+ *
+ * Custom observer that used for special case of Em.Select related to dispatching event
+ * when option with same value selected more than one time.
+ *
+ **/
+ valueCustomObserver: function() {
+ var hiddenValue;
+ this.get('triggeredOnSameValue').forEach(function(triggeredValue) {
+ var values = triggeredValue.values;
+ // find current selected value from `values` list
+ var currentValueIndex = values.indexOf(this.get('value'));
+ if (currentValueIndex < 0) return;
+ // value assigned to hidden option
+ hiddenValue = values[Number(currentValueIndex == 0)];
+ }, this);
+ // our select
+ var $select = $(this.get('element')).find(this.get('classInlineAttr'));
+ // now hide option with current value
+ $select.find('option[value="{0}"]'.format(this.get('value'))).css('display', 'none');
+ // and show option that was hidden
+ $select.find('option[value="{0}"'.format(hiddenValue)).css('display', 'block');
}
});
@@ -274,7 +346,7 @@ module.exports = {
config.fieldType = config.fieldType || 'input-medium';
config.filterView = selectFieldView.extend({
- classNames : [ config.fieldType ],
+ classNames : config.fieldType.split(','),
attributeBindings: ['disabled','multiple'],
disabled: false
});
http://git-wip-us.apache.org/repos/asf/ambari/blob/af150a1b/ambari-web/app/views/main/dashboard/config_history_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/config_history_view.js b/ambari-web/app/views/main/dashboard/config_history_view.js
index 792e31f..49e1d82 100644
--- a/ambari-web/app/views/main/dashboard/config_history_view.js
+++ b/ambari-web/app/views/main/dashboard/config_history_view.js
@@ -149,8 +149,14 @@ App.MainConfigHistoryView = App.TableView.extend({
modifiedFilterView: filters.createSelectView({
column: 3,
- fieldType: 'filter-input-width',
- content: ['Any', 'Past 1 hour', 'Past 1 Day', 'Past 2 Days', 'Past 7 Days', 'Past 14 Days', 'Past 30 Days', 'Custom'],
+ triggeredOnSameValue: [
+ {
+ values: ['Custom', 'Custom2'],
+ displayAs: 'Custom'
+ }
+ ],
+ fieldType: 'filter-input-width,modified-filter',
+ content: ['Any', 'Past 1 hour', 'Past 1 Day', 'Past 2 Days', 'Past 7 Days', 'Past 14 Days', 'Past 30 Days', 'Custom', 'Custom2'],
valueBinding: "controller.modifiedFilter.optionValue",
startTimeBinding: "controller.modifiedFilter.actualValues.startTime",
endTimeBinding: "controller.modifiedFilter.actualValues.endTime",
[02/16] git commit: AMBARI-7426. Slider View: Parameter validation
page should account for security parameters being set. (onechiporenko)
Posted by jo...@apache.org.
AMBARI-7426. Slider View: Parameter validation page should account for security parameters being set. (onechiporenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3590d7d4
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3590d7d4
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3590d7d4
Branch: refs/heads/branch-alerts-dev
Commit: 3590d7d41b926cc5dfdc8b58322ebe97a80c80a4
Parents: d46bbdf
Author: Oleg Nechiporenko <on...@apache.org>
Authored: Mon Sep 22 13:29:15 2014 +0300
Committer: Oleg Nechiporenko <on...@apache.org>
Committed: Mon Sep 22 13:29:15 2014 +0300
----------------------------------------------------------------------
.../assets/data/resource/slider-properties.json | 7 ++++++-
.../ui/app/controllers/slider_controller.js | 20 ++++++++++++++++++--
.../resources/ui/app/models/slider_config.js | 8 +++++++-
.../src/main/resources/ui/app/routes/main.js | 7 ++++++-
.../src/main/resources/ui/app/translations.js | 1 +
5 files changed, 38 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/3590d7d4/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/slider-properties.json
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/slider-properties.json b/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/slider-properties.json
index c9b0781..3b69893 100644
--- a/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/slider-properties.json
+++ b/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/slider-properties.json
@@ -19,7 +19,12 @@
"zookeeper.quorum" : "slider-1.c.pramod-thangali.internal:2181,slider-2.c.pramod-thangali.internal:2181,slider-3.c.pramod-thangali.internal:2181",
"ganglia.server.hostname" : "bvc",
"ganglia.custom.clusters" : "'HBaseCluster1','7000','AccumuloCluster1','7001','HBaseCluster2','7002'",
- "slider.user" : "John Dow"
+ "slider.user" : "John Dow",
+ "slider.security.enabled" : "false",
+ "dfs.namenode.kerberos.principal" : null,
+ "view.kerberos.principal" : null,
+ "view.kerberos.principal.keytab" : null,
+ "yarn.resourcemanager.principal" : null
}
},
"resources" : [
http://git-wip-us.apache.org/repos/asf/ambari/blob/3590d7d4/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
index 401c86d..a81854e 100644
--- a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
+++ b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
@@ -67,14 +67,30 @@ App.SliderController = Ember.Controller.extend({
/**
* After all Slider-configs are loaded, application should check self status
+ * If config <code>required</code>-property is true, its value shouldn't be empty
+ * If config depends on some other config (see <code>requireDependsOn</code>-property)
+ * and referenced config-value is not-false, current config should have not-empty value
* @method finishSliderConfiguration
*/
finishSliderConfiguration: function () {
//check if all services exist
var errors = [];
App.SliderApp.store.all('sliderConfig').forEach(function (model) {
- if (Em.isEmpty(model.get('value')) && model.get('required')) {
- errors.push(Em.I18n.t('error.config_is_empty').format(model.get('viewConfigName')));
+ if (model.get('required')) {
+ if (Em.isEmpty(model.get('value'))) {
+ errors.push(Em.I18n.t('error.config_is_empty').format(model.get('viewConfigName')));
+ }
+ }
+ else {
+ var dependenceConfig = model.get('requireDependsOn');
+ if (!Em.isNone(dependenceConfig)) {
+ var depValue = dependenceConfig.get('value').toLowerCase();
+ if (depValue == "true") {
+ if (Em.isEmpty(model.get('value'))) {
+ errors.push(Em.I18n.t('error.config_is_empty_2').format(model.get('viewConfigName'), dependenceConfig.get('viewConfigName')));
+ }
+ }
+ }
}
});
errors.uniq();
http://git-wip-us.apache.org/repos/asf/ambari/blob/3590d7d4/contrib/views/slider/src/main/resources/ui/app/models/slider_config.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/models/slider_config.js b/contrib/views/slider/src/main/resources/ui/app/models/slider_config.js
index a079faf..d8b2be6 100644
--- a/contrib/views/slider/src/main/resources/ui/app/models/slider_config.js
+++ b/contrib/views/slider/src/main/resources/ui/app/models/slider_config.js
@@ -44,7 +44,13 @@ App.SliderConfig = DS.Model.extend({
* Is property required
* @type {bool}
*/
- required: DS.attr('bool')
+ required: DS.attr('bool'),
+
+ /**
+ * If provided config has not-false value current config shouldn't be empty
+ * @type {App.SliderConfig}
+ */
+ requireDependsOn: DS.belongsTo('sliderConfig')
});
http://git-wip-us.apache.org/repos/asf/ambari/blob/3590d7d4/contrib/views/slider/src/main/resources/ui/app/routes/main.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/routes/main.js b/contrib/views/slider/src/main/resources/ui/app/routes/main.js
index d1e0bb7..7afc85a 100644
--- a/contrib/views/slider/src/main/resources/ui/app/routes/main.js
+++ b/contrib/views/slider/src/main/resources/ui/app/routes/main.js
@@ -58,7 +58,12 @@ App.SliderAppsRoute = Ember.Route.extend({
Em.Object.create({id: 4, required: true, viewConfigName: 'zookeeper.quorum', displayName: 'zookeeperQuorum', linkedService: 'ZOOKEEPER'}),
Em.Object.create({id: 5, required: false, viewConfigName: 'ganglia.server.hostname', displayName: 'gangliaServer'}),
Em.Object.create({id: 6, required: false, viewConfigName: 'ganglia.custom.clusters', displayName: 'gangliaClusters'}),
- Em.Object.create({id: 7, required: false, viewConfigName: 'slider.user', displayName: 'sliderUser'})
+ Em.Object.create({id: 7, required: false, viewConfigName: 'slider.user', displayName: 'sliderUser'}),
+ Em.Object.create({id: 8, required: false, viewConfigName: 'slider.security.enabled', displayName: 'sliderSecurityEnabled'}),
+ Em.Object.create({id: 9, required: false, requireDependsOn: 8, viewConfigName: 'yarn.resourcemanager.principal', displayName: 'yarnResourceManagerPrincipal'}),
+ Em.Object.create({id: 10, required: false, requireDependsOn: 8, viewConfigName: 'dfs.namenode.kerberos.principal', displayName: 'dfsNamenodeKerberosPrincipal'}),
+ Em.Object.create({id: 11, required: false, requireDependsOn: 8, viewConfigName: 'view.kerberos.principal', displayName: 'viewKerberosPrincipal'}),
+ Em.Object.create({id: 12, required: false, requireDependsOn: 8, viewConfigName: 'view.kerberos.principal.keytab', displayName: 'ViewKerberosPrincipalKeytab'})
]));
},
http://git-wip-us.apache.org/repos/asf/ambari/blob/3590d7d4/contrib/views/slider/src/main/resources/ui/app/translations.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/translations.js b/contrib/views/slider/src/main/resources/ui/app/translations.js
index 6c22176..83be669 100644
--- a/contrib/views/slider/src/main/resources/ui/app/translations.js
+++ b/contrib/views/slider/src/main/resources/ui/app/translations.js
@@ -55,6 +55,7 @@ Em.I18n.translations = {
},
'error.config_is_empty': 'Config <strong>{0}</strong> should not be empty',
+ 'error.config_is_empty_2': 'Config <strong>{0}</strong> should not be empty, because <strong>{1}</strong> is set to "true"',
'popup.confirmation.commonHeader': 'Confirmation',
'question.sure':'Are you sure?',
[06/16] git commit: AMBARI-7430. By default create apps folder for
Slider apps and drop a README (aonishuk)
Posted by jo...@apache.org.
AMBARI-7430. By default create apps folder for Slider apps and drop a README (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7b2f4673
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7b2f4673
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7b2f4673
Branch: refs/heads/branch-alerts-dev
Commit: 7b2f467377e13ae81dd17930c49b9755968ef679
Parents: 0221541
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Mon Sep 22 15:42:17 2014 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Mon Sep 22 15:42:17 2014 +0300
----------------------------------------------------------------------
ambari-server/pom.xml | 22 ++++++++++++++++++++
.../main/resources/slider_resources/README.txt | 17 +++++++++++++++
2 files changed, 39 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/7b2f4673/ambari-server/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml
index bbf21fe..6287cdb 100644
--- a/ambari-server/pom.xml
+++ b/ambari-server/pom.xml
@@ -426,6 +426,17 @@
</sources>
</mapping>
<mapping>
+ <directory>/var/lib/ambari-server/resources/apps</directory>
+ <filemode>755</filemode>
+ <username>root</username>
+ <groupname>root</groupname>
+ <sources>
+ <source>
+ <location>src/main/resources/slider_resources/README.txt</location>
+ </source>
+ </sources>
+ </mapping>
+ <mapping>
<directory>/var/lib/ambari-server/resources/scripts</directory>
<filemode>755</filemode>
<sources>
@@ -679,6 +690,17 @@
</mapper>
</data>
<data>
+ <src>src/main/resources/slider_resources/README.txt</src>
+ <type>file</type>
+ <mapper>
+ <type>perm</type>
+ <prefix>/var/lib/ambari-server/resources/apps/</prefix>
+ <user>root</user>
+ <group>root</group>
+ <filemode>755</filemode>
+ </mapper>
+ </data>
+ <data>
<src>conf/unix/ca.config</src>
<type>file</type>
<mapper>
http://git-wip-us.apache.org/repos/asf/ambari/blob/7b2f4673/ambari-server/src/main/resources/slider_resources/README.txt
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/slider_resources/README.txt b/ambari-server/src/main/resources/slider_resources/README.txt
new file mode 100644
index 0000000..4123e05
--- /dev/null
+++ b/ambari-server/src/main/resources/slider_resources/README.txt
@@ -0,0 +1,17 @@
+# 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.
+
+
+Drop Apache Slider application .zip packages in this folder.
\ No newline at end of file
[16/16] git commit: Merge branch 'trunk' into branch-alerts-dev
Posted by jo...@apache.org.
Merge branch 'trunk' into branch-alerts-dev
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e6cc0587
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e6cc0587
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e6cc0587
Branch: refs/heads/branch-alerts-dev
Commit: e6cc05872462d53f9b420837f129921d0e2e0b24
Parents: 7f86e75 802df76
Author: Jonathan Hurley <jh...@hortonworks.com>
Authored: Mon Sep 22 10:47:55 2014 -0700
Committer: Jonathan Hurley <jh...@hortonworks.com>
Committed: Mon Sep 22 10:47:55 2014 -0700
----------------------------------------------------------------------
ambari-server/pom.xml | 22 ++++
.../internal/ClientConfigResourceProvider.java | 33 ++++-
.../internal/ConfigGroupResourceProvider.java | 15 ++-
.../server/upgrade/UpgradeCatalog170.java | 68 +++++-----
.../main/resources/slider_resources/README.txt | 17 +++
.../services/GANGLIA/package/scripts/params.py | 5 +-
.../services/GANGLIA/package/scripts/params.py | 6 +-
.../services/OOZIE/package/scripts/oozie.py | 10 +-
.../services/OOZIE/package/scripts/params.py | 13 +-
.../services/SQOOP/package/scripts/params.py | 2 +
.../SQOOP/package/scripts/service_check.py | 1 +
.../services/FALCON/package/scripts/falcon.py | 4 +
.../services/STORM/configuration/storm-site.xml | 6 +-
.../services/SLIDER/package/scripts/slider.py | 3 +-
.../services/STORM/configuration/storm-site.xml | 6 +-
.../ClientConfigResourceProviderTest.java | 9 +-
.../ConfigGroupResourceProviderTest.java | 37 +++++-
.../server/upgrade/UpgradeCatalog170Test.java | 125 ++++++++++++-------
.../stacks/2.0.6/OOZIE/test_oozie_client.py | 18 +--
.../stacks/2.0.6/OOZIE/test_oozie_server.py | 18 +--
.../stacks/2.0.6/SQOOP/test_service_check.py | 2 +
.../stacks/2.1/FALCON/test_falcon_client.py | 4 +
.../stacks/2.1/FALCON/test_falcon_server.py | 4 +
.../stacks/2.2/SLIDER/test_slider_client.py | 4 +-
.../main/dashboard/config_history_controller.js | 1 +
ambari-web/app/controllers/main/service/item.js | 28 ++++-
ambari-web/app/templates/main/host/details.hbs | 2 +-
ambari-web/app/templates/main/service/item.hbs | 13 +-
ambari-web/app/views/common/filter_view.js | 74 ++++++++++-
.../views/main/dashboard/config_history_view.js | 10 +-
ambari-web/app/views/main/service/item.js | 6 +-
contrib/views/slider/docs/index.md | 63 ++++++++++
.../view/slider/SliderAppsViewController.java | 8 ++
.../slider/SliderAppsViewControllerImpl.java | 69 +++++-----
.../assets/data/resource/slider-properties.json | 7 +-
.../ui/app/controllers/slider_controller.js | 20 ++-
.../src/main/resources/ui/app/helpers/ajax.js | 7 +-
.../resources/ui/app/models/slider_config.js | 8 +-
.../src/main/resources/ui/app/routes/main.js | 7 +-
.../src/main/resources/ui/app/translations.js | 1 +
.../views/slider/src/main/resources/view.xml | 25 ++++
41 files changed, 596 insertions(+), 185 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/e6cc0587/ambari-server/pom.xml
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/e6cc0587/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
----------------------------------------------------------------------
[07/16] git commit: AMBARI-7431. HDP-2.2.1 install results in Nimbus
component failing to start (aonishuk)
Posted by jo...@apache.org.
AMBARI-7431. HDP-2.2.1 install results in Nimbus component failing to start (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e582b1e3
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e582b1e3
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e582b1e3
Branch: refs/heads/branch-alerts-dev
Commit: e582b1e3e27ee08078bffbee8315afd19f612654
Parents: 7b2f467
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Mon Sep 22 16:15:06 2014 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Mon Sep 22 16:15:06 2014 +0300
----------------------------------------------------------------------
.../stacks/HDP/2.1/services/STORM/configuration/storm-site.xml | 6 +++---
.../stacks/HDP/2.2/services/STORM/configuration/storm-site.xml | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/e582b1e3/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/configuration/storm-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/configuration/storm-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/configuration/storm-site.xml
index b02d23a..b6a2cf2 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/configuration/storm-site.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/configuration/storm-site.xml
@@ -118,7 +118,7 @@
</property>
<property>
<name>nimbus.childopts</name>
- <value>-Xmx1024m -Djava.security.auth.login.config=/etc/storm/conf/storm_jaas.conf -javaagent:/usr/lib/storm/contrib/storm-jmxetric/lib/jmxetric-1.0.4.jar=host=localhost,port=8649,wireformat31x=true,mode=multicast,config=/usr/lib/storm/contrib/storm-jmxetric/conf/jmxetric-conf.xml,process=Nimbus_JVM</value>
+ <value>-Xmx1024m -javaagent:/usr/lib/storm/contrib/storm-jmxetric/lib/jmxetric-1.0.4.jar=host=localhost,port=8649,wireformat31x=true,mode=multicast,config=/usr/lib/storm/contrib/storm-jmxetric/conf/jmxetric-conf.xml,process=Nimbus_JVM</value>
<description>This parameter is used by the storm-deploy project to configure the jvm options for the nimbus daemon.</description>
</property>
<property>
@@ -188,7 +188,7 @@
</property>
<property>
<name>ui.childopts</name>
- <value>-Xmx768m -Djava.security.auth.login.config=/etc/storm/conf/storm_jaas.conf</value>
+ <value>-Xmx768m</value>
<description>Childopts for Storm UI Java process.</description>
</property>
<property>
@@ -264,7 +264,7 @@
</property>
<property>
<name>supervisor.childopts</name>
- <value>-Xmx256m -Djava.security.auth.login.config=/etc/storm/conf/storm_jaas.conf -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=56431 -javaagent:/usr/lib/storm/contrib/storm-jmxetric/lib/jmxetric-1.0.4.jar=host=localhost,port=8650,wireformat31x=true,mode=multicast,config=/usr/lib/storm/contrib/storm-jmxetric/conf/jmxetric-conf.xml,process=Supervisor_JVM</value>
+ <value>-Xmx256m -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=56431 -javaagent:/usr/lib/storm/contrib/storm-jmxetric/lib/jmxetric-1.0.4.jar=host=localhost,port=8650,wireformat31x=true,mode=multicast,config=/usr/lib/storm/contrib/storm-jmxetric/conf/jmxetric-conf.xml,process=Supervisor_JVM</value>
<description>This parameter is used by the storm-deploy project to configure the jvm options for the supervisor daemon.</description>
</property>
<property>
http://git-wip-us.apache.org/repos/asf/ambari/blob/e582b1e3/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/configuration/storm-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/configuration/storm-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/configuration/storm-site.xml
index 57a4889..f204456 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/configuration/storm-site.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/configuration/storm-site.xml
@@ -25,7 +25,7 @@
<property>
<name>nimbus.childopts</name>
- <value>-Xmx1024m -Djava.security.auth.login.config=/etc/storm/conf/storm_jaas.conf -javaagent:/usr/hdp/current/storm/contrib/storm-jmxetric/lib/jmxetric-1.0.4.jar=host=localhost,port=8649,wireformat31x=true,mode=multicast,config=/usr/hdp/current/storm/contrib/storm-jmxetric/conf/jmxetric-conf.xml,process=Nimbus_JVM</value>
+ <value>-Xmx1024m -javaagent:/usr/hdp/current/storm/contrib/storm-jmxetric/lib/jmxetric-1.0.4.jar=host=localhost,port=8649,wireformat31x=true,mode=multicast,config=/usr/hdp/current/storm/contrib/storm-jmxetric/conf/jmxetric-conf.xml,process=Nimbus_JVM</value>
<description>This parameter is used by the storm-deploy project to configure the jvm options for the nimbus daemon.</description>
</property>
@@ -39,13 +39,13 @@
<property>
<name>ui.childopts</name>
- <value>-Xmx768m -Djava.security.auth.login.config=/etc/storm/conf/storm_jaas.conf</value>
+ <value>-Xmx768m</value>
<description>Childopts for Storm UI Java process.</description>
</property>
<property>
<name>supervisor.childopts</name>
- <value>-Xmx256m -Djava.security.auth.login.config=/etc/storm/conf/storm_jaas.conf -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=56431 -javaagent:/usr/hdp/current/storm/contrib/storm-jmxetric/lib/jmxetric-1.0.4.jar=host=localhost,port=8650,wireformat31x=true,mode=multicast,config=/usr/hdp/current/storm/contrib/storm-jmxetric/conf/jmxetric-conf.xml,process=Supervisor_JVM</value>
+ <value>-Xmx256m -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=56431 -javaagent:/usr/hdp/current/storm/contrib/storm-jmxetric/lib/jmxetric-1.0.4.jar=host=localhost,port=8650,wireformat31x=true,mode=multicast,config=/usr/hdp/current/storm/contrib/storm-jmxetric/conf/jmxetric-conf.xml,process=Supervisor_JVM</value>
<description>This parameter is used by the storm-deploy project to configure the jvm options for the supervisor daemon.</description>
</property>
[14/16] git commit: AMBARI-7434. Unable to download client configs
(dlysnichenko)
Posted by jo...@apache.org.
AMBARI-7434. Unable to download client configs (dlysnichenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/57030a4d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/57030a4d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/57030a4d
Branch: refs/heads/branch-alerts-dev
Commit: 57030a4d1915ea3d219c66ca2a65840b3e078481
Parents: fc89a92
Author: Lisnichenko Dmitro <dl...@hortonworks.com>
Authored: Mon Sep 22 20:03:04 2014 +0300
Committer: Lisnichenko Dmitro <dl...@hortonworks.com>
Committed: Mon Sep 22 20:04:35 2014 +0300
----------------------------------------------------------------------
.../internal/ClientConfigResourceProvider.java | 33 +++++++++++++++++---
.../ClientConfigResourceProviderTest.java | 9 ++++--
2 files changed, 35 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/57030a4d/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
index 34f4d6f..1caae37e 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
@@ -341,11 +341,13 @@ public class ClientConfigResourceProvider extends AbstractControllerResourceProv
if (currentHostsIndexes == null) {
continue;
}
- for (String hostIndex : currentHostsIndexes) {
- try {
- hosts.add(allHosts[Integer.parseInt(hostIndex)]);
- } catch (ArrayIndexOutOfBoundsException ex) {
- throw new SystemException("Failed to fill cluster host info ", ex);
+ for (String hostIndexRange : currentHostsIndexes) {
+ for (Integer hostIndex : rangeToSet(hostIndexRange)) {
+ try {
+ hosts.add(allHosts[hostIndex]);
+ } catch (ArrayIndexOutOfBoundsException ex) {
+ throw new SystemException("Failed to fill cluster host info ", ex);
+ }
}
}
clusterHostInfo.put(key, hosts);
@@ -353,6 +355,27 @@ public class ClientConfigResourceProvider extends AbstractControllerResourceProv
return clusterHostInfo;
}
+ private static Set<Integer> rangeToSet(String range) {
+ Set<Integer> indexSet = new HashSet<Integer>();
+ int startIndex;
+ int endIndex;
+ if (range.contains("-")) {
+ startIndex = Integer.parseInt(range.split("-")[0]);
+ endIndex = Integer.parseInt(range.split("-")[1]);
+ }
+ else if (range.contains(",")) {
+ startIndex = Integer.parseInt(range.split(",")[0]);
+ endIndex = Integer.parseInt(range.split(",")[1]);
+ }
+ else {
+ startIndex = endIndex = Integer.parseInt(range);
+ }
+ for (int i=startIndex; i<=endIndex; i++) {
+ indexSet.add(i);
+ }
+ return indexSet;
+ }
+
@Override
public RequestStatus updateResources(final Request request, Predicate predicate)
throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {
http://git-wip-us.apache.org/repos/asf/ambari/blob/57030a4d/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java
index 916e0de..ef094b5 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java
@@ -232,11 +232,16 @@ public class ClientConfigResourceProviderTest {
PowerMock.mockStaticPartial(StageUtils.class, "getClusterHostInfo");
Map<String, Set<String>> clusterHostInfo = new HashMap<String, Set<String>>();
Set<String> all_hosts = new HashSet<String>(Arrays.asList("Host100","Host101","Host102"));
- Set<String> some_hosts = new HashSet<String>(Arrays.asList("0","2"));
+ Set<String> some_hosts = new HashSet<String>(Arrays.asList("0-1","2"));
+ Set<String> ohter_hosts = new HashSet<String>(Arrays.asList("0,1"));
Set<String> clusterHostTypes = new HashSet<String>(Arrays.asList("nm_hosts", "hs_host",
"namenode_host", "rm_host", "snamenode_host", "slave_hosts", "zookeeper_hosts"));
for (String hostTypes: clusterHostTypes) {
- clusterHostInfo.put(hostTypes,some_hosts);
+ if (hostTypes.equals("slave_hosts")) {
+ clusterHostInfo.put(hostTypes, ohter_hosts);
+ } else {
+ clusterHostInfo.put(hostTypes, some_hosts);
+ }
}
Map<String, Host> stringHostMap = new HashMap<String, Host>();
stringHostMap.put(hostName, host);
[12/16] git commit: AMBARI-7423. ganglia host metrics not showing in
non-HDFS cluster. (jaimin)
Posted by jo...@apache.org.
AMBARI-7423. ganglia host metrics not showing in non-HDFS cluster. (jaimin)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/97ff55ae
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/97ff55ae
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/97ff55ae
Branch: refs/heads/branch-alerts-dev
Commit: 97ff55ae272e4ea9d37584bd33e2c2f3b15499c8
Parents: 329b62f
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Mon Sep 22 09:34:53 2014 -0700
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Mon Sep 22 09:34:53 2014 -0700
----------------------------------------------------------------------
.../HDP/1.3.2/services/GANGLIA/package/scripts/params.py | 5 ++---
.../HDP/2.0.6/services/GANGLIA/package/scripts/params.py | 6 +++---
2 files changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/97ff55ae/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/GANGLIA/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/GANGLIA/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/GANGLIA/package/scripts/params.py
index 0417980..8394082 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/GANGLIA/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/GANGLIA/package/scripts/params.py
@@ -72,12 +72,11 @@ has_hbase_rs = not len(hbase_rs_hosts) == 0
has_flume = not len(flume_hosts) == 0
ganglia_cluster_names = {
- "jtnode_host" : [("HDPJournalNode", 8654)],
"flume_hosts" : [("HDPFlumeServer", 8655)],
"hbase_rs_hosts" : [("HDPHBaseRegionServer", 8656)],
"nm_hosts" : [("HDPNodeManager", 8657)],
"mapred_tt_hosts" : [("HDPTaskTracker", 8658)],
- "slave_hosts" : [("HDPDataNode", 8659), ("HDPSlaves", 8660)],
+ "slave_hosts" : [("HDPDataNode", 8659)],
"namenode_host" : [("HDPNameNode", 8661)],
"jtnode_host" : [("HDPJobTracker", 8662)],
"hbase_master_hosts" : [("HDPHBaseMaster", 8663)],
@@ -85,7 +84,7 @@ ganglia_cluster_names = {
"hs_host" : [("HDPHistoryServer", 8666)],
}
-ganglia_clusters = []
+ganglia_clusters = [("HDPSlaves", 8660)]
for key in ganglia_cluster_names:
property_name = format("/clusterHostInfo/{key}")
http://git-wip-us.apache.org/repos/asf/ambari/blob/97ff55ae/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/params.py
index a00f7b1..43ce36f 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/params.py
@@ -109,12 +109,12 @@ has_nimbus_server = not len(nimbus_server_hosts) == 0
has_supervisor_server = not len(supervisor_server_hosts) == 0
ganglia_cluster_names = {
- "jtnode_host": [("HDPJournalNode", 8654)],
+ "jn_hosts": [("HDPJournalNode", 8654)],
"flume_hosts": [("HDPFlumeServer", 8655)],
"hbase_rs_hosts": [("HDPHBaseRegionServer", 8656)],
"nm_hosts": [("HDPNodeManager", 8657)],
"mapred_tt_hosts": [("HDPTaskTracker", 8658)],
- "slave_hosts": [("HDPDataNode", 8659), ("HDPSlaves", 8660)],
+ "slave_hosts": [("HDPDataNode", 8659)],
"namenode_host": [("HDPNameNode", 8661)],
"jtnode_host": [("HDPJobTracker", 8662)],
"hbase_master_hosts": [("HDPHBaseMaster", 8663)],
@@ -127,7 +127,7 @@ ganglia_cluster_names = {
"ReservedPort3": [("ReservedPort3", 8669)]
}
-ganglia_clusters = []
+ganglia_clusters = [("HDPSlaves", 8660)]
for key in ganglia_cluster_names:
property_name = format("/clusterHostInfo/{key}")
[04/16] git commit: AMBARI-7428 Slider View: Even successful actions
showing error dialogs. (atkach)
Posted by jo...@apache.org.
AMBARI-7428 Slider View: Even successful actions showing error dialogs. (atkach)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6236d624
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6236d624
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6236d624
Branch: refs/heads/branch-alerts-dev
Commit: 6236d6245413eadf794c266c7f953cd4548cf2b1
Parents: 3590d7d
Author: atkach <at...@hortonworks.com>
Authored: Mon Sep 22 14:40:28 2014 +0300
Committer: atkach <at...@hortonworks.com>
Committed: Mon Sep 22 14:40:28 2014 +0300
----------------------------------------------------------------------
.../views/slider/src/main/resources/ui/app/helpers/ajax.js | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/6236d624/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js b/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js
index ea01d82..5ecd9c8 100644
--- a/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js
+++ b/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js
@@ -118,7 +118,8 @@ var urls = {
format: function (data) {
return {
type: 'PUT',
- data: JSON.stringify(data.data)
+ data: JSON.stringify(data.data),
+ dataType: 'text'
}
}
},
@@ -133,6 +134,7 @@ var urls = {
return {
type: 'POST',
data: JSON.stringify(data.data),
+ dataType: 'text',
showErrorPopup: true
}
}
@@ -144,6 +146,7 @@ var urls = {
format: function () {
return {
method: 'DELETE',
+ dataType: 'text',
showErrorPopup: true
}
}
@@ -159,6 +162,7 @@ var urls = {
return {
method: 'PUT',
data: JSON.stringify(data.data),
+ dataType: 'text',
showErrorPopup: true
}
}
@@ -173,6 +177,7 @@ var urls = {
return {
method: 'PUT',
data: JSON.stringify(data.data),
+ dataType: 'text',
showErrorPopup: true
}
}
[11/16] git commit: AMBARI-7435 Issues with Hive Client Configs
download. (atkach)
Posted by jo...@apache.org.
AMBARI-7435 Issues with Hive Client Configs download. (atkach)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/329b62fd
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/329b62fd
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/329b62fd
Branch: refs/heads/branch-alerts-dev
Commit: 329b62fd7f88ffeb0e3005b9cf6431f560e14928
Parents: 6eecc2c
Author: atkach <at...@hortonworks.com>
Authored: Mon Sep 22 18:52:08 2014 +0300
Committer: atkach <at...@hortonworks.com>
Committed: Mon Sep 22 18:52:08 2014 +0300
----------------------------------------------------------------------
ambari-web/app/controllers/main/service/item.js | 28 +++++++++++++++++---
ambari-web/app/templates/main/host/details.hbs | 2 +-
ambari-web/app/templates/main/service/item.hbs | 13 ++++++++-
ambari-web/app/views/main/service/item.js | 6 +++--
4 files changed, 42 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/329b62fd/ambari-web/app/controllers/main/service/item.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/item.js b/ambari-web/app/controllers/main/service/item.js
index 84d833f..5325c2d 100644
--- a/ambari-web/app/controllers/main/service/item.js
+++ b/ambari-web/app/controllers/main/service/item.js
@@ -101,6 +101,21 @@ App.MainServiceItemController = Em.Controller.extend({
allHosts: [],
+ clientComponents: function () {
+ var clientNames = [];
+ var clients = App.StackServiceComponent.find().filterProperty('serviceName', this.get('content.serviceName')).filterProperty('isClient');
+ clients.forEach(function (item) {
+ clientNames.push({
+ action: 'downloadClientConfigs',
+ context: {
+ name: item.get('componentName'),
+ label: item.get('displayName')
+ }
+ });
+ });
+ return clientNames;
+ }.property('content.serviceName'),
+
/**
* Common method for ajax (start/stop service) responses
* @param data
@@ -611,6 +626,13 @@ App.MainServiceItemController = Em.Controller.extend({
return (this.get('content.healthStatus') != 'green');
}.property('content.healthStatus','isPending'),
+ /**
+ * Determine if service has than one service client components
+ */
+ isSeveralClients: function () {
+ return App.StackServiceComponent.find().filterProperty('serviceName', this.get('content.serviceName')).filterProperty('isClient').length > 1;
+ }.property('content.serviceName'),
+
enableHighAvailability: function() {
var ability_controller = App.router.get('mainAdminHighAvailabilityController');
ability_controller.enableHighAvailability();
@@ -626,12 +648,12 @@ App.MainServiceItemController = Em.Controller.extend({
ability_controller.enableRMHighAvailability();
},
- downloadClientConfigs: function () {
+ downloadClientConfigs: function (event) {
var component = this.get('content.hostComponents').findProperty('isClient');
componentsUtils.downloadClientConfigs.call(this, {
serviceName: this.get('content.serviceName'),
- componentName: component.get('componentName'),
- displayName: component.get('displayName')
+ componentName: (event && event.name) || component.get('componentName'),
+ displayName: (event && event.label) || component.get('displayName')
});
},
http://git-wip-us.apache.org/repos/asf/ambari/blob/329b62fd/ambari-web/app/templates/main/host/details.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/host/details.hbs b/ambari-web/app/templates/main/host/details.hbs
index 41ea3e0..784063f 100644
--- a/ambari-web/app/templates/main/host/details.hbs
+++ b/ambari-web/app/templates/main/host/details.hbs
@@ -55,7 +55,7 @@
<ul class="dropdown-menu">
{{#each client in view.clients}}
<li>
- <a {{action "downloadClientConfigs" client target="controller" href=true}}>{{client.service.displayName}}</a>
+ <a {{action "downloadClientConfigs" client target="controller" href=true}}>{{client.displayName}}</a>
</li>
{{/each}}
</ul>
http://git-wip-us.apache.org/repos/asf/ambari/blob/329b62fd/ambari-web/app/templates/main/service/item.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/item.hbs b/ambari-web/app/templates/main/service/item.hbs
index 71bf554..a264f5f 100644
--- a/ambari-web/app/templates/main/service/item.hbs
+++ b/ambari-web/app/templates/main/service/item.hbs
@@ -83,11 +83,22 @@
<!-- Other service actions -->
{{#each option in view.maintenance}}
- <li {{bindAttr class="option.disabled option.isHidden:hidden"}}>
+ <li {{bindAttr class="option.disabled option.isHidden:hidden option.hasSubmenu:dropdown-submenu option.hasSubmenu:submenu-left"}}>
<a {{action "doAction" option target="controller" href=true}} {{bindAttr data-title="option.tooltip"}} rel="HealthTooltip">
<i {{bindAttr class="option.cssClass"}}></i>
{{option.label}}
</a>
+ {{#if option.hasSubmenu}}
+ <div class="dropdown-menu-wrap">
+ <ul class="dropdown-menu">
+ {{#each item in option.submenuOptions}}
+ <li>
+ <a {{action "doAction" item target="controller" href=true}}>{{item.context.label}}</a>
+ </li>
+ {{/each}}
+ </ul>
+ </div>
+ {{/if}}
</li>
{{/each}}
</ul>
http://git-wip-us.apache.org/repos/asf/ambari/blob/329b62fd/ambari-web/app/views/main/service/item.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/item.js b/ambari-web/app/views/main/service/item.js
index 7a388fd..cfb481a 100644
--- a/ambari-web/app/views/main/service/item.js
+++ b/ambari-web/app/views/main/service/item.js
@@ -101,11 +101,13 @@ App.MainServiceItemView = Em.View.extend({
disabled: false
},
DOWNLOAD_CLIENT_CONFIGS: {
- action: 'downloadClientConfigs',
+ action: this.get('controller.isSeveralClients') ? '' : 'downloadClientConfigs',
label: Em.I18n.t('services.service.actions.downloadClientConfigs'),
cssClass: 'icon-download-alt',
isHidden: !(App.get('supports.downloadClientConfigs') && this.get('controller.content.hostComponents').findProperty('isClient')),
- disabled: false
+ disabled: false,
+ hasSubmenu: this.get('controller.isSeveralClients'),
+ submenuOptions: this.get('controller.clientComponents')
}
}
},
[13/16] git commit: AMBARI-7425. WebHCat Issues with after 1.6.1 ->
1.7.0 upgrade. (jaimin)
Posted by jo...@apache.org.
AMBARI-7425. WebHCat Issues with after 1.6.1 -> 1.7.0 upgrade. (jaimin)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fc89a92d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fc89a92d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fc89a92d
Branch: refs/heads/branch-alerts-dev
Commit: fc89a92df5a7686f7e072789467c3fcfbafda718
Parents: 97ff55a
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Mon Sep 22 09:53:18 2014 -0700
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Mon Sep 22 09:53:18 2014 -0700
----------------------------------------------------------------------
.../server/upgrade/UpgradeCatalog170.java | 58 ++++-----
.../server/upgrade/UpgradeCatalog170Test.java | 125 ++++++++++++-------
2 files changed, 103 insertions(+), 80 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/fc89a92d/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
index db96aa7..bbc29f2 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
@@ -18,30 +18,9 @@
package org.apache.ambari.server.upgrade;
-import java.lang.reflect.Type;
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-
-import javax.persistence.EntityManager;
-import javax.persistence.TypedQuery;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Expression;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
-
+import com.google.common.reflect.TypeToken;
+import com.google.inject.Inject;
+import com.google.inject.Injector;
import org.apache.ambari.server.AmbariException;
import org.apache.ambari.server.configuration.Configuration;
import org.apache.ambari.server.controller.AmbariManagementController;
@@ -50,8 +29,6 @@ import org.apache.ambari.server.orm.dao.ClusterDAO;
import org.apache.ambari.server.orm.dao.ClusterServiceDAO;
import org.apache.ambari.server.orm.dao.ConfigGroupConfigMappingDAO;
import org.apache.ambari.server.orm.dao.DaoUtils;
-import org.apache.ambari.server.orm.dao.HostComponentDesiredStateDAO;
-import org.apache.ambari.server.orm.dao.HostComponentStateDAO;
import org.apache.ambari.server.orm.dao.HostRoleCommandDAO;
import org.apache.ambari.server.orm.dao.KeyValueDAO;
import org.apache.ambari.server.orm.dao.PermissionDAO;
@@ -96,9 +73,28 @@ import org.apache.ambari.server.utils.StageUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.google.common.reflect.TypeToken;
-import com.google.inject.Inject;
-import com.google.inject.Injector;
+import javax.persistence.EntityManager;
+import javax.persistence.TypedQuery;
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Expression;
+import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
+import java.lang.reflect.Type;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
/**
* Upgrade catalog for version 1.7.0.
@@ -664,8 +660,6 @@ public class UpgradeCatalog170 extends AbstractUpgradeCatalog {
ClusterServiceDAO clusterServiceDAO = injector.getInstance(ClusterServiceDAO.class);
ServiceDesiredStateDAO serviceDesiredStateDAO = injector.getInstance(ServiceDesiredStateDAO.class);
ServiceComponentDesiredStateDAO serviceComponentDesiredStateDAO = injector.getInstance(ServiceComponentDesiredStateDAO.class);
- HostComponentDesiredStateDAO hostComponentDesiredStateDAO = injector.getInstance(HostComponentDesiredStateDAO.class);
- HostComponentStateDAO hostComponentStateDAO = injector.getInstance(HostComponentStateDAO.class);
List<ClusterEntity> clusterEntities = clusterDAO.findAll();
for (final ClusterEntity clusterEntity : clusterEntities) {
@@ -736,7 +730,7 @@ public class UpgradeCatalog170 extends AbstractUpgradeCatalog {
hostComponentStateEntity.setHostEntity(hcStateToBeDeleted.getHostEntity());
hostComponentStateEntity.setServiceName(serviceName);
hostComponentStateEntity.setServiceComponentDesiredStateEntity(serviceComponentDesiredStateEntity);
- em.merge(hcStateToBeDeleted);
+ em.merge(hostComponentStateEntity);
em.remove(hcStateToBeDeleted);
}
serviceComponentDesiredStateEntity.setClusterServiceEntity(clusterServiceEntity);
http://git-wip-us.apache.org/repos/asf/ambari/blob/fc89a92d/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java
index f7715fd..6bc7a3b 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java
@@ -18,47 +18,13 @@
package org.apache.ambari.server.upgrade;
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertNull;
-import static junit.framework.Assert.assertTrue;
-import static org.easymock.EasyMock.anyObject;
-import static org.easymock.EasyMock.capture;
-import static org.easymock.EasyMock.createMockBuilder;
-import static org.easymock.EasyMock.createNiceMock;
-import static org.easymock.EasyMock.createStrictMock;
-import static org.easymock.EasyMock.eq;
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.expectLastCall;
-import static org.easymock.EasyMock.isA;
-import static org.easymock.EasyMock.replay;
-import static org.easymock.EasyMock.reset;
-import static org.easymock.EasyMock.verify;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.persistence.EntityManager;
-import javax.persistence.EntityTransaction;
-import javax.persistence.TypedQuery;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Order;
-import javax.persistence.criteria.Path;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
-import javax.persistence.metamodel.SingularAttribute;
-
+import com.google.inject.Binder;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+import com.google.inject.Module;
+import com.google.inject.Provider;
+import com.google.inject.persist.PersistService;
+import com.google.inject.persist.Transactional;
import org.apache.ambari.server.AmbariException;
import org.apache.ambari.server.configuration.Configuration;
import org.apache.ambari.server.controller.AmbariManagementController;
@@ -69,6 +35,7 @@ import org.apache.ambari.server.orm.dao.ClusterDAO;
import org.apache.ambari.server.orm.dao.ClusterServiceDAO;
import org.apache.ambari.server.orm.dao.ConfigGroupConfigMappingDAO;
import org.apache.ambari.server.orm.dao.HostComponentDesiredStateDAO;
+import org.apache.ambari.server.orm.dao.HostComponentStateDAO;
import org.apache.ambari.server.orm.dao.HostDAO;
import org.apache.ambari.server.orm.dao.KeyValueDAO;
import org.apache.ambari.server.orm.dao.PermissionDAO;
@@ -86,7 +53,9 @@ import org.apache.ambari.server.orm.entities.ClusterEntity;
import org.apache.ambari.server.orm.entities.ClusterServiceEntity;
import org.apache.ambari.server.orm.entities.ConfigGroupConfigMappingEntity;
import org.apache.ambari.server.orm.entities.HostComponentDesiredStateEntity;
+import org.apache.ambari.server.orm.entities.HostComponentDesiredStateEntityPK;
import org.apache.ambari.server.orm.entities.HostComponentStateEntity;
+import org.apache.ambari.server.orm.entities.HostComponentStateEntityPK;
import org.apache.ambari.server.orm.entities.HostEntity;
import org.apache.ambari.server.orm.entities.HostRoleCommandEntity;
import org.apache.ambari.server.orm.entities.KeyValueEntity;
@@ -94,6 +63,7 @@ import org.apache.ambari.server.orm.entities.PrivilegeEntity;
import org.apache.ambari.server.orm.entities.ResourceEntity;
import org.apache.ambari.server.orm.entities.ResourceTypeEntity;
import org.apache.ambari.server.orm.entities.ServiceComponentDesiredStateEntity;
+import org.apache.ambari.server.orm.entities.ServiceComponentDesiredStateEntityPK;
import org.apache.ambari.server.orm.entities.ServiceDesiredStateEntity;
import org.apache.ambari.server.orm.entities.UserEntity;
import org.apache.ambari.server.orm.entities.ViewEntity;
@@ -110,13 +80,46 @@ import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
-import com.google.inject.Binder;
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-import com.google.inject.Module;
-import com.google.inject.Provider;
-import com.google.inject.persist.PersistService;
-import com.google.inject.persist.Transactional;
+import javax.persistence.EntityManager;
+import javax.persistence.EntityTransaction;
+import javax.persistence.TypedQuery;
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Order;
+import javax.persistence.criteria.Path;
+import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
+import javax.persistence.metamodel.SingularAttribute;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertNotNull;
+import static junit.framework.Assert.assertNull;
+import static junit.framework.Assert.assertTrue;
+import static org.easymock.EasyMock.anyObject;
+import static org.easymock.EasyMock.capture;
+import static org.easymock.EasyMock.createMockBuilder;
+import static org.easymock.EasyMock.createNiceMock;
+import static org.easymock.EasyMock.createStrictMock;
+import static org.easymock.EasyMock.eq;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.expectLastCall;
+import static org.easymock.EasyMock.isA;
+import static org.easymock.EasyMock.replay;
+import static org.easymock.EasyMock.reset;
+import static org.easymock.EasyMock.verify;
/**
* UpgradeCatalog170 unit tests.
@@ -273,6 +276,32 @@ public class UpgradeCatalog170Test {
addComponent(clusterEntity, clusterServiceEntityWEBHCAT, hostEntity, "WEBHCAT_SERVER");
UpgradeCatalog170 upgradeCatalog170 = injector.getInstance(UpgradeCatalog170.class);
upgradeCatalog170.moveHcatalogIntoHiveService();
+
+ ServiceComponentDesiredStateDAO serviceComponentDesiredStateDAO = injector.getInstance(ServiceComponentDesiredStateDAO.class);
+ ServiceComponentDesiredStateEntityPK pkHCATInHive = new ServiceComponentDesiredStateEntityPK();
+ pkHCATInHive.setComponentName("HCAT");
+ pkHCATInHive.setClusterId(clusterEntity.getClusterId());
+ pkHCATInHive.setServiceName("HIVE");
+ ServiceComponentDesiredStateEntity serviceComponentDesiredStateEntity = serviceComponentDesiredStateDAO.findByPK(pkHCATInHive);
+ assertNotNull(serviceComponentDesiredStateEntity);
+
+ HostComponentDesiredStateDAO hostComponentDesiredStateDAO = injector.getInstance(HostComponentDesiredStateDAO.class);
+ HostComponentDesiredStateEntityPK hcDesiredStateEntityPk = new HostComponentDesiredStateEntityPK();
+ hcDesiredStateEntityPk.setServiceName("HIVE");
+ hcDesiredStateEntityPk.setClusterId(clusterEntity.getClusterId());
+ hcDesiredStateEntityPk.setComponentName("HCAT");
+ hcDesiredStateEntityPk.setHostName(HOST_NAME);
+ HostComponentDesiredStateEntity hcDesiredStateEntity = hostComponentDesiredStateDAO.findByPK(hcDesiredStateEntityPk);
+ assertNotNull(hcDesiredStateEntity);
+
+ HostComponentStateDAO hostComponentStateDAO = injector.getInstance(HostComponentStateDAO.class);
+ HostComponentStateEntityPK hcStateEntityPk = new HostComponentStateEntityPK();
+ hcStateEntityPk.setServiceName("HIVE");
+ hcStateEntityPk.setClusterId(clusterEntity.getClusterId());
+ hcStateEntityPk.setComponentName("HCAT");
+ hcStateEntityPk.setHostName(HOST_NAME);
+ HostComponentStateEntity hcStateEntity = hostComponentStateDAO.findByPK(hcStateEntityPk);
+ assertNotNull(hcStateEntity);
}
[05/16] git commit: Merge remote-tracking branch 'origin/trunk' into
trunk
Posted by jo...@apache.org.
Merge remote-tracking branch 'origin/trunk' into trunk
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/02215416
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/02215416
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/02215416
Branch: refs/heads/branch-alerts-dev
Commit: 02215416f701215570bfb3eeb23db3cf1461824f
Parents: af150a1 6236d62
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Mon Sep 22 14:43:24 2014 +0300
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Mon Sep 22 14:43:24 2014 +0300
----------------------------------------------------------------------
.../views/slider/src/main/resources/ui/app/helpers/ajax.js | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
[10/16] git commit: AMBARI-7433. Issues on upgrade ambari
1.6.0->1.7.0(ambari+mysql)(vbrodetskyi)
Posted by jo...@apache.org.
AMBARI-7433. Issues on upgrade ambari 1.6.0->1.7.0(ambari+mysql)(vbrodetskyi)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6eecc2c1
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6eecc2c1
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6eecc2c1
Branch: refs/heads/branch-alerts-dev
Commit: 6eecc2c156cdb9058f3c098770590a00b6ab32ff
Parents: f4ddfd6
Author: Vitaly Brodetskyi <vb...@hortonworks.com>
Authored: Mon Sep 22 17:49:54 2014 +0300
Committer: Vitaly Brodetskyi <vb...@hortonworks.com>
Committed: Mon Sep 22 17:49:54 2014 +0300
----------------------------------------------------------------------
.../apache/ambari/server/upgrade/UpgradeCatalog170.java | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/6eecc2c1/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
index 1313a3f..db96aa7 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
@@ -332,7 +332,7 @@ public class UpgradeCatalog170 extends AbstractUpgradeCatalog {
}
} else if (Configuration.MYSQL_DB_NAME.equals(dbType)) {
if (dbAccessor.tableHasData("clusterconfig")) {
- dbAccessor.executeQuery("UPDATE viewinstance " +
+ dbAccessor.executeQuery("UPDATE clusterconfig " +
"SET config_id = (SELECT @a := @a + 1 FROM (SELECT @a := 1) s)");
}
} else if (Configuration.POSTGRES_DB_NAME.equals(dbType)) {
@@ -370,7 +370,11 @@ public class UpgradeCatalog170 extends AbstractUpgradeCatalog {
populateConfigVersions();
- dbAccessor.setNullable("clusterconfig", "version", false);
+ if (Configuration.MYSQL_DB_NAME.equals(dbType)) {
+ dbAccessor.executeQuery("ALTER TABLE clusterconfig MODIFY version BIGINT NOT NULL");
+ } else {
+ dbAccessor.setNullable("clusterconfig", "version", false);
+ }
dbAccessor.executeQuery("ALTER TABLE clusterconfig ADD CONSTRAINT UQ_config_type_tag UNIQUE (cluster_id, type_name, version_tag)", true);
dbAccessor.executeQuery("ALTER TABLE clusterconfig ADD CONSTRAINT UQ_config_type_version UNIQUE (cluster_id, type_name, version)", true);
@@ -481,7 +485,7 @@ public class UpgradeCatalog170 extends AbstractUpgradeCatalog {
private void renameSequenceValueColumnName() throws AmbariException, SQLException {
final String dbType = getDbType();
if (Configuration.MYSQL_DB_NAME.equals(dbType)) {
- dbAccessor.executeQuery("ALTER TABLE ambari_sequences RENAME COLUMN value to sequence_value DECIMAL(38) NOT NULL");
+ dbAccessor.executeQuery("ALTER TABLE ambari_sequences CHANGE value sequence_value DECIMAL(38) NOT NULL");
} else if (Configuration.DERBY_DB_NAME.equals(dbType)) {
dbAccessor.executeQuery("RENAME COLUMN ambari_sequences.\"value\" to sequence_value");
} else if (Configuration.ORACLE_DB_NAME.equals(dbType)) {
[08/16] git commit: AMBARI-7429 /etc/oozie/conf directory doesn't
exist for Oozie (+Falcon, Slider) for HDP2.2 (dsen)
Posted by jo...@apache.org.
AMBARI-7429 /etc/oozie/conf directory doesn't exist for Oozie (+Falcon, Slider) for HDP2.2 (dsen)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/201b7e95
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/201b7e95
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/201b7e95
Branch: refs/heads/branch-alerts-dev
Commit: 201b7e9584c98f6dd93884999dbdced158e68428
Parents: e582b1e
Author: Dmytro Sen <ds...@hortonworks.com>
Authored: Mon Sep 22 15:28:57 2014 +0300
Committer: Dmytro Sen <ds...@hortonworks.com>
Committed: Mon Sep 22 16:16:04 2014 +0300
----------------------------------------------------------------------
.../2.0.6/services/OOZIE/package/scripts/oozie.py | 10 +++++-----
.../services/OOZIE/package/scripts/params.py | 13 ++++++-------
.../2.1/services/FALCON/package/scripts/falcon.py | 4 ++++
.../2.2/services/SLIDER/package/scripts/slider.py | 3 ++-
.../stacks/2.0.6/OOZIE/test_oozie_client.py | 18 ++++++++++--------
.../stacks/2.0.6/OOZIE/test_oozie_server.py | 18 ++++++++++--------
.../stacks/2.1/FALCON/test_falcon_client.py | 4 ++++
.../stacks/2.1/FALCON/test_falcon_server.py | 4 ++++
.../stacks/2.2/SLIDER/test_slider_client.py | 4 +++-
9 files changed, 48 insertions(+), 30 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/201b7e95/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py
index d390c69..667362c 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py
@@ -31,6 +31,11 @@ def oozie(is_server=False # TODO: see if see can remove this
owner=params.oozie_user,
mode=params.oozie_hdfs_user_mode
)
+ Directory( params.conf_dir,
+ recursive = True,
+ owner = params.oozie_user,
+ group = params.user_group
+ )
XmlConfig( "oozie-site.xml",
conf_dir = params.conf_dir,
configurations = params.config['configurations']['oozie-site'],
@@ -39,11 +44,6 @@ def oozie(is_server=False # TODO: see if see can remove this
group = params.user_group,
mode = 0664
)
- Directory( params.conf_dir,
- owner = params.oozie_user,
- group = params.user_group
- )
-
File(format("{conf_dir}/oozie-env.sh"),
owner=params.oozie_user,
content=InlineTemplate(params.oozie_env_sh_template)
http://git-wip-us.apache.org/repos/asf/ambari/blob/201b7e95/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py
index 4bce882..e81fd24 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py
@@ -30,17 +30,16 @@ rpm_version = default("/configurations/hadoop-env/rpm_version", None)
#hadoop params
if rpm_version is not None:
- hadoop_conf_dir = format("/usr/hdp/{rpm_version}/etc/hadoop/conf")
- hadoop_bin_dir = format("/usr/hdp/{rpm_version}/hadoop/bin")
- hadoop_lib_home = format("/usr/hdp/{rpm_version}/hadoop/lib")
- mapreduce_libs_path = format("/usr/hdp/{rpm_version}/hadoop-mapreduce/*")
- conf_dir = format("/usr/hdp/{rpm_version}/oozie/conf")
+ hadoop_bin_dir = "/usr/hdp/current/hadoop/bin"
+ hadoop_lib_home = "/usr/hdp/current/hadoop/lib"
+ mapreduce_libs_path = "/usr/hdp/current/hadoop-mapreduce/*"
else:
- hadoop_conf_dir = "/etc/hadoop/conf"
hadoop_bin_dir = "/usr/bin"
hadoop_lib_home = "/usr/lib/hadoop/lib"
mapreduce_libs_path = "/usr/lib/hadoop-mapreduce/*"
- conf_dir = "/etc/oozie/conf"
+
+hadoop_conf_dir = "/etc/hadoop/conf"
+conf_dir = "/etc/oozie/conf"
oozie_user = config['configurations']['oozie-env']['oozie_user']
smokeuser = config['configurations']['cluster-env']['smokeuser']
http://git-wip-us.apache.org/repos/asf/ambari/blob/201b7e95/ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/package/scripts/falcon.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/package/scripts/falcon.py b/ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/package/scripts/falcon.py
index 880e2d4..25ecef8 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/package/scripts/falcon.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/package/scripts/falcon.py
@@ -34,6 +34,10 @@ def falcon(type, action = None):
Directory(params.falcon_home,
owner=params.falcon_user
)
+ Directory(params.falcon_conf_dir,
+ owner=params.falcon_user,
+ recursive=True
+ )
File(params.falcon_conf_dir + '/falcon-env.sh',
content=InlineTemplate(params.falcon_env_sh_template)
)
http://git-wip-us.apache.org/repos/asf/ambari/blob/201b7e95/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/scripts/slider.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/scripts/slider.py b/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/scripts/slider.py
index 87e93f8..a3b6238 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/scripts/slider.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/scripts/slider.py
@@ -26,7 +26,8 @@ from resource_management import *
def slider():
import params
- Directory(params.slider_conf_dir
+ Directory(params.slider_conf_dir,
+ recursive=True
)
XmlConfig("slider-client.xml",
http://git-wip-us.apache.org/repos/asf/ambari/blob/201b7e95/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_client.py b/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_client.py
index 50c99e0..7afbf96 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_client.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_client.py
@@ -28,6 +28,11 @@ class TestOozieClient(RMFTestCase):
command = "configure",
config_file="default.json"
)
+ self.assertResourceCalled('Directory', '/etc/oozie/conf',
+ owner = 'oozie',
+ group = 'hadoop',
+ recursive = True
+ )
self.assertResourceCalled('XmlConfig', 'oozie-site.xml',
owner = 'oozie',
group = 'hadoop',
@@ -36,10 +41,6 @@ class TestOozieClient(RMFTestCase):
configurations = self.getConfig()['configurations']['oozie-site'],
configuration_attributes = self.getConfig()['configuration_attributes']['oozie-site']
)
- self.assertResourceCalled('Directory', '/etc/oozie/conf',
- owner = 'oozie',
- group = 'hadoop',
- )
self.assertResourceCalled('File', '/etc/oozie/conf/oozie-env.sh',
owner = 'oozie',
content = InlineTemplate(self.getConfig()['configurations']['oozie-env']['content'])
@@ -79,6 +80,11 @@ class TestOozieClient(RMFTestCase):
command = "configure",
config_file="secured.json"
)
+ self.assertResourceCalled('Directory', '/etc/oozie/conf',
+ owner = 'oozie',
+ group = 'hadoop',
+ recursive = True
+ )
self.assertResourceCalled('XmlConfig', 'oozie-site.xml',
owner = 'oozie',
group = 'hadoop',
@@ -87,10 +93,6 @@ class TestOozieClient(RMFTestCase):
configurations = self.getConfig()['configurations']['oozie-site'],
configuration_attributes = self.getConfig()['configuration_attributes']['oozie-site']
)
- self.assertResourceCalled('Directory', '/etc/oozie/conf',
- owner = 'oozie',
- group = 'hadoop',
- )
self.assertResourceCalled('File', '/etc/oozie/conf/oozie-env.sh',
owner = 'oozie',
content = InlineTemplate(self.getConfig()['configurations']['oozie-env']['content'])
http://git-wip-us.apache.org/repos/asf/ambari/blob/201b7e95/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py b/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py
index 5740587..d64af57 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py
@@ -125,6 +125,11 @@ class TestOozieServer(RMFTestCase):
bin_dir = '/usr/bin',
action = ['create'],
)
+ self.assertResourceCalled('Directory', '/etc/oozie/conf',
+ owner = 'oozie',
+ group = 'hadoop',
+ recursive = True
+ )
self.assertResourceCalled('XmlConfig', 'oozie-site.xml',
owner = 'oozie',
group = 'hadoop',
@@ -133,10 +138,6 @@ class TestOozieServer(RMFTestCase):
configurations = self.getConfig()['configurations']['oozie-site'],
configuration_attributes = self.getConfig()['configuration_attributes']['oozie-site']
)
- self.assertResourceCalled('Directory', '/etc/oozie/conf',
- owner = 'oozie',
- group = 'hadoop',
- )
self.assertResourceCalled('File', '/etc/oozie/conf/oozie-env.sh',
owner = 'oozie',
content = InlineTemplate(self.getConfig()['configurations']['oozie-env']['content'])
@@ -228,6 +229,11 @@ class TestOozieServer(RMFTestCase):
bin_dir = '/usr/bin',
action = ['create'],
)
+ self.assertResourceCalled('Directory', '/etc/oozie/conf',
+ owner = 'oozie',
+ group = 'hadoop',
+ recursive = True
+ )
self.assertResourceCalled('XmlConfig', 'oozie-site.xml',
owner = 'oozie',
group = 'hadoop',
@@ -236,10 +242,6 @@ class TestOozieServer(RMFTestCase):
configurations = self.getConfig()['configurations']['oozie-site'],
configuration_attributes = self.getConfig()['configuration_attributes']['oozie-site']
)
- self.assertResourceCalled('Directory', '/etc/oozie/conf',
- owner = 'oozie',
- group = 'hadoop',
- )
self.assertResourceCalled('File', '/etc/oozie/conf/oozie-env.sh',
owner = 'oozie',
content = InlineTemplate(self.getConfig()['configurations']['oozie-env']['content'])
http://git-wip-us.apache.org/repos/asf/ambari/blob/201b7e95/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_client.py b/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_client.py
index 18268d7..325c06a 100644
--- a/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_client.py
+++ b/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_client.py
@@ -40,6 +40,10 @@ class TestFalconClient(RMFTestCase):
self.assertResourceCalled('Directory', '/usr/lib/falcon',
owner = 'falcon',
)
+ self.assertResourceCalled('Directory', '/etc/falcon/conf',
+ owner = 'falcon',
+ recursive = True
+ )
self.assertResourceCalled('File', '/etc/falcon/conf/falcon-env.sh',
content = InlineTemplate(self.getConfig()['configurations']['falcon-env']['content']),
)
http://git-wip-us.apache.org/repos/asf/ambari/blob/201b7e95/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py b/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py
index 2282dcc..d747482 100644
--- a/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py
+++ b/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py
@@ -71,6 +71,10 @@ class TestFalconServer(RMFTestCase):
self.assertResourceCalled('Directory', '/usr/lib/falcon',
owner = 'falcon',
)
+ self.assertResourceCalled('Directory', '/etc/falcon/conf',
+ owner = 'falcon',
+ recursive = True
+ )
self.assertResourceCalled('File', '/etc/falcon/conf/falcon-env.sh',
content = InlineTemplate(self.getConfig()['configurations']['falcon-env']['content']),
)
http://git-wip-us.apache.org/repos/asf/ambari/blob/201b7e95/ambari-server/src/test/python/stacks/2.2/SLIDER/test_slider_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/SLIDER/test_slider_client.py b/ambari-server/src/test/python/stacks/2.2/SLIDER/test_slider_client.py
index 0b493f5..00d9057 100644
--- a/ambari-server/src/test/python/stacks/2.2/SLIDER/test_slider_client.py
+++ b/ambari-server/src/test/python/stacks/2.2/SLIDER/test_slider_client.py
@@ -29,7 +29,9 @@ class TestSliderClient(RMFTestCase):
config_file="default.json"
)
- self.assertResourceCalled('Directory', '/usr/lib/slider/conf'
+ self.assertResourceCalled('Directory',
+ '/usr/lib/slider/conf',
+ recursive=True
)
self.assertResourceCalled('XmlConfig',