ambari git commit: AMBARI-10786. Rename of ambari_sequences.sequence_value handled inappropriately during Upgrade (dlysnichenko)

2015-05-07 Thread dmitriusan
Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.maint 3608de943 - 0633c7587


AMBARI-10786. Rename of ambari_sequences.sequence_value handled inappropriately 
during Upgrade (dlysnichenko)


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

Branch: refs/heads/branch-2.0.maint
Commit: 0633c758711a6189d40ed40e08dfb3b965b74ae0
Parents: 3608de9
Author: Lisnichenko Dmitro dlysniche...@hortonworks.com
Authored: Thu May 7 13:00:54 2015 +0300
Committer: Lisnichenko Dmitro dlysniche...@hortonworks.com
Committed: Thu May 7 13:01:42 2015 +0300

--
 .../java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java  | 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0633c758/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 98ac89f..a703d42 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
@@ -497,6 +497,9 @@ public class UpgradeCatalog170 extends 
AbstractUpgradeCatalog {
*/
   private void renameSequenceValueColumnName() throws AmbariException, 
SQLException {
 final DatabaseType databaseType = configuration.getDatabaseType();
+if (dbAccessor.tableHasColumn(ambari_sequences, sequence_value)) {
+  return;
+}
 if (databaseType == DatabaseType.MYSQL) {
   dbAccessor.executeQuery(ALTER TABLE ambari_sequences CHANGE value 
sequence_value DECIMAL(38) NOT NULL);
 } else if (databaseType == DatabaseType.DERBY) {



[2/2] ambari git commit: AMBARI-10018. Kerberos: Password generator needs to generate passwords based on rules to satisfy password policy (rlevas)

2015-05-07 Thread rlevas
AMBARI-10018. Kerberos: Password generator needs to generate passwords based on 
rules to satisfy password policy (rlevas)


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

Branch: refs/heads/trunk
Commit: 6691a1742fe9927d68008d8f54d7a38bff97f524
Parents: c775434
Author: Robert Levas rle...@hortonworks.com
Authored: Thu May 7 14:44:50 2015 -0400
Committer: Robert Levas rle...@hortonworks.com
Committed: Thu May 7 14:44:50 2015 -0400

--
 .../server/security/SecurePasswordHelper.java   | 190 +++
 .../kerberos/CleanupServerAction.java   |  10 +-
 .../kerberos/CreateKeytabFilesServerAction.java |   8 +-
 .../kerberos/CreatePrincipalsServerAction.java  |  64 ++-
 .../kerberos/DestroyPrincipalsServerAction.java |   8 +-
 .../kerberos/FinalizeKerberosServerAction.java  |   5 +-
 .../kerberos/KerberosOperationHandler.java  |  54 +-
 .../kerberos/KerberosServerAction.java  |  25 ++-
 .../1.10.3-10/configuration/kerberos-env.xml|  48 +
 .../security/SecurePasswordHelperTest.java  | 153 +++
 .../ADKerberosOperationHandlerTest.java |  14 +-
 .../kerberos/KerberosOperationHandlerTest.java  |  54 +-
 .../kerberos/KerberosServerActionTest.java  |   1 +
 ambari-web/app/data/HDP2/site_properties.js | 112 ++-
 14 files changed, 607 insertions(+), 139 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6691a174/ambari-server/src/main/java/org/apache/ambari/server/security/SecurePasswordHelper.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/security/SecurePasswordHelper.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/security/SecurePasswordHelper.java
new file mode 100644
index 000..e995eec
--- /dev/null
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/security/SecurePasswordHelper.java
@@ -0,0 +1,190 @@
+/*
+ * 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.
+ */
+
+package org.apache.ambari.server.security;
+
+import com.google.inject.Singleton;
+
+import java.security.SecureRandom;
+import java.util.ArrayList;
+import java.util.List;
+
+@Singleton
+public class SecurePasswordHelper {
+
+  /**
+   * The default number of characters to generate for a secure password
+   */
+  public final static int DEFAULT_SECURE_PASSWORD_LENGTH = 18;
+  /**
+   * The default minimum number of lowercase letters to include when 
generating a secure password
+   */
+  public final static int DEFAULT_SECURE_PASSWORD_MIN_LOWERCASE_LETTERS = 1;
+  /**
+   * The default minimum number of uppercase letters to include when 
generating a secure password
+   */
+  public final static int DEFAULT_SECURE_PASSWORD_MIN_UPPERCASE_LETTERS = 1;
+  /**
+   * The default minimum number of digits to include when generating a secure 
password
+   */
+  public final static int DEFAULT_SECURE_PASSWORD_MIN_DIGITS = 1;
+  /**
+   * The default minimum number of punctuation characters to include when 
generating a secure password
+   */
+  public final static int DEFAULT_SECURE_PASSWORD_MIN_PUNCTUATION = 1;
+  /**
+   * The default minimum number of whitespace characters to include when 
generating a secure password
+   */
+  public final static int DEFAULT_SECURE_PASSWORD_MIN_WHITESPACE = 1;
+
+  /**
+   * The set of available lowercase letters to use when generating a secure 
password
+   */
+  protected final static char[] 
SECURE_PASSWORD_CHARACTER_CLASS_LOWERCASE_LETTERS = 
abcdefghijklmnopqrstuvwxyz.toCharArray();
+  /**
+   * The set of available uppercase letters to use when generating a secure 
password
+   */
+  protected final static char[] 
SECURE_PASSWORD_CHARACTER_CLASS_UPPERCASE_LETTERS = 
ABCDEFGHIJKLMNOPQRSTUVWXYZ.toCharArray();
+  /**
+   * The set of available digits to use when generating a secure password
+   */
+  protected 

[1/2] ambari git commit: Revert AMBARI-10018. Kerberos: Password generator needs to generate passwords based on rules to satisfy password policy (rlevas)

2015-05-07 Thread rlevas
Repository: ambari
Updated Branches:
  refs/heads/trunk 34c1e9b2c - 6691a1742


Revert AMBARI-10018. Kerberos: Password generator needs to generate passwords 
based on rules to satisfy password policy (rlevas)

This reverts commit 7b822e42b2faf2910d4776d8651f841e621eeb2d.


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

Branch: refs/heads/trunk
Commit: c775434edc34e2cc0a51f78a7b3eedb2415dc1c6
Parents: 34c1e9b
Author: Robert Levas rle...@hortonworks.com
Authored: Thu May 7 14:43:32 2015 -0400
Committer: Robert Levas rle...@hortonworks.com
Committed: Thu May 7 14:43:53 2015 -0400

--
 .../kerberos/CleanupServerAction.java   |  10 +-
 .../kerberos/CreateKeytabFilesServerAction.java |   8 +-
 .../kerberos/CreatePrincipalsServerAction.java  |  64 +--
 .../kerberos/DestroyPrincipalsServerAction.java |   8 +-
 .../kerberos/FinalizeKerberosServerAction.java  |   5 +-
 .../kerberos/KerberosOperationHandler.java  |  54 -
 .../kerberos/KerberosServerAction.java  |  25 ++---
 .../1.10.3-10/configuration/kerberos-env.xml|  48 
 .../ADKerberosOperationHandlerTest.java |  14 +--
 .../kerberos/KerberosOperationHandlerTest.java  |  54 +++--
 .../kerberos/KerberosServerActionTest.java  |   1 -
 ambari-web/app/data/HDP2/site_properties.js | 112 ++-
 12 files changed, 139 insertions(+), 264 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c775434e/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CleanupServerAction.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CleanupServerAction.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CleanupServerAction.java
index 64ebe0f..52ac8ac 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CleanupServerAction.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CleanupServerAction.java
@@ -49,18 +49,13 @@ public class CleanupServerAction extends 
KerberosServerAction {
* @param operationHandler a KerberosOperationHandler used to 
perform Kerberos-related
* tasks for specific Kerberos 
implementations
* (MIT, Active Directory, etc...)
-   * @param kerberosConfigurationa Map of configuration properties from 
kerberos-env
* @param requestSharedDataContext a Map to be used a shared data among all 
ServerActions related
* to a given request
* @return null, always
-   * @throws AmbariException if an error occurs while processing the identity 
record
+   * @throws AmbariException
*/
   @Override
-  protected CommandReport processIdentity(MapString, String identityRecord, 
String evaluatedPrincipal,
-  KerberosOperationHandler 
operationHandler,
-  MapString, String 
kerberosConfiguration,
-  MapString, Object 
requestSharedDataContext)
-  throws AmbariException {
+  protected CommandReport processIdentity(MapString, String identityRecord, 
String evaluatedPrincipal, KerberosOperationHandler operationHandler, 
MapString, Object requestSharedDataContext) throws AmbariException {
 return null;
   }
 
@@ -110,5 +105,4 @@ public class CleanupServerAction extends 
KerberosServerAction {
   throw new AmbariException(An unknown error occurred while trying to 
delete the cluster Kerberos descriptor, e);
 }
   }
-
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/c775434e/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CreateKeytabFilesServerAction.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CreateKeytabFilesServerAction.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CreateKeytabFilesServerAction.java
index 34780d6..f48c4cf 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CreateKeytabFilesServerAction.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CreateKeytabFilesServerAction.java
@@ -48,7 +48,7 @@ import java.util.concurrent.ConcurrentMap;
  * This class mainly relies on the KerberosServerAction to iterate through 
metadata identifying
  * the Kerberos keytab files that need to 

ambari git commit: AMBARI-10665. Internal Exception: org.postgresql.util.PSQLException: ERROR: column config_attributes does not exist (Emil Anca via rlevas)

2015-05-07 Thread rlevas
Repository: ambari
Updated Branches:
  refs/heads/trunk 6691a1742 - 90e9e811b


AMBARI-10665. Internal Exception: org.postgresql.util.PSQLException: ERROR: 
column config_attributes does not exist (Emil Anca via rlevas)


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

Branch: refs/heads/trunk
Commit: 90e9e811b5eca94d2597069ac5e563285455aa4e
Parents: 6691a17
Author: Emil Anca ea...@hortonworks.com
Authored: Thu May 7 15:46:37 2015 -0400
Committer: Robert Levas rle...@hortonworks.com
Committed: Thu May 7 15:46:37 2015 -0400

--
 .../orm/entities/BlueprintConfigEntity.java |  3 +-
 .../orm/entities/ClusterConfigEntity.java   |  2 +-
 .../orm/entities/HostGroupConfigEntity.java |  3 +-
 .../server/upgrade/UpgradeCatalog170.java   | 25 +++
 .../main/resources/Ambari-DDL-MySQL-CREATE.sql  |  4 +--
 .../resources/Ambari-DDL-Postgres-CREATE.sql|  6 ++--
 .../Ambari-DDL-Postgres-EMBEDDED-CREATE.sql |  6 ++--
 .../resources/Ambari-DDL-SQLServer-CREATE.sql   |  8 ++---
 .../server/upgrade/UpgradeCatalog170Test.java   | 33 +++-
 9 files changed, 62 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/90e9e811/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/BlueprintConfigEntity.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/BlueprintConfigEntity.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/BlueprintConfigEntity.java
index b27f7ef..24b0ad2 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/BlueprintConfigEntity.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/BlueprintConfigEntity.java
@@ -50,7 +50,8 @@ public class BlueprintConfigEntity implements 
BlueprintConfiguration {
   private String configData;
 
   @Column(name = config_attributes, nullable = true, insertable = true, 
updatable = false)
-  @Basic
+  @Basic(fetch = FetchType.LAZY)
+  @Lob
   private String configAttributes;
 
   @ManyToOne

http://git-wip-us.apache.org/repos/asf/ambari/blob/90e9e811/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigEntity.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigEntity.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigEntity.java
index 67f804c..8ca2278 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigEntity.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigEntity.java
@@ -77,7 +77,7 @@ public class ClusterConfigEntity {
   private String configJson;
 
   @Basic(fetch = FetchType.LAZY)
-  @Column(name = config_attributes, nullable = true, insertable = true, 
updatable = false, length = 32000)
+  @Column(name = config_attributes, nullable = true, insertable = true, 
updatable = false)
   @Lob
   private String configAttributesJson;
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/90e9e811/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostGroupConfigEntity.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostGroupConfigEntity.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostGroupConfigEntity.java
index 49870fe..877f34b 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostGroupConfigEntity.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostGroupConfigEntity.java
@@ -56,7 +56,8 @@ public class HostGroupConfigEntity implements 
BlueprintConfiguration {
   private String configData;
 
   @Column(name = config_attributes, nullable = true, insertable = true, 
updatable = false)
-  @Basic
+  @Basic(fetch = FetchType.LAZY)
+  @Lob
   private String configAttributes;
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/90e9e811/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 879cf31..76b2a46 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
+++ 

ambari git commit: AMBARI-11011. all_hosts list is out of sync with all_ipv4_ips and all_racks when hosts are being added progressively

2015-05-07 Thread smohanty
Repository: ambari
Updated Branches:
  refs/heads/trunk afb8b3b71 - 41f54cc01


AMBARI-11011. all_hosts list is out of sync with all_ipv4_ips and all_racks 
when hosts are being added progressively


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

Branch: refs/heads/trunk
Commit: 41f54cc0163430439e45b0f1fe8b3c2b88222c90
Parents: afb8b3b
Author: Sumit Mohanty smoha...@hortonworks.com
Authored: Thu May 7 18:27:40 2015 -0700
Committer: Sumit Mohanty smoha...@hortonworks.com
Committed: Thu May 7 18:27:40 2015 -0700

--
 .../apache/ambari/server/utils/StageUtils.java  | 61 ++--
 1 file changed, 43 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/41f54cc0/ambari-server/src/main/java/org/apache/ambari/server/utils/StageUtils.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/utils/StageUtils.java 
b/ambari-server/src/main/java/org/apache/ambari/server/utils/StageUtils.java
index 68a45ec..ea6c552 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/utils/StageUtils.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/utils/StageUtils.java
@@ -17,6 +17,7 @@
  */
 package org.apache.ambari.server.utils;
 
+import org.apache.commons.lang.StringUtils;
 import com.google.common.base.Joiner;
 import com.google.gson.Gson;
 import com.google.inject.Inject;
@@ -260,23 +261,25 @@ public class StageUtils {
   portsList.add(currentPingPort == null ? DEFAULT_PING_PORT : 
currentPingPort);
 
   String rackInfo = host.getRackInfo();
-  rackList.add(rackInfo == null ? DEFAULT_RACK : rackInfo );
+  rackList.add(StringUtils.isEmpty(rackInfo) ? DEFAULT_RACK : rackInfo );
 
   String iPv4 = host.getIPv4();
-  ipV4List.add(iPv4 == null ? DEFAULT_IPV4_ADDRESS : iPv4 );
+  ipV4List.add(StringUtils.isEmpty(iPv4) ? DEFAULT_IPV4_ADDRESS : iPv4 );
 }
 
 // add hosts from topology manager
 MapString, CollectionString pendingHostComponents = 
topologyManager.getProjectedTopology();
 for (String hostname : pendingHostComponents.keySet()) {
-  if (! hostsSet.contains(hostname)) {
+  if (!hostsSet.contains(hostname)) {
 hostsSet.add(hostname);
-// this is only set in heartbeat handler and since these hosts haven't 
yet been provisioned, set the default
 portsList.add(DEFAULT_PING_PORT);
+rackList.add(DEFAULT_RACK);
+ipV4List.add(DEFAULT_IPV4_ADDRESS);
   }
 }
 
 ListString hostsList = new ArrayListString(hostsSet);
+MapString, String additionalComponentToClusterInfoKeyMap = new 
HashMapString, String();
 
 // Fill hosts for services
 MapString, SortedSetInteger hostRolesInfo = new HashMapString, 
SortedSetInteger();
@@ -290,8 +293,12 @@ public class StageUtils {
 String componentName = serviceComponent.getName();
 
 String roleName = componentToClusterInfoKeyMap.get(componentName);
+if(null == roleName) {
+  roleName = additionalComponentToClusterInfoKeyMap.get(componentName);
+}
 if (null == roleName  !serviceComponent.isClientComponent()) {
   roleName = componentName.toLowerCase() + _hosts;
+  additionalComponentToClusterInfoKeyMap.put(componentName, roleName);
 }
 
 String decomRoleName = 
decommissionedToClusterInfoKeyMap.get(componentName);
@@ -341,23 +348,41 @@ public class StageUtils {
 
   for (String hostComponent : hostComponents) {
 String roleName = componentToClusterInfoKeyMap.get(hostComponent);
-SortedSetInteger hostsForComponentsHost = 
hostRolesInfo.get(roleName);
-
-if (hostsForComponentsHost == null) {
-  hostsForComponentsHost = new TreeSetInteger();
-  hostRolesInfo.put(roleName, hostsForComponentsHost);
+if (null == roleName) {
+  roleName = additionalComponentToClusterInfoKeyMap.get(hostComponent);
+}
+if (null == roleName) {
+  // even though all mappings are being added, 
componentToClusterInfoKeyMap is
+  // a higher priority lookup
+  for (Service service : cluster.getServices().values()) {
+for (ServiceComponent sc : 
service.getServiceComponents().values()) {
+  if (!sc.isClientComponent()  
sc.getName().equals(hostComponent)) {
+roleName = hostComponent.toLowerCase() + _hosts;
+additionalComponentToClusterInfoKeyMap.put(hostComponent, 
roleName);
+  }
+}
+  }
 }
 
-int hostIndex = hostsList.indexOf(hostname);
- 

ambari git commit: AMBARI-10994. 'Set Recommended Value' action should show up for configs with static-recommended-values (onechiporenko)

2015-05-07 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 524368b4a - e65bad149


AMBARI-10994. 'Set Recommended Value' action should show up for configs with 
static-recommended-values (onechiporenko)


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

Branch: refs/heads/trunk
Commit: e65bad149d6722b788715a32aaec075183d2f3a8
Parents: 524368b
Author: Oleg Nechiporenko onechipore...@apache.org
Authored: Thu May 7 14:44:01 2015 +0300
Committer: Oleg Nechiporenko onechipore...@apache.org
Committed: Thu May 7 14:44:01 2015 +0300

--
 .../controllers/main/service/info/configs.js| 16 ++
 .../common/configs/service_config_category.hbs  |  2 +-
 .../main/service/info/config_test.js| 23 
 3 files changed, 36 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e65bad14/ambari-web/app/controllers/main/service/info/configs.js
--
diff --git a/ambari-web/app/controllers/main/service/info/configs.js 
b/ambari-web/app/controllers/main/service/info/configs.js
index 9513b9a..293bba7 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -405,7 +405,7 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
* if property defined in stack but somehow it missed from cluster 
properties (can be after stack upgrade)
* ui should add this properties to step configs
*/
-  configs = self.addMissedPropertiesFromStack(configs);
+  configs = self.mergeWithStackProperties(configs);
 
   //put properties from capacity-scheduler.xml into one config with 
textarea view
   if (self.get('content.serviceName') === 'YARN') {
@@ -430,13 +430,20 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
   /**
* adds properties form stack that doesn't belong to cluster
* to step configs
+   * also set recommended value if isn't exists
*
* @return {App.ServiceConfigProperty[]}
-   * @method addMissedPropertiesFromStack
+   * @method mergeWithStackProperties
*/
-  addMissedPropertiesFromStack: function(configs) {
+  mergeWithStackProperties: function(configs) {
 this.get('advancedConfigs').forEach(function(advanced) {
-  if (!configs.someProperty('name', advanced.get('name'))) {
+  var c = configs.findProperty('name', advanced.get('name'));
+  if (c) {
+if (!c.get('recommendedValue')) {
+  c.set('recommendedValue', advanced.get('value'));
+}
+  }
+  else {
 configs.pushObject(App.ServiceConfigProperty.create({
   name: advanced.get('name'),
   displayName: advanced.get('displayName'),
@@ -445,6 +452,7 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
   filename: advanced.get('fileName'),
   isUserProperty: false,
   isNotSaved: true,
+  recommendedValue: advanced.get('value'),
   isFinal: advanced.get('isFinal'),
   defaultIsFinal: advanced.get('defaultIsFinal'),
   serviceName: advanced.get('serviceName'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/e65bad14/ambari-web/app/templates/common/configs/service_config_category.hbs
--
diff --git 
a/ambari-web/app/templates/common/configs/service_config_category.hbs 
b/ambari-web/app/templates/common/configs/service_config_category.hbs
index b58a644..e879871 100644
--- a/ambari-web/app/templates/common/configs/service_config_category.hbs
+++ b/ambari-web/app/templates/common/configs/service_config_category.hbs
@@ -120,7 +120,7 @@
 a class=btn btn-small href=# data-toggle=tooltip
   {{action setRecommendedValue this target=view}}
   {{translateAttr 
data-original-title=services.service.config.setRecommendedValue}}
-  i class=icon-arrow-down text-info/i
+  i class=icon-repeat/i
 /a
   {{/if}}
 {{/if}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/e65bad14/ambari-web/test/controllers/main/service/info/config_test.js
--
diff --git a/ambari-web/test/controllers/main/service/info/config_test.js 
b/ambari-web/test/controllers/main/service/info/config_test.js
index 7bed552..de0e618 100644
--- a/ambari-web/test/controllers/main/service/info/config_test.js
+++ 

ambari git commit: AMBARI-10976 - HDP-2.2 To HDP-2.3 Upgrade Pre-Upgrade Checks (jonathanhurley)

2015-05-07 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/trunk e65bad149 - f4725228e


AMBARI-10976 - HDP-2.2 To HDP-2.3 Upgrade Pre-Upgrade Checks (jonathanhurley)


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

Branch: refs/heads/trunk
Commit: f4725228e79416712986d0c2de1cb251c47e80b0
Parents: e65bad1
Author: Jonathan Hurley jhur...@hortonworks.com
Authored: Wed May 6 20:47:46 2015 -0400
Committer: Jonathan Hurley jhur...@hortonworks.com
Committed: Thu May 7 08:12:02 2015 -0400

--
 .../server/checks/AbstractCheckDescriptor.java  |  37 -
 .../ambari/server/checks/CheckDescription.java  |  38 -
 .../server/checks/ClientRetryPropertyCheck.java | 116 +
 .../server/checks/ConfigurationMergeCheck.java  |   3 +
 .../HiveDynamicServiceDiscoveryCheck.java   | 102 
 .../server/checks/HostsHeartbeatCheck.java  |   4 +
 .../checks/HostsMasterMaintenanceCheck.java |   4 +
 .../checks/HostsRepositoryVersionCheck.java |   4 +
 .../checks/SecondaryNamenodeDeletedCheck.java   |   3 +
 .../checks/ServicesDecommissionCheck.java   |   3 +
 .../checks/ServicesMaintenanceModeCheck.java|   4 +
 .../ServicesMapReduceDistributedCacheCheck.java |   4 +
 .../ServicesNamenodeHighAvailabilityCheck.java  |   4 +
 .../ServicesTezDistributedCacheCheck.java   |   4 +
 .../ambari/server/checks/ServicesUpCheck.java   |   4 +
 .../checks/ServicesYarnWorkPreservingCheck.java |  26 +--
 .../ambari/server/checks/UpgradeCheck.java  |  58 +++
 .../ambari/server/checks/UpgradeCheckGroup.java |  83 ++
 .../server/checks/UpgradeCheckRegistry.java | 113 +
 .../checks/YarnRMHighAvailabilityCheck.java |  80 +
 .../YarnTimelineServerStatePreservingCheck.java |  94 +++
 .../server/controller/ControllerModule.java |  54 +-
 .../PreUpgradeCheckResourceProvider.java|  74 +
 .../apache/ambari/server/state/CheckHelper.java |  31 ++--
 .../checks/ClientRetryPropertyCheckTest.java| 164 +++
 .../server/checks/UpgradeCheckOrderTest.java| 103 
 ...nTimelineServerStatePreservingCheckTest.java | 127 ++
 .../ambari/server/state/CheckHelperTest.java|  15 +-
 28 files changed, 1246 insertions(+), 110 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f4725228/ambari-server/src/main/java/org/apache/ambari/server/checks/AbstractCheckDescriptor.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/AbstractCheckDescriptor.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/AbstractCheckDescriptor.java
index 1816ce8..8cabf29 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/AbstractCheckDescriptor.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/AbstractCheckDescriptor.java
@@ -28,6 +28,8 @@ import org.apache.ambari.server.orm.dao.HostVersionDAO;
 import org.apache.ambari.server.orm.dao.RepositoryVersionDAO;
 import org.apache.ambari.server.state.Cluster;
 import org.apache.ambari.server.state.Clusters;
+import org.apache.ambari.server.state.Config;
+import org.apache.ambari.server.state.DesiredConfig;
 import org.apache.ambari.server.state.ServiceInfo;
 import org.apache.ambari.server.state.StackId;
 import org.apache.ambari.server.state.stack.PrereqCheckType;
@@ -46,8 +48,8 @@ import com.google.inject.Provider;
 public abstract class AbstractCheckDescriptor {
 
   private static final Logger LOG = 
LoggerFactory.getLogger(AbstractCheckDescriptor.class);
-  private static final StackId STACK_HDP_22 = new StackId(HDP, 2.2);
-  private static final StackId STACK_HDP_23 = new StackId(HDP, 2.3);
+  protected static final StackId STACK_HDP_22 = new StackId(HDP, 2.2);
+  protected static final StackId STACK_HDP_23 = new StackId(HDP, 2.3);
 
   protected static final String DEFAULT = default;
 
@@ -178,6 +180,37 @@ public abstract class AbstractCheckDescriptor {
   }
 
   /**
+   * Gets a cluster configuration property if it exists, or {@code null}
+   * otherwise.
+   *
+   * @param request
+   *  the request (not {@code null}).
+   * @param configType
+   *  the configuration type, such as {@code hdfs-site} (not
+   *  {@code null}).
+   * @param propertyName
+   *  the name of the property (not {@code null}).
+   * @return the property value or {@code null} if not found.
+   * @throws AmbariException
+   */
+  protected String getProperty(PrereqCheckRequest request, String configType, 
String propertyName)
+  throws AmbariException {
+

ambari git commit: AMBARI-10981. Upgrade Framework Must Be Able To Have Configuration Properties Renamed (ncole)

2015-05-07 Thread ncole
Repository: ambari
Updated Branches:
  refs/heads/trunk ac1ba0e4f - 524368b4a


AMBARI-10981. Upgrade Framework Must Be Able To Have Configuration Properties 
Renamed (ncole)


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

Branch: refs/heads/trunk
Commit: 524368b4a1ba8297a1462a8f98c65653c0a527ad
Parents: ac1ba0e
Author: Nate Cole nc...@hortonworks.com
Authored: Wed May 6 17:27:15 2015 -0400
Committer: Nate Cole nc...@hortonworks.com
Committed: Thu May 7 07:05:23 2015 -0400

--
 .../internal/UpgradeResourceProvider.java   |  20 ++-
 .../serveraction/upgrades/ConfigureAction.java  | 166 ---
 .../state/stack/upgrade/ConfigureTask.java  |  77 +
 .../state/stack/upgrade/TransferOperation.java  |  40 +
 .../stacks/HDP/2.2/upgrades/upgrade-2.3.xml |   5 +
 .../upgrades/ConfigureActionTest.java   | 112 -
 .../server/state/stack/UpgradePackTest.java |  45 +
 .../stacks/HDP/2.1.1/upgrades/upgrade_test.xml  |   9 +
 8 files changed, 446 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/524368b4/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
index 99535c2..bdb2784 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
@@ -98,6 +98,7 @@ import org.apache.commons.lang.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.google.gson.Gson;
 import com.google.inject.Inject;
 import com.google.inject.Provider;
 
@@ -190,6 +191,8 @@ public class UpgradeResourceProvider extends 
AbstractControllerResourceProvider
   @Inject
   private static HostDAO s_hostDAO = null;
 
+  private static Gson s_gson = new Gson();
+
 
   /**
* Used to generated the correct tasks and stages during an upgrade.
@@ -1015,14 +1018,16 @@ public class UpgradeResourceProvider extends 
AbstractControllerResourceProvider
   case CONFIGURE: {
 ConfigureTask ct = (ConfigureTask) task;
 MapString, String configProperties = 
ct.getConfigurationProperties(cluster);
+ListConfigureTask.Transfer transfers = ct.getTransfers();
 
 // if the properties are empty it means that the conditions in the
 // task did not pass;
-if (configProperties.isEmpty()) {
+if (configProperties.isEmpty()  transfers.isEmpty()) {
   stageText = No conditions were met for this configuration task.;
   itemDetail = stageText;
 } else {
   commandParams.putAll(configProperties);
+  commandParams.put(ConfigureTask.PARAMETER_TRANSFERS, 
s_gson.toJson(transfers));
 
   // extract the config type, key and value to use to build the
   // summary and detail
@@ -1030,8 +1035,17 @@ public class UpgradeResourceProvider extends 
AbstractControllerResourceProvider
   String key = configProperties.get(ConfigureTask.PARAMETER_KEY);
   String value = configProperties.get(ConfigureTask.PARAMETER_VALUE);
 
-  itemDetail = String.format(Updating config %s/%s to %s, configType,
-  key, value);
+  StringBuilder detail = new StringBuilder(String.format(Updating 
config %s, configType));
+
+  if (null != key  null != value) {
+detail.append(String.format(/%s to %s, key, value));
+  }
+
+  if (!transfers.isEmpty()) {
+detail.append(String.format(; transferring %d properties, 
transfers.size()));
+  }
+
+  itemDetail = detail.toString();
 
   if (null != ct.summary) {
 stageText = ct.summary;

http://git-wip-us.apache.org/repos/asf/ambari/blob/524368b4/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java
index df9d7be..a812169 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java
+++ 

ambari git commit: AMBARI-10993 Graph widgets should show n/a (or something appropriate) when graph data is not available. (atkach)

2015-05-07 Thread atkach
Repository: ambari
Updated Branches:
  refs/heads/trunk f4725228e - 57759d049


AMBARI-10993 Graph widgets should show n/a (or something appropriate) when 
graph data is not available. (atkach)


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

Branch: refs/heads/trunk
Commit: 57759d049e8f2427e13777f482bb204548f7bd20
Parents: f472522
Author: Andrii Tkach atk...@hortonworks.com
Authored: Thu May 7 14:37:01 2015 +0300
Committer: Andrii Tkach atk...@hortonworks.com
Committed: Thu May 7 15:59:03 2015 +0300

--
 ambari-web/app/styles/enhanced_service_dashboard.less | 5 +
 ambari-web/app/views/common/chart/linear_time.js  | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/57759d04/ambari-web/app/styles/enhanced_service_dashboard.less
--
diff --git a/ambari-web/app/styles/enhanced_service_dashboard.less 
b/ambari-web/app/styles/enhanced_service_dashboard.less
index 854e5a2..464f4df 100644
--- a/ambari-web/app/styles/enhanced_service_dashboard.less
+++ b/ambari-web/app/styles/enhanced_service_dashboard.less
@@ -122,6 +122,11 @@
   text-align: left;
   z-index: 3;
 }
+.alert {
+  font-size: 12px;
+  padding: 4px;
+  font-weight: normal;
+}
   }
 }
 .gauge-widget {

http://git-wip-us.apache.org/repos/asf/ambari/blob/57759d04/ambari-web/app/views/common/chart/linear_time.js
--
diff --git a/ambari-web/app/views/common/chart/linear_time.js 
b/ambari-web/app/views/common/chart/linear_time.js
index 25a0ff8..35e2a33 100644
--- a/ambari-web/app/views/common/chart/linear_time.js
+++ b/ambari-web/app/views/common/chart/linear_time.js
@@ -209,7 +209,7 @@ App.ChartLinearTimeView = Ember.View.extend({
* @type: Function
*/
   _showMessage: function(type, title, message) {
-var chartOverlay = '#' + this.id;
+var chartOverlay = '#' + this.get('id');
 var chartOverlayId = chartOverlay + '-chart';
 var chartOverlayY = chartOverlay + '-yaxis';
 var chartOverlayX = chartOverlay + '-xaxis';



ambari git commit: AMBARI-10752 Update Accumulo config defaults and ambari-web site properties (billie)

2015-05-07 Thread billie
Repository: ambari
Updated Branches:
  refs/heads/trunk 41f54cc01 - 1b66baac0


AMBARI-10752 Update Accumulo config defaults and ambari-web site properties 
(billie)


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

Branch: refs/heads/trunk
Commit: 1b66baac0ee85e7cec472db845937f20ec7203ed
Parents: 41f54cc
Author: Billie Rinaldi billie.rina...@gmail.com
Authored: Wed Apr 29 11:10:36 2015 -0700
Committer: Billie Rinaldi billie.rina...@gmail.com
Committed: Thu May 7 18:38:05 2015 -0700

--
 .../apache/ambari/server/utils/StageUtils.java  |   5 +
 .../1.6.1.2.2.0/configuration/accumulo-env.xml  |  49 ++--
 .../1.6.1.2.2.0/configuration/accumulo-site.xml |  55 ++--
 .../ACCUMULO/1.6.1.2.2.0/metainfo.xml   |   1 +
 .../ACCUMULO/1.6.1.2.2.0/package/files/gc   |  16 --
 .../ACCUMULO/1.6.1.2.2.0/package/files/masters  |  16 --
 .../ACCUMULO/1.6.1.2.2.0/package/files/monitor  |  16 --
 .../ACCUMULO/1.6.1.2.2.0/package/files/slaves   |  16 --
 .../ACCUMULO/1.6.1.2.2.0/package/files/tracers  |  16 --
 .../package/scripts/accumulo_configuration.py   |  14 +-
 .../package/scripts/accumulo_service.py |  10 +
 .../1.6.1.2.2.0/package/scripts/params.py   |  20 +-
 .../1.6.1.2.2.0/package/templates/gc.j2 |  20 ++
 .../1.6.1.2.2.0/package/templates/masters.j2|  20 ++
 .../1.6.1.2.2.0/package/templates/monitor.j2|  20 ++
 .../1.6.1.2.2.0/package/templates/slaves.j2 |  20 ++
 .../1.6.1.2.2.0/package/templates/tracers.j2|  20 ++
 .../src/main/resources/role_command_order.json  |   4 +-
 .../stacks/HDP/2.2/role_command_order.json  |   4 +-
 .../app/controllers/wizard/step8_controller.js  |   2 +-
 ambari-web/app/data/HDP2/site_properties.js | 263 +++
 ambari-web/app/models/stack_service.js  |   5 +
 22 files changed, 466 insertions(+), 146 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1b66baac/ambari-server/src/main/java/org/apache/ambari/server/utils/StageUtils.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/utils/StageUtils.java 
b/ambari-server/src/main/java/org/apache/ambari/server/utils/StageUtils.java
index ea6c552..66612bd 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/utils/StageUtils.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/utils/StageUtils.java
@@ -151,6 +151,11 @@ public class StageUtils {
 componentToClusterInfoKeyMap.put(HBASE_REGIONSERVER, hbase_rs_hosts);
 componentToClusterInfoKeyMap.put(KERBEROS_SERVER, kdc_host);
 componentToClusterInfoKeyMap.put(KERBEROS_ADMIN_CLIENT, 
kerberos_adminclient_host);
+componentToClusterInfoKeyMap.put(ACCUMULO_MASTER, 
accumulo_master_hosts);
+componentToClusterInfoKeyMap.put(ACCUMULO_MONITOR, 
accumulo_monitor_hosts);
+componentToClusterInfoKeyMap.put(ACCUMULO_GC, accumulo_gc_hosts);
+componentToClusterInfoKeyMap.put(ACCUMULO_TRACER, 
accumulo_tracer_hosts);
+componentToClusterInfoKeyMap.put(ACCUMULO_TSERVER, 
accumulo_tserver_hosts);
   }
 
   static {

http://git-wip-us.apache.org/repos/asf/ambari/blob/1b66baac/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/configuration/accumulo-env.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/configuration/accumulo-env.xml
 
b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/configuration/accumulo-env.xml
index dfec771..ea895e4 100644
--- 
a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/configuration/accumulo-env.xml
+++ 
b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/configuration/accumulo-env.xml
@@ -64,32 +64,32 @@
 nameaccumulo_user/name
 valueaccumulo/value
 property-typeUSER/property-type
-descriptionAccumulo User Name./description
+descriptionUser for running Accumulo server processes./description
   /property
   property
-namemaster_heapsize/name
-value128m/value
+nameaccumulo_master_heapsize/name
+value1024/value
 descriptionAccumulo Master Heap Size./description
   /property
   property
-nametserver_heapsize/name
-value256m/value
+nameaccumulo_tserver_heapsize/name
+value1024/value
 descriptionAccumulo Tablet Server Heap Size./description
   /property
   property
-namemonitor_heapsize/name
-value64m/value
+nameaccumulo_monitor_heapsize/name
+value1024/value
 descriptionAccumulo Monitor Heap Size./description
   /property
   property
-

ambari git commit: AMBARI-11006 - YARN Upgrade Pack For HDP-2.2 To HDP-2.3 (jonathanhurley)

2015-05-07 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/trunk 1b66baac0 - 8c3d2acd4


AMBARI-11006 - YARN Upgrade Pack For HDP-2.2 To HDP-2.3 (jonathanhurley)


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

Branch: refs/heads/trunk
Commit: 8c3d2acd445dde75f0c6af7f13ef874aa071603d
Parents: 1b66baa
Author: Jonathan Hurley jhur...@hortonworks.com
Authored: Thu May 7 22:44:50 2015 -0400
Committer: Jonathan Hurley jhur...@hortonworks.com
Committed: Thu May 7 23:48:37 2015 -0400

--
 .../serveraction/upgrades/ConfigureAction.java  | 30 ++
 .../state/stack/upgrade/ConfigureTask.java  |  3 ++
 .../stacks/HDP/2.2/upgrades/upgrade-2.3.xml | 43 +++-
 .../GLUSTERFS/configuration/hadoop-env.xml  |  2 +-
 .../HIVE/configuration/webhcat-site.xml |  2 +-
 .../services/HDFS/configuration/hadoop-env.xml  |  4 +-
 .../ranger-yarn-plugin-properties.xml   |  4 +-
 .../upgrades/ConfigureActionTest.java   | 22 ++
 8 files changed, 95 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8c3d2acd/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java
index a812169..c064ac4 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java
@@ -42,6 +42,7 @@ import 
org.apache.ambari.server.state.ConfigMergeHelper.ThreeWayValue;
 import org.apache.ambari.server.state.DesiredConfig;
 import org.apache.ambari.server.state.StackId;
 import org.apache.ambari.server.state.stack.upgrade.ConfigureTask;
+import org.apache.commons.lang.StringUtils;
 
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
@@ -186,9 +187,17 @@ public class ConfigureAction extends AbstractServerAction {
 for (ConfigureTask.Transfer transfer : transfers) {
   switch (transfer.operation) {
 case COPY:
-  if (null == transfer.fromType  base.containsKey(transfer.fromKey)) 
{
-newValues.put(transfer.toKey, base.get(transfer.fromKey));
-changedValues = true;
+  // if copying from the current configuration type, then first
+  // determine if the key already exists; if it does not, then set a
+  // default if a default exists
+  if (null == transfer.fromType) {
+if (base.containsKey(transfer.fromKey)) {
+  newValues.put(transfer.toKey, base.get(transfer.fromKey));
+  changedValues = true;
+} else if (StringUtils.isNotBlank(transfer.defaultValue)) {
+  newValues.put(transfer.toKey, transfer.defaultValue);
+  changedValues = true;
+}
   } else {
 // !!! copying from another configuration
 Config other = cluster.getDesiredConfigByType(transfer.fromType);
@@ -199,14 +208,23 @@ public class ConfigureAction extends AbstractServerAction 
{
   if (otherValues.containsKey(transfer.fromKey)) {
 newValues.put(transfer.toKey, 
otherValues.get(transfer.fromKey));
 changedValues = true;
+  } else if (StringUtils.isNotBlank(transfer.defaultValue)) {
+newValues.put(transfer.toKey, transfer.defaultValue);
+changedValues = true;
   }
 }
   }
   break;
 case MOVE:
+  // if the value existed previously, then update the maps with the new
+  // key; otherwise if there is a default value specified, set the new
+  // key with the default
   if (newValues.containsKey(transfer.fromKey)) {
 newValues.put(transfer.toKey, newValues.remove(transfer.fromKey));
 changedValues = true;
+  } else if (StringUtils.isNotBlank(transfer.defaultValue)) {
+newValues.put(transfer.toKey, transfer.defaultValue);
+changedValues = true;
   }
 
   break;
@@ -261,9 +279,7 @@ public class ConfigureAction extends AbstractServerAction {
   config.persist(false);
 
   return createCommandReport(0, HostRoleStatus.COMPLETED, {},
-  MessageFormat.format(Updated ''{0}'' with ''{1}={2}'',
-  configType, key, value),
-  );
+  

ambari git commit: AMBARI-10995. Not correct behavior of hosts combobox on Assign Masters page. (akovalenko)

2015-05-07 Thread akovalenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 57759d049 - 629d8cd5c


AMBARI-10995. Not correct behavior of hosts combobox on Assign Masters page. 
(akovalenko)


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

Branch: refs/heads/trunk
Commit: 629d8cd5c496d6bb600994e93aa4fccbf3f2f7f1
Parents: 57759d0
Author: Aleksandr Kovalenko akovale...@hortonworks.com
Authored: Thu May 7 15:29:56 2015 +0300
Committer: Aleksandr Kovalenko akovale...@hortonworks.com
Committed: Thu May 7 16:42:50 2015 +0300

--
 ambari-web/app/views/common/assign_master_components_view.js | 6 +++---
 ambari-web/test/views/wizard/step5_view_test.js  | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/629d8cd5/ambari-web/app/views/common/assign_master_components_view.js
--
diff --git a/ambari-web/app/views/common/assign_master_components_view.js 
b/ambari-web/app/views/common/assign_master_components_view.js
index 46558df..f8f41ac 100644
--- a/ambari-web/app/views/common/assign_master_components_view.js
+++ b/ambari-web/app/views/common/assign_master_components_view.js
@@ -137,10 +137,10 @@ App.SelectHostView = Em.Select.extend(App.SelectHost, {
   }.observes('controller.hostNameCheckTrigger'),
 
   /**
-   * On click handler
-   * @method click
+   * On change DOM event handler
+   * @method change
*/
-  click: function () {
+  change: function () {
 this.initContent();
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/629d8cd5/ambari-web/test/views/wizard/step5_view_test.js
--
diff --git a/ambari-web/test/views/wizard/step5_view_test.js 
b/ambari-web/test/views/wizard/step5_view_test.js
index 89789a9..625eb22 100644
--- a/ambari-web/test/views/wizard/step5_view_test.js
+++ b/ambari-web/test/views/wizard/step5_view_test.js
@@ -62,7 +62,7 @@ describe('App.SelectHostView', function() {
 });
   });
 
-  describe('#click', function() {
+  describe('#change', function() {
 
 beforeEach(function() {
   sinon.stub(view, 'initContent', Em.K);
@@ -75,7 +75,7 @@ describe('App.SelectHostView', function() {
 });
 
 it('should call initContent', function() {
-  view.click();
+  view.change();
   expect(view.initContent.calledOnce).to.be.true;
 });
   });



ambari git commit: AMBARI-11000. Can not start ambari-server after Ambari only upgrade to 2.0.1. (mpapirkovskyy)

2015-05-07 Thread mpapirkovskyy
Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.maint 7ec541a8c - 87fd33c17


AMBARI-11000. Can not start ambari-server after Ambari only upgrade to 2.0.1. 
(mpapirkovskyy)


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

Branch: refs/heads/branch-2.0.maint
Commit: 87fd33c174624a8f38bfc53906c11312f0bc8543
Parents: 7ec541a
Author: Myroslav Papirkovskyy mpapyrkovs...@hortonworks.com
Authored: Thu May 7 21:13:13 2015 +0300
Committer: Myroslav Papirkovskyy mpapyrkovs...@hortonworks.com
Committed: Thu May 7 23:36:00 2015 +0300

--
 .../java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java   | 2 +-
 .../org/apache/ambari/server/upgrade/UpgradeCatalog200Test.java| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/87fd33c1/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java
index e23f459..dd6d6dd 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java
@@ -92,7 +92,7 @@ public class UpgradeCatalog200 extends AbstractUpgradeCatalog 
{
*/
   @Override
   public String getTargetVersion() {
-return 2.0.0;
+return 2.0.1;
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/87fd33c1/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog200Test.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog200Test.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog200Test.java
index cb318c1..76552bc 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog200Test.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog200Test.java
@@ -726,7 +726,7 @@ public class UpgradeCatalog200Test {
 final DBAccessor dbAccessor = createNiceMock(DBAccessor.class);
 UpgradeCatalog upgradeCatalog = getUpgradeCatalog(dbAccessor);
 
-Assert.assertEquals(2.0.0, upgradeCatalog.getTargetVersion());
+Assert.assertEquals(2.0.1, upgradeCatalog.getTargetVersion());
   }
 
   private void setViewInstancePropertyExpectations(DBAccessor dbAccessor,



ambari git commit: AMBARI-11007. Time range control not showing for non-enhanced dashboard services. (jaimin)

2015-05-07 Thread jaimin
Repository: ambari
Updated Branches:
  refs/heads/trunk 0f6ca9210 - afb8b3b71


AMBARI-11007. Time range control not showing for non-enhanced dashboard 
services. (jaimin)


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

Branch: refs/heads/trunk
Commit: afb8b3b71ac6db4c045acfe7e3c8c3c8ec8689b3
Parents: 0f6ca92
Author: Jaimin Jetly jai...@hortonworks.com
Authored: Thu May 7 15:48:43 2015 -0700
Committer: Jaimin Jetly jai...@hortonworks.com
Committed: Thu May 7 15:48:43 2015 -0700

--
 ambari-web/app/controllers/main/service/info/summary.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/afb8b3b7/ambari-web/app/controllers/main/service/info/summary.js
--
diff --git a/ambari-web/app/controllers/main/service/info/summary.js 
b/ambari-web/app/controllers/main/service/info/summary.js
index f29712a..26a8a4a 100644
--- a/ambari-web/app/controllers/main/service/info/summary.js
+++ b/ambari-web/app/controllers/main/service/info/summary.js
@@ -80,7 +80,7 @@ App.MainServiceInfoSummaryController = 
Em.Controller.extend(App.WidgetSectionMix
* @type {boolean}
*/
   showTimeRangeControl: function () {
-return this.get('isServiceWithEnhancedWidgets')  
this.get('widgets').filterProperty('widgetType', 'GRAPH').length  0;
+return !this.get('isServiceWithEnhancedWidgets') || 
this.get('widgets').filterProperty('widgetType', 'GRAPH').length  0;
   }.property('isServiceWithEnhancedWidgets', 'widgets.length'),
 
   /**



ambari git commit: AMBARI-11003. YARN theme and 'yarn.nodemanager.resource.cpu-vcores' calculation updates (srimanth)

2015-05-07 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/trunk 1d618371a - 0f6ca9210


AMBARI-11003. YARN theme and 'yarn.nodemanager.resource.cpu-vcores' calculation 
updates (srimanth)


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

Branch: refs/heads/trunk
Commit: 0f6ca9210da598d7cdd729c9fdcbc5381f7ef374
Parents: 1d61837
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Thu May 7 13:29:34 2015 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Thu May 7 13:29:47 2015 -0700

--
 .../configuration-mapred/mapred-site.xml|  8 +--
 .../YARN/2.1.0.2.0/configuration/yarn-site.xml  |  6 +-
 .../services/HBASE/configuration/hbase-site.xml |  2 +-
 .../YARN/configuration/capacity-scheduler.xml   |  2 +-
 .../services/YARN/configuration/yarn-env.xml|  2 +-
 .../services/YARN/configuration/yarn-site.xml   | 18 --
 .../2.2/services/YARN/themes-mapred/theme.json  | 34 +++---
 .../HDP/2.2/services/YARN/themes/theme.json | 14 ++--
 .../stacks/HDP/2.2/services/stack_advisor.py| 10 ++-
 .../stacks/2.2/common/test_stack_advisor.py | 67 +++-
 10 files changed, 115 insertions(+), 48 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0f6ca921/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/configuration-mapred/mapred-site.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/configuration-mapred/mapred-site.xml
 
b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/configuration-mapred/mapred-site.xml
index fac891d..ca0a4fe 100644
--- 
a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/configuration-mapred/mapred-site.xml
+++ 
b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/configuration-mapred/mapred-site.xml
@@ -31,7 +31,7 @@
   The total amount of buffer memory to use while sorting files, in 
megabytes.
   By default, gives each merge stream 1MB, which should minimize seeks.
 /description
-display-nameMapReduce Sort Allocation/display-name
+display-nameSort Allocation Memory/display-name
 value-attributes
   typeint/type
   minimum0/minimum
@@ -184,7 +184,7 @@
 namemapreduce.map.memory.mb/name
 value512/value
 descriptionVirtual memory for single Map task/description
-display-nameMR Map RAM Allocation/display-name
+display-nameMap Memory/display-name
 value-attributes
   typeint/type
   minimum512/minimum
@@ -208,7 +208,7 @@
 namemapreduce.reduce.memory.mb/name
 value1024/value
 descriptionVirtual memory for single Reduce task/description
-display-nameMR Reduce RAM Allocation/display-name
+display-nameReduce Memory/display-name
 value-attributes
   typeint/type
   minimum512/minimum
@@ -287,7 +287,7 @@
 nameyarn.app.mapreduce.am.resource.mb/name
 value512/value
 descriptionThe amount of memory the MR AppMaster needs./description
-display-nameMR AppMaster RAM Allocation /display-name
+display-nameAppMaster Memory/display-name
 value-attributes
   typeint/type
   minimum512/minimum

http://git-wip-us.apache.org/repos/asf/ambari/blob/0f6ca921/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/configuration/yarn-site.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/configuration/yarn-site.xml
 
b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/configuration/yarn-site.xml
index 2efddb8..14ab94d 100644
--- 
a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/configuration/yarn-site.xml
+++ 
b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/configuration/yarn-site.xml
@@ -70,7 +70,7 @@
   in MBs. Memory requests lower than this won't take effect,
   and the specified value will get allocated at minimum.
 /description
-display-nameYARN Container Minimum RAM/display-name
+display-nameMinimum Container Size (Memory)/display-name
 value-attributes
   typeint/type
   minimum0/minimum
@@ -94,7 +94,7 @@
   in MBs. Memory requests higher than this won't take effect,
   and will get capped to this value.
 /description
-display-nameYARN Container Maximum RAM/display-name
+display-nameMaximum Container Size (Memory)/display-name
 value-attributes
   typeint/type
   minimum0/minimum
@@ -135,7 +135,7 @@
 value5120/value
 descriptionAmount of physical memory, in MB, that can be allocated
   

ambari git commit: AMBARI-10975. Kerberos: no need for Manage Identities checkbox (rlevas)

2015-05-07 Thread rlevas
Repository: ambari
Updated Branches:
  refs/heads/trunk 90e9e811b - 1f91b67e9


AMBARI-10975. Kerberos: no need for Manage Identities checkbox (rlevas)


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

Branch: refs/heads/trunk
Commit: 1f91b67e9d34fa764278344d972a6774dfa4a9e2
Parents: 90e9e81
Author: Robert Levas rle...@hortonworks.com
Authored: Thu May 7 16:24:15 2015 -0400
Committer: Robert Levas rle...@hortonworks.com
Committed: Thu May 7 16:24:15 2015 -0400

--
 ambari-web/app/data/HDP2/site_properties.js | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1f91b67e/ambari-web/app/data/HDP2/site_properties.js
--
diff --git a/ambari-web/app/data/HDP2/site_properties.js 
b/ambari-web/app/data/HDP2/site_properties.js
index 661e49e..8139957 100644
--- a/ambari-web/app/data/HDP2/site_properties.js
+++ b/ambari-web/app/data/HDP2/site_properties.js
@@ -1973,6 +1973,7 @@ var hdp2properties = [
 name: container_dn,
 displayName: Container DN,
 isVisible: false,
+isOverridable: false,
 serviceName: KERBEROS,
 filename: kerberos-env.xml,
 category: KDC,
@@ -1983,8 +1984,8 @@ var hdp2properties = [
 name: manage_identities,
 displayName: Manage Kerberos Identities,
 displayType: checkbox,
+isVisible: false,
 isOverridable: false,
-isVisible: true,
 serviceName: KERBEROS,
 filename: kerberos-env.xml,
 category: Advanced kerberos-env,
@@ -2166,6 +2167,8 @@ var hdp2properties = [
 name: manage_krb5_conf,
 displayName: Manage Kerberos client krb5.conf,
 displayType: checkbox,
+isOverridable: false,
+isVisible: true,
 dependentConfigPattern: CATEGORY,
 serviceName: KERBEROS,
 filename: krb5-conf.xml,



ambari git commit: AMBARI-10996 Bring back the custom time range control that sets it for all graph widgets shown. (atkach)

2015-05-07 Thread atkach
Repository: ambari
Updated Branches:
  refs/heads/trunk 629d8cd5c - c8030852a


AMBARI-10996 Bring back the custom time range control that sets it for all 
graph widgets shown. (atkach)


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

Branch: refs/heads/trunk
Commit: c8030852a50982144e514deab76e73cb48d0c7fb
Parents: 629d8cd
Author: Andrii Tkach atk...@hortonworks.com
Authored: Thu May 7 16:20:09 2015 +0300
Committer: Andrii Tkach atk...@hortonworks.com
Committed: Thu May 7 18:21:32 2015 +0300

--
 .../controllers/main/service/info/summary.js| 11 +++-
 .../service/widgets/create/step2_controller.js  | 66 +---
 .../service/widgets/create/wizard_controller.js |  9 +--
 .../main/service/widgets/edit_controller.js | 12 +---
 .../app/mixins/common/widgets/widget_mixin.js   |  2 +-
 .../app/mixins/common/widgets/widget_section.js |  3 +-
 ambari-web/app/models/widget.js |  5 --
 ambari-web/app/routes/add_widget.js |  4 +-
 ambari-web/app/routes/main.js   |  1 -
 .../app/templates/main/service/info/summary.hbs |  4 +-
 .../views/common/widget/graph_widget_view.js|  7 ++-
 .../app/views/main/service/info/summary.js  | 43 +
 .../main/service/widgets/create/step2_view.js   |  1 +
 .../widgets/create/step2_controller_test.js | 37 +++
 14 files changed, 109 insertions(+), 96 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c8030852/ambari-web/app/controllers/main/service/info/summary.js
--
diff --git a/ambari-web/app/controllers/main/service/info/summary.js 
b/ambari-web/app/controllers/main/service/info/summary.js
index 3545d92..f29712a 100644
--- a/ambari-web/app/controllers/main/service/info/summary.js
+++ b/ambari-web/app/controllers/main/service/info/summary.js
@@ -77,6 +77,13 @@ App.MainServiceInfoSummaryController = 
Em.Controller.extend(App.WidgetSectionMix
   ],
 
   /**
+   * @type {boolean}
+   */
+  showTimeRangeControl: function () {
+return this.get('isServiceWithEnhancedWidgets')  
this.get('widgets').filterProperty('widgetType', 'GRAPH').length  0;
+  }.property('isServiceWithEnhancedWidgets', 'widgets.length'),
+
+  /**
* Set initial Ranger plugins data
* @method setRangerPlugins
*/
@@ -354,7 +361,7 @@ App.MainServiceInfoSummaryController = 
Em.Controller.extend(App.WidgetSectionMix
* @param {object|null} data
*/
   loadAllSharedWidgetsSuccessCallback: function (data) {
-var widgetIds = this.get('widgets') ? 
this.get('widgets').mapProperty('id'): [];
+var widgetIds = this.get('widgets').mapProperty('id');
 if (data.items[0]  data.items.length) {
   this.set(allSharedWidgets,
 data.items.filter(function (widget) {
@@ -404,7 +411,7 @@ App.MainServiceInfoSummaryController = 
Em.Controller.extend(App.WidgetSectionMix
* @param {object|null} data
*/
   loadMineWidgetsSuccessCallback: function (data) {
-var widgetIds = this.get('widgets') ? 
this.get('widgets').mapProperty('id'): [];
+var widgetIds = this.get('widgets').mapProperty('id');
 if (data.items[0]  data.items.length) {
   this.set(mineWidgets,
 data.items.filter(function (widget) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/c8030852/ambari-web/app/controllers/main/service/widgets/create/step2_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/service/widgets/create/step2_controller.js 
b/ambari-web/app/controllers/main/service/widgets/create/step2_controller.js
index 8dddb08..28a86d5 100644
--- a/ambari-web/app/controllers/main/service/widgets/create/step2_controller.js
+++ b/ambari-web/app/controllers/main/service/widgets/create/step2_controller.js
@@ -236,14 +236,6 @@ App.WidgetWizardStep2Controller = Em.Controller.extend({
 this.set('widgetProperties', this.get('content.widgetProperties'));
 this.set('widgetValues', this.get('content.widgetValues'));
 this.set('widgetMetrics', this.get('content.widgetMetrics'));
-this.set('expressions', this.get('content.expressions').map(function 
(item) {
-  return Em.Object.create(item);
-}, this));
-this.set('dataSets', this.get('content.dataSets').map(function (item) {
-  item.expression = Em.Object.create(item.expression);
-  return Em.Object.create(item);
-}, this));
-this.set('templateValue', this.get('content.templateValue'));
 if (this.get('expressions.length') === 0) {
   this.addExpression(null, true);
 }
@@ -262,6 +254,7 @@ 

ambari git commit: AMBARI-10841. If selinux is disabled via /etc/selinux/config, cluster deployment fails (vbrodetsky via dlysnichenko)

2015-05-07 Thread dmitriusan
Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.maint 0633c7587 - 7ec541a8c


AMBARI-10841. If selinux is disabled via /etc/selinux/config, cluster 
deployment fails (vbrodetsky via dlysnichenko)


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

Branch: refs/heads/branch-2.0.maint
Commit: 7ec541a8ce94199ca398dfd30ae187bcd92b4353
Parents: 0633c75
Author: Lisnichenko Dmitro dlysniche...@hortonworks.com
Authored: Thu May 7 20:09:52 2015 +0300
Committer: Lisnichenko Dmitro dlysniche...@hortonworks.com
Committed: Thu May 7 20:09:52 2015 +0300

--
 .../HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py | 1 +
 .../python/stacks/2.0.6/hooks/before-START/test_before_start.py   | 3 +++
 2 files changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7ec541a8/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py
index b6d2ba2..1814aa8 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py
@@ -29,6 +29,7 @@ def setup_hadoop():
 
   Execute((setenforce,0),
   only_if=test -f /selinux/enforce,
+  not_if=(! which getenforce ) || (which getenforce  getenforce | 
grep -q Disabled),
   sudo=True,
   )
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/7ec541a8/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py
 
b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py
index f606130..b6e0153 100644
--- 
a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py
+++ 
b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py
@@ -34,6 +34,7 @@ class TestHookBeforeStart(RMFTestCase):
 )
 self.assertResourceCalled('Execute', ('setenforce', '0'),
   only_if = 'test -f /selinux/enforce',
+  not_if = (! which getenforce ) || (which 
getenforce  getenforce | grep -q Disabled),
   sudo=True,
   )
 self.assertResourceCalled('Directory', '/var/log/hadoop',
@@ -95,6 +96,7 @@ class TestHookBeforeStart(RMFTestCase):
 )
 self.assertResourceCalled('Execute', ('setenforce', '0'),
   only_if = 'test -f /selinux/enforce',
+  not_if = (! which getenforce ) || (which 
getenforce  getenforce | grep -q Disabled),
   sudo=True,
   )
 self.assertResourceCalled('Directory', '/var/log/hadoop',
@@ -161,6 +163,7 @@ class TestHookBeforeStart(RMFTestCase):
 )
 self.assertResourceCalled('Execute', ('setenforce', '0'),
   only_if = 'test -f /selinux/enforce',
+  not_if = (! which getenforce ) || (which 
getenforce  getenforce | grep -q Disabled),
   sudo=True,
   )
 self.assertResourceCalled('Directory', 
'/usr/lib/hadoop/lib/native/Linux-i386-32',



ambari git commit: AMBARI-10999 No validation errors happening on configs that are dynamically removed and added. (ababiichuk)

2015-05-07 Thread ababiichuk
Repository: ambari
Updated Branches:
  refs/heads/trunk c8030852a - f69b52409


AMBARI-10999 No validation errors happening on configs that are dynamically 
removed and added. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: f69b5240939f61aa336bccf304636f2f5889b216
Parents: c803085
Author: aBabiichuk ababiic...@hortonworks.com
Authored: Thu May 7 19:49:08 2015 +0300
Committer: aBabiichuk ababiic...@hortonworks.com
Committed: Thu May 7 19:49:08 2015 +0300

--
 .../services/HIVE/configuration/hive-site.xml   | 10 +-
 .../controllers/main/service/info/configs.js|  3 +--
 .../app/controllers/wizard/step7_controller.js  |  2 ++
 .../mixins/common/configs/enhanced_configs.js   | 21 ++--
 ambari-web/app/mixins/common/serverValidator.js |  2 +-
 ambari-web/app/views/common/controls_view.js|  4 ++--
 .../configs/widgets/config_widget_view_test.js  |  2 +-
 7 files changed, 23 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f69b5240/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml
index f77977d..2783e1b 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml
@@ -1639,7 +1639,7 @@ limitations under the License.
   /property
   property
 namehive.server2.authentication.ldap.baseDN/name
-value /value
+value/value
 depends-on
   property
 typehive-site/type
@@ -1649,7 +1649,7 @@ limitations under the License.
   /property
   property
 namehive.server2.authentication.kerberos.keytab/name
-value /value
+value/value
 depends-on
   property
 typehive-site/type
@@ -1659,7 +1659,7 @@ limitations under the License.
   /property
   property
 namehive.server2.authentication.kerberos.principal/name
-value /value
+value/value
 depends-on
   property
 typehive-site/type
@@ -1669,7 +1669,7 @@ limitations under the License.
   /property
   property
 namehive.server2.authentication.pam.services/name
-value /value
+value/value
 depends-on
   property
 typehive-site/type
@@ -1679,7 +1679,7 @@ limitations under the License.
   /property
   property
 namehive.server2.custom.authentication.class/name
-value /value
+value/value
 depends-on
   property
 typehive-site/type

http://git-wip-us.apache.org/repos/asf/ambari/blob/f69b5240/ambari-web/app/controllers/main/service/info/configs.js
--
diff --git a/ambari-web/app/controllers/main/service/info/configs.js 
b/ambari-web/app/controllers/main/service/info/configs.js
index 293bba7..318a26c 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -442,8 +442,7 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
 if (!c.get('recommendedValue')) {
   c.set('recommendedValue', advanced.get('value'));
 }
-  }
-  else {
+  } else if (advanced.get('widget')) {
 configs.pushObject(App.ServiceConfigProperty.create({
   name: advanced.get('name'),
   displayName: advanced.get('displayName'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/f69b5240/ambari-web/app/controllers/wizard/step7_controller.js
--
diff --git a/ambari-web/app/controllers/wizard/step7_controller.js 
b/ambari-web/app/controllers/wizard/step7_controller.js
index e019e1d..f2efe68 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -640,6 +640,8 @@ App.WizardStep7Controller = 
Em.Controller.extend(App.ServerValidatorMixin, App.E
 self.addKerberosDescriptorConfigs(configs, 
self.get('wizardController.kerberosDescriptorConfigs') || []);
   }
   self.setStepConfigs(configs, storedConfigs);
+  self.updateDependentConfigs();
+  self.clearDependentConfigs();
   self.checkHostOverrideInstaller();
   self.activateSpecialConfigs();
   self.selectProperService();


ambari git commit: AMBARI-10987. Error loading deferred resources when making metric API requests with null padding. (swagle)

2015-05-07 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/trunk 7b822e42b - 34c1e9b2c


AMBARI-10987. Error loading deferred resources when making metric API requests 
with null padding. (swagle)


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

Branch: refs/heads/trunk
Commit: 34c1e9b2c7726a92d18de68d5b292cb87e564740
Parents: 7b822e4
Author: Siddharth Wagle swa...@hortonworks.com
Authored: Thu May 7 10:34:33 2015 -0700
Committer: Siddharth Wagle swa...@hortonworks.com
Committed: Thu May 7 10:37:50 2015 -0700

--
 .../metrics/timeline/PhoenixHBaseAccessor.java  |  2 +
 .../query/render/MetricsPaddingRenderer.java| 46 +
 .../api/resources/BaseResourceDefinition.java   |  5 ++
 .../MetricsDownsamplingMethodFactory.java   | 14 ++--
 .../metrics/MetricsPropertyProvider.java| 20 --
 .../metrics/MetricsPropertyProviderProxy.java   | 13 
 .../render/MetricsPaddingRendererTest.java  | 69 
 7 files changed, 155 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/34c1e9b2/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java
--
diff --git 
a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java
 
b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java
index e27d9a9..7258cad 100644
--- 
a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java
+++ 
b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java
@@ -309,6 +309,8 @@ public class PhoenixHBaseAccessor {
 clusterDailyTtl));
 
   conn.commit();
+
+  LOG.info(Metrics schema initialized.);
 } catch (SQLException sql) {
   if (sql.getErrorCode() ==
 SQLExceptionCode.SET_UNSUPPORTED_PROP_ON_ALTER_TABLE.getErrorCode()) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/34c1e9b2/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/MetricsPaddingRenderer.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/MetricsPaddingRenderer.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/MetricsPaddingRenderer.java
new file mode 100644
index 000..ff776c7
--- /dev/null
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/MetricsPaddingRenderer.java
@@ -0,0 +1,46 @@
+/**
+ * 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.
+ */
+package org.apache.ambari.server.api.query.render;
+
+import org.apache.ambari.server.api.query.QueryInfo;
+import org.apache.ambari.server.api.util.TreeNode;
+import java.util.Set;
+
+import static 
org.apache.ambari.server.controller.metrics.MetricsPaddingMethod.PADDING_STRATEGY;
+
+public class MetricsPaddingRenderer extends DefaultRenderer {
+  PADDING_STRATEGY paddingMethod = PADDING_STRATEGY.ZEROS;
+
+  public MetricsPaddingRenderer(String paddingMethod) {
+if (paddingMethod.equalsIgnoreCase(null_padding)) {
+  this.paddingMethod = PADDING_STRATEGY.NULLS;
+} else if (paddingMethod.equalsIgnoreCase(no_padding)) {
+  this.paddingMethod = PADDING_STRATEGY.NONE;
+}
+  }
+
+  @Override
+  public TreeNodeSetString finalizeProperties(TreeNodeQueryInfo 
queryProperties,
+  boolean isCollection) {
+SetString properties =