ambari git commit: AMBARI-18557. Create Component to Repo Version db associations (ncole)
Repository: ambari Updated Branches: refs/heads/branch-2.5 48fcbb886 -> eb982a0eb AMBARI-18557. Create Component to Repo Version db associations (ncole) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/eb982a0e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/eb982a0e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/eb982a0e Branch: refs/heads/branch-2.5 Commit: eb982a0eb3232669360d81fc7429ddec81a91719 Parents: 48fcbb8 Author: Nate ColeAuthored: Thu Oct 13 18:00:12 2016 -0400 Committer: Nate Cole Committed: Thu Oct 13 18:00:40 2016 -0400 -- .../AmbariManagementControllerImpl.java | 4 +- .../dao/ServiceComponentDesiredStateDAO.java| 23 ++- .../ServiceComponentDesiredStateEntity.java | 24 +++ .../entities/ServiceComponentVersionEntity.java | 159 +++ .../apache/ambari/server/stack/RepoUtil.java| 3 +- .../state/repository/VersionDefinitionXml.java | 4 +- .../server/upgrade/UpgradeCatalog250.java | 40 + .../main/resources/Ambari-DDL-Derby-CREATE.sql | 15 +- .../main/resources/Ambari-DDL-MySQL-CREATE.sql | 14 +- .../main/resources/Ambari-DDL-Oracle-CREATE.sql | 12 ++ .../resources/Ambari-DDL-Postgres-CREATE.sql| 14 +- .../resources/Ambari-DDL-SQLAnywhere-CREATE.sql | 12 ++ .../resources/Ambari-DDL-SQLServer-CREATE.sql | 14 +- .../src/main/resources/META-INF/persistence.xml | 1 + .../server/state/ServiceComponentTest.java | 140 ++-- .../server/upgrade/UpgradeCatalog250Test.java | 111 ++--- 16 files changed, 546 insertions(+), 44 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/eb982a0e/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java index cd02223..873462f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java @@ -201,6 +201,7 @@ import org.slf4j.LoggerFactory; import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; import com.google.common.collect.ArrayListMultimap; +import com.google.common.collect.ListMultimap; import com.google.common.collect.Multimap; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; @@ -208,7 +209,6 @@ import com.google.inject.Inject; import com.google.inject.Injector; import com.google.inject.Singleton; import com.google.inject.persist.Transactional; -import com.google.common.collect.ListMultimap; @Singleton public class AmbariManagementControllerImpl implements AmbariManagementController { @@ -2333,7 +2333,7 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle execCmd.setAvailableServicesFromServiceInfoMap(ambariMetaInfo.getServices(stackId.getStackName(), stackId.getStackVersion())); if ((execCmd != null) && (execCmd.getConfigurationTags().containsKey("cluster-env"))) { - LOG.info("AmbariManagementControllerImpl.createHostAction: created ExecutionCommand for host {}, role {}, roleCommand {}, and command ID {}, with cluster-env tags {}", + LOG.debug("AmbariManagementControllerImpl.createHostAction: created ExecutionCommand for host {}, role {}, roleCommand {}, and command ID {}, with cluster-env tags {}", execCmd.getHostname(), execCmd.getRole(), execCmd.getRoleCommand(), execCmd.getCommandId(), execCmd.getConfigurationTags().get("cluster-env").get("tag")); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/eb982a0e/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceComponentDesiredStateDAO.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceComponentDesiredStateDAO.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceComponentDesiredStateDAO.java index cdaa6f0..987e44f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceComponentDesiredStateDAO.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceComponentDesiredStateDAO.java @@ -28,6 +28,7 @@ import javax.persistence.TypedQuery; import org.apache.ambari.server.orm.RequiresSession; import org.apache.ambari.server.orm.entities.ServiceComponentDesiredStateEntity; import
ambari git commit: AMBARI-18557. Create Component to Repo Version db associations (ncole)
Repository: ambari Updated Branches: refs/heads/trunk 4140cc78a -> 2b35c980c AMBARI-18557. Create Component to Repo Version db associations (ncole) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2b35c980 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2b35c980 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2b35c980 Branch: refs/heads/trunk Commit: 2b35c980c187b0b211c1b6cf875bc800a35b491a Parents: 4140cc7 Author: Nate ColeAuthored: Fri Oct 7 15:13:00 2016 -0400 Committer: Nate Cole Committed: Thu Oct 13 17:11:31 2016 -0400 -- .../AmbariManagementControllerImpl.java | 4 +- .../dao/ServiceComponentDesiredStateDAO.java| 23 ++- .../ServiceComponentDesiredStateEntity.java | 24 +++ .../entities/ServiceComponentVersionEntity.java | 159 +++ .../apache/ambari/server/stack/RepoUtil.java| 3 +- .../state/repository/VersionDefinitionXml.java | 4 +- .../server/upgrade/UpgradeCatalog250.java | 37 + .../server/upgrade/UpgradeCatalog300.java | 1 - .../main/resources/Ambari-DDL-Derby-CREATE.sql | 15 +- .../main/resources/Ambari-DDL-MySQL-CREATE.sql | 14 +- .../main/resources/Ambari-DDL-Oracle-CREATE.sql | 12 ++ .../resources/Ambari-DDL-Postgres-CREATE.sql| 14 +- .../resources/Ambari-DDL-SQLAnywhere-CREATE.sql | 12 ++ .../resources/Ambari-DDL-SQLServer-CREATE.sql | 14 +- .../src/main/resources/META-INF/persistence.xml | 1 + .../server/state/ServiceComponentTest.java | 140 ++-- .../server/upgrade/UpgradeCatalog250Test.java | 111 ++--- .../server/upgrade/UpgradeCatalog300Test.java | 2 - 18 files changed, 543 insertions(+), 47 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2b35c980/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java index ef4fc33..5d8f279 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java @@ -202,6 +202,7 @@ import org.slf4j.LoggerFactory; import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; import com.google.common.collect.ArrayListMultimap; +import com.google.common.collect.ListMultimap; import com.google.common.collect.Multimap; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; @@ -209,7 +210,6 @@ import com.google.inject.Inject; import com.google.inject.Injector; import com.google.inject.Singleton; import com.google.inject.persist.Transactional; -import com.google.common.collect.ListMultimap; @Singleton public class AmbariManagementControllerImpl implements AmbariManagementController { @@ -2355,7 +2355,7 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle execCmd.setAvailableServicesFromServiceInfoMap(ambariMetaInfo.getServices(stackId.getStackName(), stackId.getStackVersion())); if ((execCmd != null) && (execCmd.getConfigurationTags().containsKey("cluster-env"))) { - LOG.info("AmbariManagementControllerImpl.createHostAction: created ExecutionCommand for host {}, role {}, roleCommand {}, and command ID {}, with cluster-env tags {}", + LOG.debug("AmbariManagementControllerImpl.createHostAction: created ExecutionCommand for host {}, role {}, roleCommand {}, and command ID {}, with cluster-env tags {}", execCmd.getHostname(), execCmd.getRole(), execCmd.getRoleCommand(), execCmd.getCommandId(), execCmd.getConfigurationTags().get("cluster-env").get("tag")); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/2b35c980/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceComponentDesiredStateDAO.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceComponentDesiredStateDAO.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceComponentDesiredStateDAO.java index cdaa6f0..987e44f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceComponentDesiredStateDAO.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceComponentDesiredStateDAO.java @@ -28,6 +28,7 @@ import javax.persistence.TypedQuery; import org.apache.ambari.server.orm.RequiresSession;
ambari git commit: AMBARI-18590 - RegionServer Registration Checks Fail During Upgrade If rDNS is Not Enabled (jonathanhurley)
Repository: ambari Updated Branches: refs/heads/branch-2.5 c1de1dd53 -> 48fcbb886 AMBARI-18590 - RegionServer Registration Checks Fail During Upgrade If rDNS is Not Enabled (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/48fcbb88 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/48fcbb88 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/48fcbb88 Branch: refs/heads/branch-2.5 Commit: 48fcbb8868cdbb23e4ff95cea97422195e2b9178 Parents: c1de1dd Author: Jonathan HurleyAuthored: Thu Oct 13 11:16:15 2016 -0400 Committer: Jonathan Hurley Committed: Thu Oct 13 17:02:41 2016 -0400 -- .../HBASE/0.96.0.2.0/package/scripts/upgrade.py | 57 1 file changed, 48 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/48fcbb88/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py -- diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py index b1a19e6..afdc244 100644 --- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py +++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py @@ -18,11 +18,15 @@ See the License for the specific language governing permissions and limitations under the License. """ -from resource_management import * +import re +import socket + from resource_management.core import shell -from resource_management.libraries.functions import conf_select -from resource_management.libraries.functions import stack_select -from resource_management.libraries.functions import StackFeature +from resource_management.core.exceptions import ComponentIsNotRunning +from resource_management.core.exceptions import Fail +from resource_management.core.logger import Logger +from resource_management.libraries.functions import conf_select, stack_select +from resource_management.libraries.functions.constants import StackFeature from resource_management.libraries.functions.stack_features import check_stack_feature from resource_management.libraries.functions.decorator import retry from resource_management.libraries.functions import check_process_status @@ -41,7 +45,7 @@ def post_regionserver(env): check_cmd = "echo 'status \"simple\"' | {0} shell".format(params.hbase_cmd) exec_cmd = "{0} {1}".format(params.kinit_cmd, check_cmd) - call_and_match(exec_cmd, params.hbase_user, params.hostname + ":", re.IGNORECASE) + is_regionserver_registered(exec_cmd, params.hbase_user, params.hostname, re.IGNORECASE) def is_region_server_process_running(): @@ -52,14 +56,49 @@ def is_region_server_process_running(): except ComponentIsNotRunning: return False -@retry(times=30, sleep_time=30, err_class=Fail) # keep trying for 15 mins -def call_and_match(cmd, user, regex, regex_search_flags): +@retry(times=30, sleep_time=30, err_class=Fail) +def is_regionserver_registered(cmd, user, hostname, regex_search_flags): + """ + Queries HBase through the HBase shell to see which servers have successfully registered. This is + useful in cases, such as upgrades, where we must ensure that a RegionServer has not only started, + but also completed it's registration handshake before moving into upgrading the next RegionServer. + + The hbase shell is used along with the "show 'simple'" command in order to determine if the + specified host has registered. + :param cmd: + :param user: + :param hostname: + :param regex_search_flags: + :return: + """ if not is_region_server_process_running(): Logger.info("RegionServer process is not running") raise Fail("RegionServer process is not running") + # use hbase shell with "status 'simple'" command code, out = shell.call(cmd, user=user) - if not (out and re.search(regex, out, regex_search_flags)): -raise Fail("Could not verify RS available") + # if we don't have ouput, then we can't check + if not out: +raise Fail("Unable to retrieve status information from the HBase shell") + + # try matching the hostname with a colon (which indicates a bound port) + bound_hostname_to_match = hostname + ":" + match = re.search(bound_hostname_to_match, out, regex_search_flags) + + # if there's no match, try again with the IP address + if not match: +try: + ip_address = socket.gethostbyname(hostname) + bound_ip_address_to_match = ip_address + ":" + match = re.search(bound_ip_address_to_match, out, regex_search_flags) +except socket.error: + # this
ambari git commit: AMBARI-18590 - RegionServer Registration Checks Fail During Upgrade If rDNS is Not Enabled (jonathanhurley)
Repository: ambari Updated Branches: refs/heads/trunk 00d2f1193 -> 4140cc78a AMBARI-18590 - RegionServer Registration Checks Fail During Upgrade If rDNS is Not Enabled (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4140cc78 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4140cc78 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4140cc78 Branch: refs/heads/trunk Commit: 4140cc78a0153799938c2dbe3f80c11ab3be2e30 Parents: 00d2f11 Author: Jonathan HurleyAuthored: Thu Oct 13 11:16:15 2016 -0400 Committer: Jonathan Hurley Committed: Thu Oct 13 15:44:58 2016 -0400 -- .../HBASE/0.96.0.2.0/package/scripts/upgrade.py | 48 ++-- 1 file changed, 43 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4140cc78/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py -- diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py index f1fa80c..703fe26 100644 --- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py +++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py @@ -19,7 +19,10 @@ limitations under the License. """ import re +import socket + from resource_management.core import shell +from resource_management.core.exceptions import ComponentIsNotRunning from resource_management.core.exceptions import Fail from resource_management.core.logger import Logger from resource_management.libraries.functions import conf_select, stack_select @@ -44,7 +47,7 @@ def post_regionserver(env): check_cmd = "echo 'status \"simple\"' | {0} shell".format(params.hbase_cmd) exec_cmd = "{0} {1}".format(params.kinit_cmd, check_cmd) - call_and_match(exec_cmd, params.hbase_user, params.hostname + ":", re.IGNORECASE) + is_regionserver_registered(exec_cmd, params.hbase_user, params.hostname, re.IGNORECASE) def is_region_server_process_running(): @@ -55,14 +58,49 @@ def is_region_server_process_running(): except ComponentIsNotRunning: return False -@retry(times=30, sleep_time=30, err_class=Fail) # keep trying for 15 mins -def call_and_match(cmd, user, regex, regex_search_flags): +@retry(times=30, sleep_time=30, err_class=Fail) +def is_regionserver_registered(cmd, user, hostname, regex_search_flags): + """ + Queries HBase through the HBase shell to see which servers have successfully registered. This is + useful in cases, such as upgrades, where we must ensure that a RegionServer has not only started, + but also completed it's registration handshake before moving into upgrading the next RegionServer. + + The hbase shell is used along with the "show 'simple'" command in order to determine if the + specified host has registered. + :param cmd: + :param user: + :param hostname: + :param regex_search_flags: + :return: + """ if not is_region_server_process_running(): Logger.info("RegionServer process is not running") raise Fail("RegionServer process is not running") + # use hbase shell with "status 'simple'" command code, out = shell.call(cmd, user=user) - if not (out and re.search(regex, out, regex_search_flags)): -raise Fail("Could not verify RS available") + # if we don't have ouput, then we can't check + if not out: +raise Fail("Unable to retrieve status information from the HBase shell") + + # try matching the hostname with a colon (which indicates a bound port) + bound_hostname_to_match = hostname + ":" + match = re.search(bound_hostname_to_match, out, regex_search_flags) + + # if there's no match, try again with the IP address + if not match: +try: + ip_address = socket.gethostbyname(hostname) + bound_ip_address_to_match = ip_address + ":" + match = re.search(bound_ip_address_to_match, out, regex_search_flags) +except socket.error: + # this is merely a backup, so just log that it failed + Logger.warning("Unable to lookup the IP address of {0}, reverse DNS lookup may not be working.".format(hostname)) + pass + + # failed with both a hostname and an IP address, so raise the Fail and let the function auto retry + if not match: +raise Fail( + "The RegionServer named {0} has not yet registered with the HBase Master".format(hostname))
[1/2] ambari git commit: AMBARI-18586. Increase forkCount for Ambari Server Unit Tests (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.5 05c6fa576 -> c1de1dd53 refs/heads/trunk f70722e19 -> 00d2f1193 AMBARI-18586. Increase forkCount for Ambari Server Unit Tests (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/00d2f119 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/00d2f119 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/00d2f119 Branch: refs/heads/trunk Commit: 00d2f1193e2d68b8ea4bc80eb09add91dd626c78 Parents: f70722e Author: Andrew OnishukAuthored: Thu Oct 13 19:42:54 2016 +0300 Committer: Andrew Onishuk Committed: Thu Oct 13 19:42:54 2016 +0300 -- ambari-project/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/00d2f119/ambari-project/pom.xml -- diff --git a/ambari-project/pom.xml b/ambari-project/pom.xml index beefeb4..7cc371f 100644 --- a/ambari-project/pom.xml +++ b/ambari-project/pom.xml @@ -513,7 +513,7 @@ true 900 false - 1.5C + 1C
ambari git commit: AMBARI-18581. Oozie start script ignores sysprep_skip_copy_oozie_share_lib_to_hdfs flag (Attila Doroszlai via magyari_sandor)
Repository: ambari Updated Branches: refs/heads/branch-2.5 1cc68c74e -> 05c6fa576 AMBARI-18581. Oozie start script ignores sysprep_skip_copy_oozie_share_lib_to_hdfs flag (Attila Doroszlai via magyari_sandor) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/05c6fa57 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/05c6fa57 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/05c6fa57 Branch: refs/heads/branch-2.5 Commit: 05c6fa576a727c435739c835549c3b91385d570a Parents: 1cc68c7 Author: Attila DoroszlaiAuthored: Thu Oct 13 17:31:17 2016 +0200 Committer: Sandor Magyari Committed: Thu Oct 13 17:34:20 2016 +0200 -- .../common-services/OOZIE/4.0.0.2.0/package/scripts/params.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/05c6fa57/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params.py index e5d674a..f39d632 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params.py @@ -36,4 +36,4 @@ host_sys_prepped = default("/hostLevelParams/host_sys_prepped", False) # By default, copy the tarballs to HDFS. If the cluster is sysprepped, then set based on the config. sysprep_skip_copy_oozie_share_lib_to_hdfs = False if host_sys_prepped: - sysprep_skip_copy_oozie_share_lib_to_hdfs = default("/cluster-env/sysprep_skip_copy_oozie_share_lib_to_hdfs", False) \ No newline at end of file + sysprep_skip_copy_oozie_share_lib_to_hdfs = default("/configurations/cluster-env/sysprep_skip_copy_oozie_share_lib_to_hdfs", False)
ambari git commit: AMBARI-18581. Oozie start script ignores sysprep_skip_copy_oozie_share_lib_to_hdfs flag (Attila Doroszlai via magyari_sandor)
Repository: ambari Updated Branches: refs/heads/trunk 08f1404fc -> f70722e19 AMBARI-18581. Oozie start script ignores sysprep_skip_copy_oozie_share_lib_to_hdfs flag (Attila Doroszlai via magyari_sandor) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f70722e1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f70722e1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f70722e1 Branch: refs/heads/trunk Commit: f70722e1902bb9eace19e808f7dc0777c216be5a Parents: 08f1404 Author: Attila DoroszlaiAuthored: Thu Oct 13 17:31:17 2016 +0200 Committer: Sandor Magyari Committed: Thu Oct 13 17:31:17 2016 +0200 -- .../common-services/OOZIE/4.0.0.2.0/package/scripts/params.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f70722e1/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params.py index e5d674a..f39d632 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params.py @@ -36,4 +36,4 @@ host_sys_prepped = default("/hostLevelParams/host_sys_prepped", False) # By default, copy the tarballs to HDFS. If the cluster is sysprepped, then set based on the config. sysprep_skip_copy_oozie_share_lib_to_hdfs = False if host_sys_prepped: - sysprep_skip_copy_oozie_share_lib_to_hdfs = default("/cluster-env/sysprep_skip_copy_oozie_share_lib_to_hdfs", False) \ No newline at end of file + sysprep_skip_copy_oozie_share_lib_to_hdfs = default("/configurations/cluster-env/sysprep_skip_copy_oozie_share_lib_to_hdfs", False)
[1/2] ambari git commit: AMBARI-18586. Increase forkCount for Ambari Server Unit Tests (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.5 cbcd85ed0 -> 1cc68c74e refs/heads/trunk 3622d7bbf -> 08f1404fc AMBARI-18586. Increase forkCount for Ambari Server Unit Tests (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/08f1404f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/08f1404f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/08f1404f Branch: refs/heads/trunk Commit: 08f1404fc573c0cd3969295a49f4682f51b5d251 Parents: 3622d7b Author: Andrew OnishukAuthored: Thu Oct 13 18:10:07 2016 +0300 Committer: Andrew Onishuk Committed: Thu Oct 13 18:10:07 2016 +0300 -- ambari-project/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/08f1404f/ambari-project/pom.xml -- diff --git a/ambari-project/pom.xml b/ambari-project/pom.xml index 4f045fe..beefeb4 100644 --- a/ambari-project/pom.xml +++ b/ambari-project/pom.xml @@ -513,7 +513,7 @@ true 900 false - 1 + 1.5C
[2/2] ambari git commit: AMBARI-18586. Increase forkCount for Ambari Server Unit Tests (aonishuk)
AMBARI-18586. Increase forkCount for Ambari Server Unit Tests (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1cc68c74 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1cc68c74 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1cc68c74 Branch: refs/heads/branch-2.5 Commit: 1cc68c74e1995f32421fcaf2b2e4e7a99659a300 Parents: cbcd85e Author: Andrew OnishukAuthored: Thu Oct 13 18:10:09 2016 +0300 Committer: Andrew Onishuk Committed: Thu Oct 13 18:10:09 2016 +0300 -- ambari-project/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1cc68c74/ambari-project/pom.xml -- diff --git a/ambari-project/pom.xml b/ambari-project/pom.xml index c0fd7bf..0ed79ac 100644 --- a/ambari-project/pom.xml +++ b/ambari-project/pom.xml @@ -513,7 +513,7 @@ true 900 false - 1 + 1.5C
[1/3] ambari git commit: AMBARI-18589. HCat client install during Ambari install wizard (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.4 c02a52173 -> b6eae9deb refs/heads/branch-2.5 f90f09346 -> cbcd85ed0 refs/heads/trunk d4f24d331 -> 3622d7bbf AMBARI-18589. HCat client install during Ambari install wizard (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3622d7bb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3622d7bb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3622d7bb Branch: refs/heads/trunk Commit: 3622d7bbf47e37be249e1b4f63288cfdb5907744 Parents: d4f24d3 Author: Andrew OnishukAuthored: Thu Oct 13 17:49:34 2016 +0300 Committer: Andrew Onishuk Committed: Thu Oct 13 17:49:34 2016 +0300 -- .../resource_management/TestPackageResource.py | 10 +-- .../resource_management/core/exceptions.py | 14 +++- .../core/providers/package/__init__.py | 67 .../core/providers/package/apt.py | 21 ++ .../core/providers/package/yumrpm.py| 7 +- .../core/providers/package/zypper.py| 5 ++ .../python/resource_management/core/shell.py| 5 +- .../libraries/functions/get_user_call_output.py | 4 +- 8 files changed, 77 insertions(+), 56 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3622d7bb/ambari-agent/src/test/python/resource_management/TestPackageResource.py -- diff --git a/ambari-agent/src/test/python/resource_management/TestPackageResource.py b/ambari-agent/src/test/python/resource_management/TestPackageResource.py index 1f2250d..66227c6 100644 --- a/ambari-agent/src/test/python/resource_management/TestPackageResource.py +++ b/ambari-agent/src/test/python/resource_management/TestPackageResource.py @@ -40,9 +40,7 @@ class TestPackageResource(TestCase): Package("some_package", logoutput = False ) -call_mock.assert_has_calls([call("dpkg --get-selections | grep -v deinstall | awk '{print $1}' | grep ^some-package$"), - call(['/usr/bin/apt-get', '-q', '-o', 'Dpkg::Options::=--force-confdef', '--allow-unauthenticated', '--assume-yes', 'install', 'some-package'], logoutput=False, sudo=True, env={'DEBIAN_FRONTEND': 'noninteractive'}), - call(['/usr/bin/apt-get', 'update', '-qq'], logoutput=False, sudo=True)]) +call_mock.assert_has_calls([call("dpkg --get-selections | grep -v deinstall | awk '{print $1}' | grep ^some-package$")]) shell_mock.assert_has_calls([call(['/usr/bin/apt-get', '-q', '-o', 'Dpkg::Options::=--force-confdef', '--allow-unauthenticated', '--assume-yes', 'install', 'some-package'], logoutput=False, sudo=True, env={'DEBIAN_FRONTEND': 'noninteractive'})]) @@ -57,11 +55,9 @@ class TestPackageResource(TestCase): Package("some_package", logoutput = False ) -call_mock.assert_has_calls([call("dpkg --get-selections | grep -v deinstall | awk '{print $1}' | grep ^some-package$"), - call(['/usr/bin/apt-get', '-q', '-o', 'Dpkg::Options::=--force-confdef', '--allow-unauthenticated', '--assume-yes', 'install', 'some-package'], logoutput=False, sudo=True, env={'DEBIAN_FRONTEND': 'noninteractive'})]) +call_mock.assert_has_calls([call("dpkg --get-selections | grep -v deinstall | awk '{print $1}' | grep ^some-package$")]) - -self.assertEqual(shell_mock.call_count, 0, "shell.checked_call shouldn't be called") +shell_mock.assert_has_call([call(['/usr/bin/apt-get', '-q', '-o', 'Dpkg::Options::=--force-confdef', '--allow-unauthenticated', '--assume-yes', 'install', 'some-package'], logoutput=False, sudo=True, env={'DEBIAN_FRONTEND': 'noninteractive'})]) @patch.object(shell, "call") @patch.object(shell, "checked_call") http://git-wip-us.apache.org/repos/asf/ambari/blob/3622d7bb/ambari-common/src/main/python/resource_management/core/exceptions.py -- diff --git a/ambari-common/src/main/python/resource_management/core/exceptions.py b/ambari-common/src/main/python/resource_management/core/exceptions.py index b224fb3..a59611d 100644 --- a/ambari-common/src/main/python/resource_management/core/exceptions.py +++ b/ambari-common/src/main/python/resource_management/core/exceptions.py @@ -23,7 +23,7 @@ Ambari Agent import sys import traceback -__all__ = ["Fail", "ExecuteTimeoutException", "InvalidArgument", "ClientComponentHasNoStatus", "ComponentIsNotRunning"] +__all__ = ["Fail", "ExecutionFailed", "ExecuteTimeoutException", "InvalidArgument", "ClientComponentHasNoStatus", "ComponentIsNotRunning"] class Fail(Exception): def __init__(self, message="", print_cause=True): @@ -58,3 +58,15 @@ class
[2/3] ambari git commit: AMBARI-18589. HCat client install during Ambari install wizard (aonishuk)
AMBARI-18589. HCat client install during Ambari install wizard (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b6eae9de Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b6eae9de Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b6eae9de Branch: refs/heads/branch-2.4 Commit: b6eae9deb9fbbabdead3b0fc9f93f0c554d0e0b1 Parents: c02a521 Author: Andrew OnishukAuthored: Thu Oct 13 17:49:37 2016 +0300 Committer: Andrew Onishuk Committed: Thu Oct 13 17:49:37 2016 +0300 -- .../resource_management/TestPackageResource.py | 10 +-- .../resource_management/core/exceptions.py | 14 +++- .../core/providers/package/__init__.py | 67 .../core/providers/package/apt.py | 21 ++ .../core/providers/package/yumrpm.py| 7 +- .../core/providers/package/zypper.py| 5 ++ .../python/resource_management/core/shell.py| 5 +- .../libraries/functions/get_user_call_output.py | 4 +- 8 files changed, 77 insertions(+), 56 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b6eae9de/ambari-agent/src/test/python/resource_management/TestPackageResource.py -- diff --git a/ambari-agent/src/test/python/resource_management/TestPackageResource.py b/ambari-agent/src/test/python/resource_management/TestPackageResource.py index 1f2250d..66227c6 100644 --- a/ambari-agent/src/test/python/resource_management/TestPackageResource.py +++ b/ambari-agent/src/test/python/resource_management/TestPackageResource.py @@ -40,9 +40,7 @@ class TestPackageResource(TestCase): Package("some_package", logoutput = False ) -call_mock.assert_has_calls([call("dpkg --get-selections | grep -v deinstall | awk '{print $1}' | grep ^some-package$"), - call(['/usr/bin/apt-get', '-q', '-o', 'Dpkg::Options::=--force-confdef', '--allow-unauthenticated', '--assume-yes', 'install', 'some-package'], logoutput=False, sudo=True, env={'DEBIAN_FRONTEND': 'noninteractive'}), - call(['/usr/bin/apt-get', 'update', '-qq'], logoutput=False, sudo=True)]) +call_mock.assert_has_calls([call("dpkg --get-selections | grep -v deinstall | awk '{print $1}' | grep ^some-package$")]) shell_mock.assert_has_calls([call(['/usr/bin/apt-get', '-q', '-o', 'Dpkg::Options::=--force-confdef', '--allow-unauthenticated', '--assume-yes', 'install', 'some-package'], logoutput=False, sudo=True, env={'DEBIAN_FRONTEND': 'noninteractive'})]) @@ -57,11 +55,9 @@ class TestPackageResource(TestCase): Package("some_package", logoutput = False ) -call_mock.assert_has_calls([call("dpkg --get-selections | grep -v deinstall | awk '{print $1}' | grep ^some-package$"), - call(['/usr/bin/apt-get', '-q', '-o', 'Dpkg::Options::=--force-confdef', '--allow-unauthenticated', '--assume-yes', 'install', 'some-package'], logoutput=False, sudo=True, env={'DEBIAN_FRONTEND': 'noninteractive'})]) +call_mock.assert_has_calls([call("dpkg --get-selections | grep -v deinstall | awk '{print $1}' | grep ^some-package$")]) - -self.assertEqual(shell_mock.call_count, 0, "shell.checked_call shouldn't be called") +shell_mock.assert_has_call([call(['/usr/bin/apt-get', '-q', '-o', 'Dpkg::Options::=--force-confdef', '--allow-unauthenticated', '--assume-yes', 'install', 'some-package'], logoutput=False, sudo=True, env={'DEBIAN_FRONTEND': 'noninteractive'})]) @patch.object(shell, "call") @patch.object(shell, "checked_call") http://git-wip-us.apache.org/repos/asf/ambari/blob/b6eae9de/ambari-common/src/main/python/resource_management/core/exceptions.py -- diff --git a/ambari-common/src/main/python/resource_management/core/exceptions.py b/ambari-common/src/main/python/resource_management/core/exceptions.py index 25e7993..c2938aa 100644 --- a/ambari-common/src/main/python/resource_management/core/exceptions.py +++ b/ambari-common/src/main/python/resource_management/core/exceptions.py @@ -20,7 +20,7 @@ Ambari Agent """ -__all__ = ["Fail", "ExecuteTimeoutException", "InvalidArgument", "ClientComponentHasNoStatus", "ComponentIsNotRunning"] +__all__ = ["Fail", "ExecutionFailed", "ExecuteTimeoutException", "InvalidArgument", "ClientComponentHasNoStatus", "ComponentIsNotRunning"] class Fail(Exception): pass @@ -46,3 +46,15 @@ class ComponentIsNotRunning(Fail): Later exception is silently processed at script.py """ pass + +class ExecutionFailed(Fail): + """ + Is thrown when shell command returns non-zero return code + """ + def __init__(self, exception_message, code,
[3/3] ambari git commit: AMBARI-18589. HCat client install during Ambari install wizard (aonishuk)
AMBARI-18589. HCat client install during Ambari install wizard (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cbcd85ed Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cbcd85ed Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cbcd85ed Branch: refs/heads/branch-2.5 Commit: cbcd85ed071a0eeb4397dec338d39d1c23673e97 Parents: f90f093 Author: Andrew OnishukAuthored: Thu Oct 13 17:49:40 2016 +0300 Committer: Andrew Onishuk Committed: Thu Oct 13 17:49:40 2016 +0300 -- .../resource_management/TestPackageResource.py | 10 +-- .../resource_management/core/exceptions.py | 14 +++- .../core/providers/package/__init__.py | 67 .../core/providers/package/apt.py | 21 ++ .../core/providers/package/yumrpm.py| 7 +- .../core/providers/package/zypper.py| 5 ++ .../python/resource_management/core/shell.py| 5 +- .../libraries/functions/get_user_call_output.py | 4 +- 8 files changed, 77 insertions(+), 56 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/cbcd85ed/ambari-agent/src/test/python/resource_management/TestPackageResource.py -- diff --git a/ambari-agent/src/test/python/resource_management/TestPackageResource.py b/ambari-agent/src/test/python/resource_management/TestPackageResource.py index 1f2250d..66227c6 100644 --- a/ambari-agent/src/test/python/resource_management/TestPackageResource.py +++ b/ambari-agent/src/test/python/resource_management/TestPackageResource.py @@ -40,9 +40,7 @@ class TestPackageResource(TestCase): Package("some_package", logoutput = False ) -call_mock.assert_has_calls([call("dpkg --get-selections | grep -v deinstall | awk '{print $1}' | grep ^some-package$"), - call(['/usr/bin/apt-get', '-q', '-o', 'Dpkg::Options::=--force-confdef', '--allow-unauthenticated', '--assume-yes', 'install', 'some-package'], logoutput=False, sudo=True, env={'DEBIAN_FRONTEND': 'noninteractive'}), - call(['/usr/bin/apt-get', 'update', '-qq'], logoutput=False, sudo=True)]) +call_mock.assert_has_calls([call("dpkg --get-selections | grep -v deinstall | awk '{print $1}' | grep ^some-package$")]) shell_mock.assert_has_calls([call(['/usr/bin/apt-get', '-q', '-o', 'Dpkg::Options::=--force-confdef', '--allow-unauthenticated', '--assume-yes', 'install', 'some-package'], logoutput=False, sudo=True, env={'DEBIAN_FRONTEND': 'noninteractive'})]) @@ -57,11 +55,9 @@ class TestPackageResource(TestCase): Package("some_package", logoutput = False ) -call_mock.assert_has_calls([call("dpkg --get-selections | grep -v deinstall | awk '{print $1}' | grep ^some-package$"), - call(['/usr/bin/apt-get', '-q', '-o', 'Dpkg::Options::=--force-confdef', '--allow-unauthenticated', '--assume-yes', 'install', 'some-package'], logoutput=False, sudo=True, env={'DEBIAN_FRONTEND': 'noninteractive'})]) +call_mock.assert_has_calls([call("dpkg --get-selections | grep -v deinstall | awk '{print $1}' | grep ^some-package$")]) - -self.assertEqual(shell_mock.call_count, 0, "shell.checked_call shouldn't be called") +shell_mock.assert_has_call([call(['/usr/bin/apt-get', '-q', '-o', 'Dpkg::Options::=--force-confdef', '--allow-unauthenticated', '--assume-yes', 'install', 'some-package'], logoutput=False, sudo=True, env={'DEBIAN_FRONTEND': 'noninteractive'})]) @patch.object(shell, "call") @patch.object(shell, "checked_call") http://git-wip-us.apache.org/repos/asf/ambari/blob/cbcd85ed/ambari-common/src/main/python/resource_management/core/exceptions.py -- diff --git a/ambari-common/src/main/python/resource_management/core/exceptions.py b/ambari-common/src/main/python/resource_management/core/exceptions.py index 25e7993..c2938aa 100644 --- a/ambari-common/src/main/python/resource_management/core/exceptions.py +++ b/ambari-common/src/main/python/resource_management/core/exceptions.py @@ -20,7 +20,7 @@ Ambari Agent """ -__all__ = ["Fail", "ExecuteTimeoutException", "InvalidArgument", "ClientComponentHasNoStatus", "ComponentIsNotRunning"] +__all__ = ["Fail", "ExecutionFailed", "ExecuteTimeoutException", "InvalidArgument", "ClientComponentHasNoStatus", "ComponentIsNotRunning"] class Fail(Exception): pass @@ -46,3 +46,15 @@ class ComponentIsNotRunning(Fail): Later exception is silently processed at script.py """ pass + +class ExecutionFailed(Fail): + """ + Is thrown when shell command returns non-zero return code + """ + def __init__(self, exception_message, code,
ambari git commit: AMBARI-18532. Part_2.Getting errors with max length 1000byte, when using Mysql db with charset UTF8.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/trunk 213146661 -> d4f24d331 AMBARI-18532. Part_2.Getting errors with max length 1000byte, when using Mysql db with charset UTF8.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d4f24d33 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d4f24d33 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d4f24d33 Branch: refs/heads/trunk Commit: d4f24d3313f850597682c6f15bdf5106e297 Parents: 2131466 Author: Vitaly BrodetskyiAuthored: Thu Oct 13 04:11:14 2016 +0300 Committer: Vitaly Brodetskyi Committed: Thu Oct 13 04:11:14 2016 +0300 -- .../server/upgrade/SchemaUpgradeHelper.java | 1 + .../server/upgrade/UpgradeCatalog242.java | 124 ++ .../main/resources/Ambari-DDL-MySQL-CREATE.sql | 2 +- .../server/upgrade/UpgradeCatalog242Test.java | 226 +++ 4 files changed, 352 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d4f24d33/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java index 54ffec5..38bd6e1 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java @@ -192,6 +192,7 @@ public class SchemaUpgradeHelper { catalogBinder.addBinding().to(UpgradeCatalog222.class); catalogBinder.addBinding().to(UpgradeCatalog230.class); catalogBinder.addBinding().to(UpgradeCatalog240.class); + catalogBinder.addBinding().to(UpgradeCatalog242.class); catalogBinder.addBinding().to(UpgradeCatalog250.class); catalogBinder.addBinding().to(UpgradeCatalog300.class); catalogBinder.addBinding().to(FinalUpgradeCatalog.class); http://git-wip-us.apache.org/repos/asf/ambari/blob/d4f24d33/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog242.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog242.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog242.java new file mode 100644 index 000..6fa3e68 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog242.java @@ -0,0 +1,124 @@ +/* + * 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.upgrade; + +import java.sql.SQLException; + +import org.apache.ambari.server.AmbariException; +import org.apache.ambari.server.configuration.Configuration; +import org.apache.ambari.server.orm.DBAccessor; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.google.inject.Inject; +import com.google.inject.Injector; + +/** + * Upgrade catalog for version 2.4.2. + */ +public class UpgradeCatalog242 extends AbstractUpgradeCatalog { + + protected static final String EXTENSION_TABLE = "extension"; + protected static final String USERS_TABLE = "users"; + protected static final String HOST_ROLE_COMMAND_TABLE = "host_role_command"; + protected static final String BLUEPRINT_TABLE = "blueprint"; + + protected static final String BLUEPRINT_NAME_COLUMN = "blueprint_name"; + protected static final String EXTENSION_NAME_COLUMN = "extension_name"; + protected static final String EXTENSION_VERSION_COLUMN = "extension_version"; + protected static final String USER_TYPE_COLUMN = "user_type"; + protected static final String USER_NAME_COLUMN = "user_name"; + protected static final String ROLE_COLUMN = "role"; + protected static final String STATUS_COLUMN = "status"; + + + /** + * Logger. + */ + private static
ambari git commit: AMBARI-18532. Part_2.Getting errors with max length 1000byte, when using Mysql db with charset UTF8.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/branch-2.5 4512f5525 -> f90f09346 AMBARI-18532. Part_2.Getting errors with max length 1000byte, when using Mysql db with charset UTF8.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f90f0934 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f90f0934 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f90f0934 Branch: refs/heads/branch-2.5 Commit: f90f09346e58a84ec3b40d9d2743014280b19680 Parents: 4512f55 Author: Vitaly BrodetskyiAuthored: Thu Oct 13 04:03:30 2016 +0300 Committer: Vitaly Brodetskyi Committed: Thu Oct 13 04:03:30 2016 +0300 -- .../server/upgrade/SchemaUpgradeHelper.java | 1 + .../server/upgrade/UpgradeCatalog242.java | 124 ++ .../main/resources/Ambari-DDL-MySQL-CREATE.sql | 2 +- .../server/upgrade/UpgradeCatalog242Test.java | 226 +++ 4 files changed, 352 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f90f0934/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java index 2256acf..aa557b1 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java @@ -192,6 +192,7 @@ public class SchemaUpgradeHelper { catalogBinder.addBinding().to(UpgradeCatalog222.class); catalogBinder.addBinding().to(UpgradeCatalog230.class); catalogBinder.addBinding().to(UpgradeCatalog240.class); + catalogBinder.addBinding().to(UpgradeCatalog242.class); catalogBinder.addBinding().to(UpgradeCatalog250.class); catalogBinder.addBinding().to(FinalUpgradeCatalog.class); http://git-wip-us.apache.org/repos/asf/ambari/blob/f90f0934/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog242.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog242.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog242.java new file mode 100644 index 000..6fa3e68 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog242.java @@ -0,0 +1,124 @@ +/* + * 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.upgrade; + +import java.sql.SQLException; + +import org.apache.ambari.server.AmbariException; +import org.apache.ambari.server.configuration.Configuration; +import org.apache.ambari.server.orm.DBAccessor; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.google.inject.Inject; +import com.google.inject.Injector; + +/** + * Upgrade catalog for version 2.4.2. + */ +public class UpgradeCatalog242 extends AbstractUpgradeCatalog { + + protected static final String EXTENSION_TABLE = "extension"; + protected static final String USERS_TABLE = "users"; + protected static final String HOST_ROLE_COMMAND_TABLE = "host_role_command"; + protected static final String BLUEPRINT_TABLE = "blueprint"; + + protected static final String BLUEPRINT_NAME_COLUMN = "blueprint_name"; + protected static final String EXTENSION_NAME_COLUMN = "extension_name"; + protected static final String EXTENSION_VERSION_COLUMN = "extension_version"; + protected static final String USER_TYPE_COLUMN = "user_type"; + protected static final String USER_NAME_COLUMN = "user_name"; + protected static final String ROLE_COLUMN = "role"; + protected static final String STATUS_COLUMN = "status"; + + + /** + * Logger. + */ + private static final Logger LOG =
ambari git commit: AMBARI-18532. Part_2.Getting errors with max length 1000byte, when using Mysql db with charset UTF8.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/branch-2.4 fdc5bd3fd -> c02a52173 AMBARI-18532. Part_2.Getting errors with max length 1000byte, when using Mysql db with charset UTF8.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c02a5217 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c02a5217 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c02a5217 Branch: refs/heads/branch-2.4 Commit: c02a52173f54acb78b59a02e6378a0cc54526c3d Parents: fdc5bd3 Author: Vitaly BrodetskyiAuthored: Thu Oct 13 03:54:07 2016 +0300 Committer: Vitaly Brodetskyi Committed: Thu Oct 13 03:54:07 2016 +0300 -- .../server/upgrade/SchemaUpgradeHelper.java | 32 +-- .../server/upgrade/UpgradeCatalog242.java | 124 ++ .../main/resources/Ambari-DDL-MySQL-CREATE.sql | 2 +- .../server/upgrade/UpgradeCatalog242Test.java | 226 +++ 4 files changed, 368 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c02a5217/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java index ebfb267..79c5256 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java @@ -17,21 +17,6 @@ */ package org.apache.ambari.server.upgrade; -import com.google.inject.Guice; -import com.google.inject.Inject; -import com.google.inject.Injector; -import com.google.inject.multibindings.Multibinder; -import com.google.inject.persist.PersistService; -import org.apache.ambari.server.AmbariException; -import org.apache.ambari.server.audit.AuditLoggerModule; -import org.apache.ambari.server.configuration.Configuration; -import org.apache.ambari.server.controller.ControllerModule; -import org.apache.ambari.server.orm.DBAccessor; -import org.apache.ambari.server.utils.EventBusSynchronizer; -import org.apache.ambari.server.utils.VersionUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; @@ -43,6 +28,22 @@ import java.util.List; import java.util.Properties; import java.util.Set; +import org.apache.ambari.server.AmbariException; +import org.apache.ambari.server.audit.AuditLoggerModule; +import org.apache.ambari.server.configuration.Configuration; +import org.apache.ambari.server.controller.ControllerModule; +import org.apache.ambari.server.orm.DBAccessor; +import org.apache.ambari.server.utils.EventBusSynchronizer; +import org.apache.ambari.server.utils.VersionUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.google.inject.Guice; +import com.google.inject.Inject; +import com.google.inject.Injector; +import com.google.inject.multibindings.Multibinder; +import com.google.inject.persist.PersistService; + public class SchemaUpgradeHelper { private static final Logger LOG = LoggerFactory.getLogger (SchemaUpgradeHelper.class); @@ -189,6 +190,7 @@ public class SchemaUpgradeHelper { catalogBinder.addBinding().to(UpgradeCatalog222.class); catalogBinder.addBinding().to(UpgradeCatalog230.class); catalogBinder.addBinding().to(UpgradeCatalog240.class); + catalogBinder.addBinding().to(UpgradeCatalog242.class); catalogBinder.addBinding().to(FinalUpgradeCatalog.class); EventBusSynchronizer.synchronizeAmbariEventPublisher(binder()); http://git-wip-us.apache.org/repos/asf/ambari/blob/c02a5217/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog242.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog242.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog242.java new file mode 100644 index 000..6fa3e68 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog242.java @@ -0,0 +1,124 @@ +/* + * 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
[10/20] ambari git commit: AMBARI-18504. Build fails at verify step due to leftover findbugs html file (Attila Doroszlai via magyari_sandor)
AMBARI-18504. Build fails at verify step due to leftover findbugs html file (Attila Doroszlai via magyari_sandor) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f725e33e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f725e33e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f725e33e Branch: refs/heads/branch-dev-patch-upgrade Commit: f725e33ecee3374ea32bcc604f53756c9b39cddf Parents: 3e4b368 Author: Attila DoroszlaiAuthored: Tue Oct 11 19:08:33 2016 +0200 Committer: Sandor Magyari Committed: Tue Oct 11 19:08:33 2016 +0200 -- ambari-server/pom.xml | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f725e33e/ambari-server/pom.xml -- diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml index d3ec9ad..e02b7a5 100644 --- a/ambari-server/pom.xml +++ b/ambari-server/pom.xml @@ -549,6 +549,9 @@ ${project.basedir}/target/findbugs + +*.xml + ${project.basedir}/target/findbugs fancy-hist.xsl
[14/20] ambari git commit: AMBARI-18568. Hive shows restart indicator after RU (ncole)
AMBARI-18568. Hive shows restart indicator after RU (ncole) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/82afd3a0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/82afd3a0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/82afd3a0 Branch: refs/heads/branch-dev-patch-upgrade Commit: 82afd3a0ff4dac37a8c56b914b37c1c9476c30ee Parents: 9511638 Author: Nate ColeAuthored: Tue Oct 11 17:08:05 2016 -0400 Committer: Nate Cole Committed: Wed Oct 12 10:36:03 2016 -0400 -- .../src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/82afd3a0/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml index 88d9b13..28b34a2 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml @@ -246,8 +246,8 @@ true false -HIVE_METASTORE HIVE_SERVER +HIVE_METASTORE HIVE_SERVER_INTERACTIVE WEBHCAT_SERVER
[15/20] ambari git commit: AMBARI-18579. Grafana fails to start after deployment (aonishuk)
AMBARI-18579. Grafana fails to start after deployment (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5d007e24 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5d007e24 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5d007e24 Branch: refs/heads/branch-dev-patch-upgrade Commit: 5d007e248e24e02d4d8c5c818a1125830370936c Parents: 82afd3a Author: Andrew OnishukAuthored: Wed Oct 12 20:12:27 2016 +0300 Committer: Andrew Onishuk Committed: Wed Oct 12 20:13:13 2016 +0300 -- .../AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana.py | 6 -- .../AMBARI_METRICS/0.1.0/package/scripts/params_linux.py| 6 ++ .../stacks/2.0.6/AMBARI_METRICS/test_metrics_grafana.py | 5 +++-- .../python/stacks/2.0.6/configs/default_ams_embedded.json | 9 +++-- 4 files changed, 20 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5d007e24/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana.py -- diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana.py index 542663f..606f119 100644 --- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana.py +++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana.py @@ -43,7 +43,8 @@ class AmsGrafana(Script): start_cmd = format("{ams_grafana_script} start") Execute(start_cmd, -user=params.ams_user +user=params.ams_user, +not_if = params.grafana_process_exists_cmd, ) # Create datasource create_ams_datasource() @@ -55,7 +56,8 @@ class AmsGrafana(Script): env.set_params(params) self.configure(env, action = 'stop') Execute((format("{ams_grafana_script}"), 'stop'), -sudo=True +sudo=True, +only_if = params.grafana_process_exists_cmd, ) def status(self, env): http://git-wip-us.apache.org/repos/asf/ambari/blob/5d007e24/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_linux.py index 58c7c1d..da399f7 100644 --- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_linux.py @@ -22,6 +22,7 @@ from resource_management.libraries.script.script import Script from resource_management.libraries.functions import conf_select from resource_management.libraries.functions.default import default from resource_management.libraries.functions.format import format +from resource_management.core.shell import as_user from ambari_commons import OSCheck from ambari_commons.constants import AMBARI_SUDO_BINARY from resource_management.libraries.functions.expect import expect @@ -34,6 +35,8 @@ ams_user = config['configurations']['ams-env']['ambari_metrics_user'] #RPM versioning support rpm_version = default("/configurations/hadoop-env/rpm_version", None) +ams_grafana_pid_dir = config['configurations']['ams-grafana-env']['metrics_grafana_pid_dir'] + #hadoop params if rpm_version is not None: #RPM versioning support @@ -56,3 +59,6 @@ dfs_type = default("/commandParams/dfs_type", "") hbase_regionserver_shutdown_timeout = expect('/configurations/ams-hbase-env/hbase_regionserver_shutdown_timeout', int, 30) + +grafana_pid_file = format("{ams_grafana_pid_dir}/grafana-server.pid") +grafana_process_exists_cmd = as_user(format("test -f {grafana_pid_file} && ps -p `cat {grafana_pid_file}`"), ams_user) http://git-wip-us.apache.org/repos/asf/ambari/blob/5d007e24/ambari-server/src/test/python/stacks/2.0.6/AMBARI_METRICS/test_metrics_grafana.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/AMBARI_METRICS/test_metrics_grafana.py b/ambari-server/src/test/python/stacks/2.0.6/AMBARI_METRICS/test_metrics_grafana.py index 2e24d82..9ac14c4 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/AMBARI_METRICS/test_metrics_grafana.py +++
[12/20] ambari git commit: AMBARI-18564. Ambari should be able to create arbitrary Kerberos identities for itself as declared in the Kerberos Descriptor (rlevas)
AMBARI-18564. Ambari should be able to create arbitrary Kerberos identities for itself as declared in the Kerberos Descriptor (rlevas) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d2a926ee Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d2a926ee Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d2a926ee Branch: refs/heads/branch-dev-patch-upgrade Commit: d2a926ee71f8a24a8d568fc977dc8ac06dc18493 Parents: 1d54fef Author: Robert LevasAuthored: Wed Oct 12 05:01:14 2016 -0400 Committer: Robert Levas Committed: Wed Oct 12 05:01:14 2016 -0400 -- .../server/controller/KerberosHelper.java | 40 +- .../server/controller/KerberosHelperImpl.java | 131 +-- .../AbstractPrepareKerberosServerAction.java| 38 +++--- .../ConfigureAmbariIdentitiesServerAction.java | 2 +- .../resources/stacks/HDP/2.0.6/kerberos.json| 40 -- .../server/controller/KerberosHelperTest.java | 84 6 files changed, 196 insertions(+), 139 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d2a926ee/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java index 1153d01..35235db 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java @@ -65,15 +65,24 @@ public interface KerberosHelper { * The alias to assign to the KDC administrator credential Keystore item */ String KDC_ADMINISTRATOR_CREDENTIAL_ALIAS = "kdc.admin.credential"; - + /** + * The hostname used to hold the place of the actual hostname of the host that the Ambari server + * is on. + */ String AMBARI_SERVER_HOST_NAME = "ambari_server"; - - String AMBARI_IDENTITY_NAME = "ambari-server"; - - String SPNEGO_IDENTITY_NAME = "spnego"; - + /** + * The name of the Ambari server's Kerberos identities as defined in the Kerberos descriptor + */ + String AMBARI_SERVER_KERBEROS_IDENTITY_NAME = "ambari-server"; + /** + * The kerberos-env property name declaring whether Ambari should manage its own required + * identities or not + */ String CREATE_AMBARI_PRINCIPAL = "create_ambari_principal"; - + /** + * The kerberos-env property name declaring whether Ambari should manage the cluster's required + * identities or not + */ String MANAGE_IDENTITIES = "manage_identities"; /** @@ -607,6 +616,23 @@ public interface KerberosHelper { throws AmbariException; /** + * Gets the Ambari server Kerberos identities found in the Kerberos descriptor. + * + * @param kerberosDescriptor the kerberos descriptor + */ + List getAmbariServerIdentities(KerberosDescriptor kerberosDescriptor) throws AmbariException; + + /** + * Determines if the Ambari identities should be created when enabling Kerberos. + * + * If kerberos-env/create_ambari_principal is not set to false the identity should be calculated. + * + * @param kerberosEnvProperties the kerberos-env configuration properties + * @return true if the Ambari identities should be created; otherwise false + */ + boolean createAmbariIdentities(Map kerberosEnvProperties); + + /** * Gets the previously stored KDC administrator credentials. * * @param clusterName the name of the relevant cluster http://git-wip-us.apache.org/repos/asf/ambari/blob/d2a926ee/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java index e15965b..fb87495 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java @@ -359,6 +359,13 @@ public class KerberosHelperImpl implements KerberosHelper { Map propertiesToIgnore = new HashMap (); +// If Ambari is managing it own identities then add AMBARI to the set of installed servcie so +// that its Kerberos descriptor entries will be included. +if(createAmbariIdentities(existingConfigurations.get("kerberos-env"))) { + installedServices = new HashMap (installedServices); +
[16/20] ambari git commit: AMBARI-18543. Option to enable request/access logs in Ambari. (Amarnath reddy pappu via swagle)
AMBARI-18543. Option to enable request/access logs in Ambari. (Amarnath reddy pappu via swagle) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/60dc2402 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/60dc2402 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/60dc2402 Branch: refs/heads/branch-dev-patch-upgrade Commit: 60dc240216bf54f35dfb5d3fea823ccceee2c9a4 Parents: 5d007e2 Author: Siddharth WagleAuthored: Wed Oct 12 11:04:54 2016 -0700 Committer: Siddharth Wagle Committed: Wed Oct 12 11:04:54 2016 -0700 -- ambari-server/conf/windows/ambari.properties| 1 + .../server/configuration/Configuration.java | 23 + .../ambari/server/controller/AmbariServer.java | 50 3 files changed, 74 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/60dc2402/ambari-server/conf/windows/ambari.properties -- diff --git a/ambari-server/conf/windows/ambari.properties b/ambari-server/conf/windows/ambari.properties index c1c0a99..e47319e 100644 --- a/ambari-server/conf/windows/ambari.properties +++ b/ambari-server/conf/windows/ambari.properties @@ -51,6 +51,7 @@ server.execution.scheduler.maxThreads=5 server.execution.scheduler.maxDbConnections=5 server.execution.scheduler.misfire.toleration.minutes=480 + # Kerberos settings kerberos.keytab.cache.dir = data\\cache http://git-wip-us.apache.org/repos/asf/ambari/blob/60dc2402/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java index e976f45..378db18 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java @@ -1680,6 +1680,27 @@ public class Configuration { "server.tmp.dir", AmbariPath.getPath("/var/lib/ambari-server/tmp")); /** + * Request logs path . + */ + @Markdown(description = "The location on the Ambari Server where request logs can be created.") + public static final ConfigurationProperty REQUEST_LOGPATH = new ConfigurationProperty<>( + "server.requestlogs.path", null); + + /** + * The pattern of request logs . + */ + @Markdown(description = "The pattern of request log file name") + public static final ConfigurationProperty REQUEST_LOGNAMEPATTERN = new ConfigurationProperty<>( + "server.requestlogs.namepattern", "ambari-access-_mm_dd.log"); + + /** + * The number of days request logs can be retained. + */ + @Markdown(description = "The number of days that request log would be retained.") + public static final ConfigurationProperty REQUEST_LOG_RETAINDAYS = new ConfigurationProperty<>( + "server.requestlogs.retaindays", 15); + + /** * The time, in {@link TimeUnit#MILLISECONDS}, until an external script is killed. */ @Markdown(description = "The time, in milliseconds, until an external script is killed.") @@ -2566,6 +2587,8 @@ public class Configuration { configsMap.put(JAVA_HOME.getKey(), getProperty(JAVA_HOME)); configsMap.put(PARALLEL_STAGE_EXECUTION.getKey(), getProperty(PARALLEL_STAGE_EXECUTION)); configsMap.put(SERVER_TMP_DIR.getKey(), getProperty(SERVER_TMP_DIR)); +configsMap.put(REQUEST_LOGPATH.getKey(), getProperty(REQUEST_LOGPATH)); +configsMap.put(REQUEST_LOG_RETAINDAYS.getKey(), getProperty(REQUEST_LOG_RETAINDAYS)); configsMap.put(EXTERNAL_SCRIPT_TIMEOUT.getKey(), getProperty(EXTERNAL_SCRIPT_TIMEOUT)); configsMap.put(SHARED_RESOURCES_DIR.getKey(), getProperty(SHARED_RESOURCES_DIR)); configsMap.put(KDC_PORT.getKey(), getProperty(KDC_PORT)); http://git-wip-us.apache.org/repos/asf/ambari/blob/60dc2402/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java index 5e498f0..c05840e 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java @@ -124,12 +124,17 @@ import org.apache.ambari.server.view.AmbariViewsMDCLoggingFilter; import org.apache.ambari.server.view.ViewDirectoryWatcher; import
[03/20] ambari git commit: AMBARI-18545. Kerberos server actions should not timeout in minutes as specified in configuration (rlevas)
AMBARI-18545. Kerberos server actions should not timeout in minutes as specified in configuration (rlevas) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0a61db56 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0a61db56 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0a61db56 Branch: refs/heads/branch-dev-patch-upgrade Commit: 0a61db5666f3ee8b82cdab0d50a1c8450b177ae7 Parents: 34c5686 Author: Robert LevasAuthored: Mon Oct 10 11:16:01 2016 -0400 Committer: Robert Levas Committed: Mon Oct 10 11:16:01 2016 -0400 -- .../apache/ambari/server/controller/KerberosHelperImpl.java| 6 +++--- .../org/apache/ambari/server/serveraction/ServerAction.java| 6 ++ 2 files changed, 9 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0a61db56/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java index cd4a0b5..e15965b 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java @@ -2890,7 +2890,7 @@ public class KerberosHelperImpl implements KerberosHelper { event, commandParameters, "Create Principals", - configuration.getDefaultServerTaskTimeout()); + Math.max(ServerAction.DEFAULT_LONG_RUNNING_TASK_TIMEOUT_SECONDS, configuration.getDefaultServerTaskTimeout())); RoleGraph roleGraph = roleGraphFactory.createNew(roleCommandOrder); roleGraph.build(stage); @@ -2913,7 +2913,7 @@ public class KerberosHelperImpl implements KerberosHelper { event, commandParameters, "Destroy Principals", - configuration.getDefaultServerTaskTimeout()); + Math.max(ServerAction.DEFAULT_LONG_RUNNING_TASK_TIMEOUT_SECONDS, configuration.getDefaultServerTaskTimeout())); RoleGraph roleGraph = roleGraphFactory.createNew(roleCommandOrder); roleGraph.build(stage); @@ -2959,7 +2959,7 @@ public class KerberosHelperImpl implements KerberosHelper { event, commandParameters, "Create Keytabs", - configuration.getDefaultServerTaskTimeout()); + Math.max(ServerAction.DEFAULT_LONG_RUNNING_TASK_TIMEOUT_SECONDS, configuration.getDefaultServerTaskTimeout())); RoleGraph roleGraph = roleGraphFactory.createNew(roleCommandOrder); roleGraph.build(stage); http://git-wip-us.apache.org/repos/asf/ambari/blob/0a61db56/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerAction.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerAction.java b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerAction.java index b9bf5ce..7c69f52 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerAction.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerAction.java @@ -33,6 +33,12 @@ public interface ServerAction { public static final String ACTION_NAME = "ACTION_NAME"; public static final String ACTION_USER_NAME = "ACTION_USER_NAME"; + /** + * The default timeout (in seconds) to use for potentially long running tasks such as creating + * Kerberos principals and generating Kerberos keytab files + */ + int DEFAULT_LONG_RUNNING_TASK_TIMEOUT_SECONDS = 36000; + /** * Gets the ExecutionCommand property of this ServerAction.
[06/20] ambari git commit: AMBARI-18554. Improve package handling in Microsoft R Server Mpack (Balázs Bence Sári via magyari_sandor)
AMBARI-18554. Improve package handling in Microsoft R Server Mpack (Balázs Bence Sári via magyari_sandor) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0d7689d8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0d7689d8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0d7689d8 Branch: refs/heads/branch-dev-patch-upgrade Commit: 0d7689d844c1099facc6f6c6c10ba19f786de28a Parents: da7b2ae Author: Balázs Bence SáriAuthored: Mon Oct 10 17:49:51 2016 +0200 Committer: Sandor Magyari Committed: Mon Oct 10 17:49:51 2016 +0200 -- .../8.0.5/package/scripts/microsoft_r.py | 11 +-- .../MICROSOFT_R/8.0.5/metainfo.xml | 19 +++ 2 files changed, 20 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0d7689d8/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/package/scripts/microsoft_r.py -- diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/package/scripts/microsoft_r.py b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/package/scripts/microsoft_r.py index 382bd0f..f6eb33e 100644 --- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/package/scripts/microsoft_r.py +++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/package/scripts/microsoft_r.py @@ -22,22 +22,13 @@ from resource_management.core.logger import Logger from resource_management.core.resources import Package -rpms = ['microsoft-r-server-mro-8.0', -'microsoft-r-server-intel-mkl-8.0', -'microsoft-r-server-packages-8.0', -'microsoft-r-server-hadoop-8.0'] - class MicrosoftR(Script): def install(self, env): Logger.info('Installing R Server Client...') tmp_dir = Script.tmp_dir Logger.debug('Using temp dir: {0}'.format(tmp_dir)) - -for rpm in rpms: - Logger.info('Installing {0}'.format(rpm)) - Package(rpm) - +self.install_packages(env) Logger.info('Installed R Server') def configure(self, env): http://git-wip-us.apache.org/repos/asf/ambari/blob/0d7689d8/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/metainfo.xml -- diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/metainfo.xml b/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/metainfo.xml index 31d5225..9470d22 100644 --- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/metainfo.xml +++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/metainfo.xml @@ -23,6 +23,25 @@ MICROSOFT_R common-services/MICROSOFT_R/8.0.5 8.0.5.0 + + + redhat6,redhat7,suse11 + + +microsoft-r-server-mro-8.0 + + +microsoft-r-server-intel-mkl-8.0 + + +microsoft-r-server-packages-8.0 + + +microsoft-r-server-hadoop-8.0 + + + +
[17/20] ambari git commit: AMBARI-18575. Fix for improving time taken by 'ExecutionScheduleManagerTest' and 'UpgradeCatalog221Test' java tests.
AMBARI-18575. Fix for improving time taken by 'ExecutionScheduleManagerTest' and 'UpgradeCatalog221Test' java tests. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/911deb74 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/911deb74 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/911deb74 Branch: refs/heads/branch-dev-patch-upgrade Commit: 911deb744485aa0366aad168c98566cf6381d4cc Parents: 60dc240 Author: Swapan ShridharAuthored: Tue Oct 11 16:09:00 2016 -0700 Committer: Swapan Shridhar Committed: Wed Oct 12 13:08:48 2016 -0700 -- .../scheduler/ExecutionScheduleManagerTest.java | 90 ++-- .../server/upgrade/UpgradeCatalog221Test.java | 42 + 2 files changed, 69 insertions(+), 63 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/911deb74/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionScheduleManagerTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionScheduleManagerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionScheduleManagerTest.java index f2fe3b8..0179486 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionScheduleManagerTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionScheduleManagerTest.java @@ -17,26 +17,16 @@ */ package org.apache.ambari.server.scheduler; -import static org.easymock.EasyMock.anyObject; -import static org.easymock.EasyMock.capture; -import static org.easymock.EasyMock.createMock; -import static org.easymock.EasyMock.createMockBuilder; -import static org.easymock.EasyMock.createNiceMock; -import static org.easymock.EasyMock.eq; -import static org.easymock.EasyMock.expect; -import static org.easymock.EasyMock.expectLastCall; -import static org.easymock.EasyMock.replay; -import static org.easymock.EasyMock.verify; -import static org.hamcrest.CoreMatchers.instanceOf; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; - -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - +import com.google.gson.Gson; +import com.google.inject.Binder; +import com.google.inject.Guice; +import com.google.inject.Inject; +import com.google.inject.Injector; +import com.google.inject.Module; +import com.google.inject.persist.PersistService; +import com.google.inject.persist.Transactional; +import com.google.inject.util.Modules; +import junit.framework.Assert; import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.actionmanager.ActionDBAccessor; import org.apache.ambari.server.actionmanager.HostRoleStatus; @@ -58,8 +48,8 @@ import org.apache.ambari.server.state.scheduler.RequestExecutionFactory; import org.apache.ambari.server.state.scheduler.Schedule; import org.easymock.Capture; import org.easymock.EasyMock; -import org.junit.After; -import org.junit.Before; +import org.junit.AfterClass; +import org.junit.BeforeClass; import org.junit.Test; import org.quartz.CronTrigger; import org.quartz.JobDataMap; @@ -76,34 +66,42 @@ import org.quartz.impl.matchers.GroupMatcher; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.google.gson.Gson; -import com.google.inject.Binder; -import com.google.inject.Guice; -import com.google.inject.Inject; -import com.google.inject.Injector; -import com.google.inject.Module; -import com.google.inject.persist.PersistService; -import com.google.inject.persist.Transactional; -import com.google.inject.util.Modules; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; -import junit.framework.Assert; +import static org.easymock.EasyMock.anyObject; +import static org.easymock.EasyMock.capture; +import static org.easymock.EasyMock.createMock; +import static org.easymock.EasyMock.createMockBuilder; +import static org.easymock.EasyMock.createNiceMock; +import static org.easymock.EasyMock.eq; +import static org.easymock.EasyMock.expect; +import static org.easymock.EasyMock.expectLastCall; +import static org.easymock.EasyMock.replay; +import static org.easymock.EasyMock.verify; +import static org.hamcrest.CoreMatchers.instanceOf; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; public class ExecutionScheduleManagerTest { - private Clusters clusters; - private Cluster cluster; - private String clusterName; - private Injector injector; - private AmbariMetaInfo metaInfo; - private ExecutionScheduleManager
[07/20] ambari git commit: AMBARI-18534 Advanced storm-atlas-application.properties panel is not opened by default upon filtering (Vivek Ratnavel Subramanian via zhewang)
AMBARI-18534 Advanced storm-atlas-application.properties panel is not opened by default upon filtering (Vivek Ratnavel Subramanian via zhewang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8f51c932 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8f51c932 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8f51c932 Branch: refs/heads/branch-dev-patch-upgrade Commit: 8f51c9324a407fa8ce8e92e2e77ee0a250c5cbc9 Parents: 0d7689d Author: Zhe (Joe) WangAuthored: Mon Oct 10 16:13:09 2016 -0700 Committer: Zhe (Joe) Wang Committed: Mon Oct 10 16:13:09 2016 -0700 -- .../common/configs/service_configs_by_category_view.js | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8f51c932/ambari-web/app/views/common/configs/service_configs_by_category_view.js -- diff --git a/ambari-web/app/views/common/configs/service_configs_by_category_view.js b/ambari-web/app/views/common/configs/service_configs_by_category_view.js index 3eebfea..d9a4c5c 100644 --- a/ambari-web/app/views/common/configs/service_configs_by_category_view.js +++ b/ambari-web/app/views/common/configs/service_configs_by_category_view.js @@ -305,7 +305,7 @@ App.ServiceConfigsByCategoryView = Em.View.extend(App.UserPref, App.ConfigOverri */ filteredCategoryConfigs: function () { Em.run.once(this, 'collapseCategory'); - }.observes('categoryConfigs.@each.isHiddenByFilter'), + }.observes('serviceConfigs.@each.isHiddenByFilter'), collapseCategory: function () { if (this.get('state') === 'destroyed') return; @@ -330,7 +330,15 @@ App.ServiceConfigsByCategoryView = Em.View.extend(App.UserPref, App.ConfigOverri } else if (isInitialRendering && !filteredResult.length) { this.set('category.isCollapsed', true); } -var categoryBlock = $('.' + this.get('category.name').split(' ').join('.') + '>.accordion-body'); +var classNames = this.get('category.name').split(' '); +// Escape the dots in category names +classNames = classNames.map(function(className) { + if(className.indexOf(".")) { +className = className.split(".").join("\\."); + } + return className; +}); +var categoryBlock = $('.' + classNames.join('.') + '>.accordion-body'); this.get('category.isCollapsed') ? categoryBlock.hide() : categoryBlock.show(); },
[20/20] ambari git commit: Merge branch 'trunk' into branch-dev-patch-upgrade
Merge branch 'trunk' into branch-dev-patch-upgrade Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1cc090d5 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1cc090d5 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1cc090d5 Branch: refs/heads/branch-dev-patch-upgrade Commit: 1cc090d56d2666ec4d96c90509debc65156bce8e Parents: b31c6c2 2131466 Author: Nate ColeAuthored: Thu Oct 13 08:43:02 2016 -0400 Committer: Nate Cole Committed: Thu Oct 13 08:43:02 2016 -0400 -- .../ambari_agent/apscheduler/scheduler.py | 1 + .../ambari_agent/apscheduler/threadpool.py | 1 + ambari-server/conf/unix/ambari.properties | 6 + ambari-server/conf/unix/install-helper.sh | 1 + ambari-server/conf/windows/ambari.properties| 7 + ambari-server/pom.xml | 3 + ambari-server/sbin/ambari-server| 4 +- .../server/actionmanager/ActionDBAccessor.java | 13 ++ .../actionmanager/ActionDBAccessorImpl.java | 14 ++ .../server/actionmanager/ActionScheduler.java | 4 +- .../server/configuration/Configuration.java | 158 +++ .../ambari/server/controller/AmbariServer.java | 50 ++ .../server/controller/KerberosHelper.java | 40 - .../server/controller/KerberosHelperImpl.java | 137 .../apache/ambari/server/orm/dao/StageDAO.java | 10 ++ .../ambari/server/orm/entities/StageEntity.java | 5 +- .../security/AbstractSecurityHeaderFilter.java | 43 + .../AmbariServerSecurityHeaderFilter.java | 3 + .../AmbariViewsSecurityHeaderFilter.java| 3 + .../server/serveraction/ServerAction.java | 6 + .../AbstractPrepareKerberosServerAction.java| 38 +++-- .../ConfigureAmbariIdentitiesServerAction.java | 2 +- .../0.1.0/package/scripts/metrics_grafana.py| 6 +- .../0.1.0/package/scripts/params_linux.py | 6 + .../resources/stacks/HDP/2.0.6/kerberos.json| 40 +++-- .../stacks/HDP/2.3/services/HDFS/widgets.json | 12 +- .../stacks/HDP/2.5/upgrades/upgrade-2.5.xml | 2 +- .../actionmanager/TestActionScheduler.java | 12 +- ...nTimelineServerStatePreservingCheckTest.java | 3 + .../server/controller/KerberosHelperTest.java | 84 ++ .../scheduler/ExecutionScheduleManagerTest.java | 90 ++- .../AbstractSecurityHeaderFilterTest.java | 38 - .../AmbariServerSecurityHeaderFilterTest.java | 7 + .../AmbariViewsSecurityHeaderFilterTest.java| 6 + .../server/security/SecurityFilterTest.java | 19 ++- .../state/cluster/ClusterDeadlockTest.java | 15 +- .../server/testing/DeadlockWarningThread.java | 13 +- .../server/upgrade/UpgradeCatalog150Test.java | 7 +- .../server/upgrade/UpgradeCatalog151Test.java | 3 + .../server/upgrade/UpgradeCatalog160Test.java | 3 + .../server/upgrade/UpgradeCatalog161Test.java | 3 + .../server/upgrade/UpgradeCatalog170Test.java | 3 + .../server/upgrade/UpgradeCatalog221Test.java | 42 +++-- .../AMBARI_METRICS/test_metrics_grafana.py | 5 +- .../2.0.6/configs/default_ams_embedded.json | 9 +- ambari-web/app/controllers/installer.js | 3 + .../main/admin/stack_and_upgrade_controller.js | 56 --- ambari-web/app/messages.js | 1 + ambari-web/app/routes/add_service_routes.js | 24 +++ .../configs/service_configs_by_category_view.js | 12 +- ambari-web/app/views/wizard/step1_view.js | 8 +- .../admin/stack_and_upgrade_controller_test.js | 45 -- .../8.0.5/package/scripts/microsoft_r.py| 11 +- .../MICROSOFT_R/8.0.5/metainfo.xml | 19 +++ .../MICROSOFT_R/8.0.5/repos/repoinfo.xml| 7 + 55 files changed, 871 insertions(+), 292 deletions(-) --
[18/20] ambari git commit: AMBARI-18566 Installer wizard-> Select Versions page: Selecting Red Hat Satellite option and clicking next button makes wizard stuck (zhewang)
AMBARI-18566 Installer wizard-> Select Versions page: Selecting Red Hat Satellite option and clicking next button makes wizard stuck (zhewang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2709304c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2709304c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2709304c Branch: refs/heads/branch-dev-patch-upgrade Commit: 2709304c50a934679069c2ac63e1dfe64e7dfc3c Parents: 911deb7 Author: Zhe (Joe) WangAuthored: Wed Oct 12 13:50:01 2016 -0700 Committer: Zhe (Joe) Wang Committed: Wed Oct 12 13:51:34 2016 -0700 -- ambari-web/app/controllers/installer.js | 3 +++ ambari-web/app/views/wizard/step1_view.js | 8 +++- 2 files changed, 10 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2709304c/ambari-web/app/controllers/installer.js -- diff --git a/ambari-web/app/controllers/installer.js b/ambari-web/app/controllers/installer.js index f8f70a0..5493b3a 100644 --- a/ambari-web/app/controllers/installer.js +++ b/ambari-web/app/controllers/installer.js @@ -831,6 +831,9 @@ App.InstallerController = App.WizardController.extend({ return os.get('repositories.length'); }).reduce(Em.sum, 0)); var verifyBaseUrl = !wizardStep1Controller.get('skipValidationChecked') && !wizardStep1Controller.get('selectedStack.useRedhatSatellite'); + if (!verifyBaseUrl) { +dfd.resolve(); + } selectedStack.get('operatingSystems').forEach(function (os) { if (os.get('isSelected') && !os.get('isEmpty')) { os.get('repositories').forEach(function (repo) { http://git-wip-us.apache.org/repos/asf/ambari/blob/2709304c/ambari-web/app/views/wizard/step1_view.js -- diff --git a/ambari-web/app/views/wizard/step1_view.js b/ambari-web/app/views/wizard/step1_view.js index 2b80ad5..bfabc02 100644 --- a/ambari-web/app/views/wizard/step1_view.js +++ b/ambari-web/app/views/wizard/step1_view.js @@ -76,7 +76,13 @@ App.WizardStep1View = Em.View.extend({ * * @type {bool} */ - showWarning: Em.computed.or('invalidFormatUrlExist', 'isNoOsChecked', 'isNoOsFilled'), + warningExist: Em.computed.or('invalidFormatUrlExist', 'isNoOsChecked', 'isNoOsFilled'), + + skipVerifyBaseUrl: Em.computed.or('controller.selectedStack.skipValidationChecked', 'controller.selectedStack.useRedhatSatellite'), + + verifyBaseUrl: Em.computed.not('skipVerifyBaseUrl'), + + showWarning: Em.computed.and('warningExist', 'verifyBaseUrl'), /** * Onclick handler for recheck repos urls. Used in Advanced Repository Options.
[04/20] ambari git commit: AMBARI-18538. Microsoft R Server management pack should support for Redhat 7 (Balázs Bence Sári via magyari_sandor)
AMBARI-18538. Microsoft R Server management pack should support for Redhat 7 (Balázs Bence Sári via magyari_sandor) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/24161edf Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/24161edf Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/24161edf Branch: refs/heads/branch-dev-patch-upgrade Commit: 24161edf9f8a81592b120640bfa75a6ef3b1e0a1 Parents: 0a61db5 Author: Balázs Bence SáriAuthored: Mon Oct 10 17:37:09 2016 +0200 Committer: Sandor Magyari Committed: Mon Oct 10 17:37:09 2016 +0200 -- .../custom-services/MICROSOFT_R/8.0.5/repos/repoinfo.xml | 7 +++ 1 file changed, 7 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/24161edf/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/repos/repoinfo.xml -- diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/repos/repoinfo.xml b/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/repos/repoinfo.xml index deb58de..fac533d 100644 --- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/repos/repoinfo.xml +++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/repos/repoinfo.xml @@ -23,6 +23,13 @@ MSFT_R + + +http://PLEASE_ENTER_REPO_URL +MSFT_R-8.0 +MSFT_R + + http://PLEASE_ENTER_REPO_URL
[11/20] ambari git commit: AMBARI-18565. Deprecate old UpgradeCatalog Unit Tests (alejandro)
AMBARI-18565. Deprecate old UpgradeCatalog Unit Tests (alejandro) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1d54fefb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1d54fefb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1d54fefb Branch: refs/heads/branch-dev-patch-upgrade Commit: 1d54fefbbf419d3fe6ebc9abd8257b854b7e0cf5 Parents: f725e33 Author: Alejandro FernandezAuthored: Thu Oct 6 16:25:05 2016 -0700 Committer: Alejandro Fernandez Committed: Tue Oct 11 16:33:59 2016 -0700 -- ...rnTimelineServerStatePreservingCheckTest.java | 3 +++ .../server/security/SecurityFilterTest.java | 19 +++ .../state/cluster/ClusterDeadlockTest.java | 15 --- .../server/testing/DeadlockWarningThread.java| 13 ++--- .../server/upgrade/UpgradeCatalog150Test.java| 7 ++- .../server/upgrade/UpgradeCatalog151Test.java| 3 +++ .../server/upgrade/UpgradeCatalog160Test.java| 3 +++ .../server/upgrade/UpgradeCatalog161Test.java| 3 +++ .../server/upgrade/UpgradeCatalog170Test.java| 3 +++ 9 files changed, 54 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1d54fefb/ambari-server/src/test/java/org/apache/ambari/server/checks/YarnTimelineServerStatePreservingCheckTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/checks/YarnTimelineServerStatePreservingCheckTest.java b/ambari-server/src/test/java/org/apache/ambari/server/checks/YarnTimelineServerStatePreservingCheckTest.java index 7469bbc..613e47f 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/checks/YarnTimelineServerStatePreservingCheckTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/checks/YarnTimelineServerStatePreservingCheckTest.java @@ -35,6 +35,7 @@ import org.apache.ambari.server.state.stack.PrerequisiteCheck; import org.apache.ambari.server.state.stack.UpgradePack.PrerequisiteCheckConfig; import org.junit.Assert; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.mockito.Mockito; @@ -42,7 +43,9 @@ import com.google.inject.Provider; /** * Tests for {@link YarnTimelineServerStatePreservingCheckTest} + * @Deprecated */ +@Ignore public class YarnTimelineServerStatePreservingCheckTest { private final Clusters m_clusters = Mockito.mock(Clusters.class); http://git-wip-us.apache.org/repos/asf/ambari/blob/1d54fefb/ambari-server/src/test/java/org/apache/ambari/server/security/SecurityFilterTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/SecurityFilterTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/SecurityFilterTest.java index 49eefed..c59e868 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/security/SecurityFilterTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/security/SecurityFilterTest.java @@ -21,17 +21,21 @@ package org.apache.ambari.server.security; import java.io.IOException; - +import com.google.inject.Binder; +import com.google.inject.Module; import org.apache.ambari.server.configuration.Configuration; -import org.apache.ambari.server.orm.InMemoryDefaultTestModule; +import org.apache.ambari.server.state.stack.OsFamily; import org.junit.Before; import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.mock.web.MockFilterChain; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletResponse; import static junit.framework.Assert.assertEquals; import static junit.framework.Assert.assertNull; +import static org.easymock.EasyMock.createNiceMock; import com.google.inject.Guice; import com.google.inject.Injector; @@ -42,10 +46,10 @@ public class SecurityFilterTest { @Before public void setUp() throws IOException { -injector = Guice.createInjector(new InMemoryDefaultTestModule()); +injector = Guice.createInjector(new MockModule()); SecurityFilter.init(injector.getInstance(Configuration.class)); } - + @Test public void mustFilterNonHttpsRequests() throws Exception { SecurityFilter filter = new SecurityFilter(); @@ -107,4 +111,11 @@ public class SecurityFilterTest { request.setScheme("https"); return request; } + + private class MockModule implements Module { +@Override +public void configure(Binder binder) { + binder.bind(OsFamily.class).toInstance(createNiceMock(OsFamily.class)); +} + } }
[05/20] ambari git commit: AMBARI-18562 Cannot update repository on the UI. (atkach)
AMBARI-18562 Cannot update repository on the UI. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/da7b2ae1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/da7b2ae1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/da7b2ae1 Branch: refs/heads/branch-dev-patch-upgrade Commit: da7b2ae1f72dc3e264e2ad0919fe6204de9d9b97 Parents: 24161ed Author: Andrii TkachAuthored: Mon Oct 10 16:44:35 2016 +0300 Committer: Andrii Tkach Committed: Mon Oct 10 18:42:54 2016 +0300 -- .../main/admin/stack_and_upgrade_controller.js | 56 .../admin/stack_and_upgrade_controller_test.js | 45 +++- 2 files changed, 66 insertions(+), 35 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/da7b2ae1/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js index 56a7a61..d00a652 100644 --- a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js +++ b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js @@ -1484,38 +1484,48 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage, if (os.get('isSelected')) { os.get('repositories').forEach(function (repo) { totalCalls++; -App.ajax.send({ - name: 'admin.stack_versions.validate.repo', - sender: this, - data: { -repo: repo, -repoId: repo.get('repoId'), -baseUrl: repo.get('baseUrl'), -osType: os.get('osType'), -stackName: App.get('currentStackName'), -stackVersion: stackVersionNumber - } +this.validationCall(repo, os, stackVersionNumber) +.success(function () { + totalCalls--; + if (totalCalls === 0) deferred.resolve(invalidUrls); }) - .success(function () { -totalCalls--; -if (totalCalls === 0) deferred.resolve(invalidUrls); - }) - .error(function () { -repo.set('hasError', true); -invalidUrls.push(repo); -totalCalls--; -if (totalCalls === 0) deferred.resolve(invalidUrls); - }); - }); +.error(function () { + repo.set('hasError', true); + invalidUrls.push(repo); + totalCalls--; + if (totalCalls === 0) deferred.resolve(invalidUrls); +}); + }, this); } else { return deferred.resolve(invalidUrls); } - }); + }, this); } return deferred.promise(); }, /** + * + * @param {Em.Object} repo + * @param {Em.Object} os + * @param {string} stackVersionNumber + */ + validationCall: function(repo, os, stackVersionNumber) { +return App.ajax.send({ + name: 'admin.stack_versions.validate.repo', + sender: this, + data: { +repo: repo, +repoId: repo.get('repoId'), +baseUrl: repo.get('baseUrl'), +osType: os.get('osType'), +stackName: App.get('currentStackName'), +stackVersion: stackVersionNumber + } +}) + }, + + /** * success callback for installRepoVersion() * saves request id to the db * @param data http://git-wip-us.apache.org/repos/asf/ambari/blob/da7b2ae1/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js -- diff --git a/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js b/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js index 12d0da3..be4a3b0 100644 --- a/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js +++ b/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js @@ -1404,24 +1404,45 @@ describe('App.MainAdminStackAndUpgradeController', function() { describe("#validateRepoVersions()", function () { -it("skip validation", function () { +beforeEach(function() { + sinon.stub(controller, 'validationCall').returns({ +success: function() { + return {error: Em.K} +} + }); + sinon.stub(controller, 'getStackVersionNumber').returns('v1') +}); + +afterEach(function() { + controller.validationCall.restore(); + controller.getStackVersionNumber.restore(); +}); + + +it("validationCall should
[01/20] ambari git commit: AMBARI-18563. Ambari startup script doesn't work on SUSE and potentially other OS's. (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-dev-patch-upgrade b31c6c285 -> 1cc090d56 AMBARI-18563. Ambari startup script doesn't work on SUSE and potentially other OS's. (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a80c5a2d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a80c5a2d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a80c5a2d Branch: refs/heads/branch-dev-patch-upgrade Commit: a80c5a2dbaa0c48f7df87dae6a23a027c2ab6022 Parents: 2d1d5f9 Author: Andrew OnishukAuthored: Mon Oct 10 17:52:36 2016 +0300 Committer: Andrew Onishuk Committed: Mon Oct 10 17:52:36 2016 +0300 -- ambari-server/conf/unix/install-helper.sh | 1 + ambari-server/sbin/ambari-server | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a80c5a2d/ambari-server/conf/unix/install-helper.sh -- diff --git a/ambari-server/conf/unix/install-helper.sh b/ambari-server/conf/unix/install-helper.sh index 229e146..34ec0e9 100644 --- a/ambari-server/conf/unix/install-helper.sh +++ b/ambari-server/conf/unix/install-helper.sh @@ -102,6 +102,7 @@ do_install(){ sed -i "s|ambari.root.dir\s*=\s*/|ambari.root.dir=${ROOT}|g" "$AMBARI_LOG4J" sed -i "s|root_dir\s*=\s*/|root_dir = ${ROOT}|g" "$CA_CONFIG" + sed -i "s|^ROOT=\"/\"$|ROOT=\"${ROOT}\"|g" "$AMBARI_SERVER_EXECUTABLE" AUTOSTART_SERVER_CMD="" which chkconfig > /dev/null 2>&1 http://git-wip-us.apache.org/repos/asf/ambari/blob/a80c5a2d/ambari-server/sbin/ambari-server -- diff --git a/ambari-server/sbin/ambari-server b/ambari-server/sbin/ambari-server index 762ae19..bdbdd0f 100755 --- a/ambari-server/sbin/ambari-server +++ b/ambari-server/sbin/ambari-server @@ -44,8 +44,10 @@ case "${1:-}" in esac SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -export ROOT=`dirname $(dirname $SCRIPT_DIR)` +# the below line (ROOT="/") is replaced by install-helper.sh. Don't edit/remove it. +ROOT="/" ROOT=`echo $ROOT | sed 's/\/$//'` +export ROOT export PATH=$ROOT/usr/lib/ambari-server/*:$PATH:/sbin/:/usr/sbin export AMBARI_CONF_DIR=$ROOT/etc/ambari-server/conf
[13/20] ambari git commit: AMBARI-18571 'HDFS Space Utilization' metric graph in HDFS service page is incorrect. (atkach)
AMBARI-18571 'HDFS Space Utilization' metric graph in HDFS service page is incorrect. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/95116386 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/95116386 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/95116386 Branch: refs/heads/branch-dev-patch-upgrade Commit: 9511638609f756cc70eaf0cca32a1cc55b40424c Parents: d2a926e Author: Andrii TkachAuthored: Tue Oct 11 20:25:07 2016 +0300 Committer: Andrii Tkach Committed: Wed Oct 12 12:10:55 2016 +0300 -- .../resources/stacks/HDP/2.3/services/HDFS/widgets.json | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/95116386/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/widgets.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/widgets.json b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/widgets.json index eeb9ff8..4a645b0 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/widgets.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/widgets.json @@ -378,8 +378,8 @@ "is_visible": true, "metrics": [ { - "name": "FSDatasetState.org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl.DfsUsed", - "metric_path": "metrics/dfs/datanode/DfsUsed", + "name": "FSDatasetState.org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl.Remaining", + "metric_path": "metrics/FSDatasetState/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl/Remaining", "service_name": "HDFS", "component_name": "DATANODE" }, @@ -393,7 +393,7 @@ "values": [ { "name": "HDFS Space Utilization", - "value": "${FSDatasetState.org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl.DfsUsed/FSDatasetState.org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl.Capacity}" + "value": "${(FSDatasetState.org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl.Capacity - FSDatasetState.org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl.Remaining)/FSDatasetState.org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl.Capacity}" } ], "properties": { @@ -620,8 +620,8 @@ "is_visible": false, "metrics": [ { - "name": "FSDatasetState.org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl.DfsUsed", - "metric_path": "metrics/dfs/datanode/DfsUsed", + "name": "FSDatasetState.org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl.Remaining", + "metric_path": "metrics/FSDatasetState/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl/Remaining", "service_name": "HDFS", "component_name": "DATANODE" }, @@ -635,7 +635,7 @@ "values": [ { "name": "HDFS Space Utilization", - "value": "${(FSDatasetState.org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl.DfsUsed/FSDatasetState.org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl.Capacity) * 100}" + "value": "${((FSDatasetState.org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl.Capacity - FSDatasetState.org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl.Remaining)/FSDatasetState.org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl.Capacity) * 100}" } ], "properties": {
[08/20] ambari git commit: AMBARI-18559 At "Add Service Wizard", when the installation is going on, if I click the close (X) on the wizard, the service will only get INSTALLED not STARTED. (Vivek Ratn
AMBARI-18559 At "Add Service Wizard", when the installation is going on, if I click the close (X) on the wizard, the service will only get INSTALLED not STARTED. (Vivek Ratnavel Subramanian via zhewang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6587fda4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6587fda4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6587fda4 Branch: refs/heads/branch-dev-patch-upgrade Commit: 6587fda470bcf063027e55b315292018dc1e64b4 Parents: 8f51c93 Author: Zhe (Joe) WangAuthored: Mon Oct 10 16:17:56 2016 -0700 Committer: Zhe (Joe) Wang Committed: Mon Oct 10 16:17:56 2016 -0700 -- ambari-web/app/messages.js | 1 + ambari-web/app/routes/add_service_routes.js | 24 2 files changed, 25 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6587fda4/ambari-web/app/messages.js -- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 5eafad2..7150081 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -2101,6 +2101,7 @@ Em.I18n.translations = { 'services.service.widgets.list-widget.nothingSelected': 'Nothing selected', 'services.add.header':'Add Service Wizard', + 'services.add.warning': 'Closing this dialog will continue to install the selected service(s) in the background, but the installed services need to be started manually. Are you sure you want to quit?', 'services.reassign.header':'Move Master Wizard', 'services.service.add':'Add Service', 'services.service.startAll':'Start All', http://git-wip-us.apache.org/repos/asf/ambari/blob/6587fda4/ambari-web/app/routes/add_service_routes.js -- diff --git a/ambari-web/app/routes/add_service_routes.js b/ambari-web/app/routes/add_service_routes.js index 30c8e07..692d186 100644 --- a/ambari-web/app/routes/add_service_routes.js +++ b/ambari-web/app/routes/add_service_routes.js @@ -46,6 +46,16 @@ module.exports = App.WizardRoute.extend({ App.router.transitionTo('main.services.index'); }, onClose: function () { +var controller = router.get('addServiceController'); +var currentStep = controller.get('currentStep'); +if(currentStep == '7') { + // Show a warning popup + this.showWarningPopup(); +} else { + this.afterWarning(); +} + }, + afterWarning: function () { this.set('showCloseButton', false); // prevent user to click "Close" many times App.router.get('updateController').set('isWorking', true); App.router.get('updateController').updateServices(function () { @@ -54,6 +64,20 @@ module.exports = App.WizardRoute.extend({ var exitPath = addServiceController.getDBProperty('onClosePath') || 'main.services.index'; addServiceController.resetOnClose(addServiceController, exitPath); }, + showWarningPopup: function() { +var mainPopupContext = this; +App.ModalPopup.show({ + encodeBody: false, + header: Em.I18n.t('common.warning'), + primaryClass: 'btn-warning', + secondary: Em.I18n.t('form.cancel'), + body: Em.I18n.t('services.add.warning'), + onPrimary: function () { +this.hide(); +mainPopupContext.afterWarning(); + } +}); + }, didInsertElement: function () { this._super(); this.fitHeight();
[19/20] ambari git commit: AMBARI-18576. When multiple requests are running, aborting any will incorrectly abort all requests instead the desired one (alejandro)
AMBARI-18576. When multiple requests are running, aborting any will incorrectly abort all requests instead the desired one (alejandro) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/21314666 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/21314666 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/21314666 Branch: refs/heads/branch-dev-patch-upgrade Commit: 2131466610b41af761fd1a105312c6553685c5ac Parents: 2709304 Author: Alejandro FernandezAuthored: Wed Oct 12 15:59:29 2016 -0700 Committer: Alejandro Fernandez Committed: Wed Oct 12 15:59:32 2016 -0700 -- .../ambari/server/actionmanager/ActionDBAccessor.java | 13 + .../server/actionmanager/ActionDBAccessorImpl.java| 14 ++ .../ambari/server/actionmanager/ActionScheduler.java | 4 ++-- .../org/apache/ambari/server/orm/dao/StageDAO.java| 10 ++ .../ambari/server/orm/entities/StageEntity.java | 5 - .../server/actionmanager/TestActionScheduler.java | 12 ++-- 6 files changed, 49 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/21314666/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java index 0e78cbc..8aef70d 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java @@ -86,6 +86,19 @@ public interface ActionDBAccessor { public List getStagesInProgress(); /** + * Returns all the pending stages in a request, including queued and not-queued. A stage is + * considered in progress if it is in progress for any host. + * + * The results will be sorted by stage ID making this call + * expensive in some scenarios. Use {@link #getCommandsInProgressCount()} in + * order to determine if there are stages that are in progress before getting + * the stages from this method. + * + * @see HostRoleStatus#IN_PROGRESS_STATUSES + */ + public List getStagesInProgressForRequest(Long requestId); + + /** * Gets the number of commands in progress. * * @return the number of commands in progress. http://git-wip-us.apache.org/repos/asf/ambari/blob/21314666/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java index c31ca7e..2c87583 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java @@ -270,10 +270,24 @@ public class ActionDBAccessorImpl implements ActionDBAccessor { */ @Override @Experimental(feature = ExperimentalFeature.PARALLEL_PROCESSING) + public List getStagesInProgressForRequest(Long requestId) { +List stageEntities = stageDAO.findByRequestIdAndCommandStatuses(requestId, HostRoleStatus.IN_PROGRESS_STATUSES); +return getStagesForEntities(stageEntities); + } + + /** + * {@inheritDoc} + */ + @Override + @Experimental(feature = ExperimentalFeature.PARALLEL_PROCESSING) public List getStagesInProgress() { List stageEntities = stageDAO.findByCommandStatuses( HostRoleStatus.IN_PROGRESS_STATUSES); +return getStagesForEntities(stageEntities); + } + @Experimental(feature = ExperimentalFeature.PARALLEL_PROCESSING) + private List getStagesForEntities(List stageEntities) { // experimentally enable parallel stage processing @Experimental(feature = ExperimentalFeature.PARALLEL_PROCESSING) boolean useConcurrentStageProcessing = configuration.isExperimentalConcurrentStageProcessingEnabled(); http://git-wip-us.apache.org/repos/asf/ambari/blob/21314666/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java index e380ae4..8cbfb1e 100644 ---
[02/20] ambari git commit: AMBARI-17311. Modify HTTP headers to follow best security practices (Sangeeta Ravindran via rlevas)
AMBARI-17311. Modify HTTP headers to follow best security practices (Sangeeta Ravindran via rlevas) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/34c5686c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/34c5686c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/34c5686c Branch: refs/heads/branch-dev-patch-upgrade Commit: 34c5686c3a0f80a5c7b78ddf05bb41cb13202438 Parents: a80c5a2 Author: Sangeeta RavindranAuthored: Mon Oct 10 11:05:40 2016 -0400 Committer: Robert Levas Committed: Mon Oct 10 11:09:58 2016 -0400 -- ambari-server/conf/unix/ambari.properties | 6 + ambari-server/conf/windows/ambari.properties| 6 + .../server/configuration/Configuration.java | 135 +++ .../security/AbstractSecurityHeaderFilter.java | 43 ++ .../AmbariServerSecurityHeaderFilter.java | 3 + .../AmbariViewsSecurityHeaderFilter.java| 3 + .../AbstractSecurityHeaderFilterTest.java | 38 +- .../AmbariServerSecurityHeaderFilterTest.java | 7 + .../AmbariViewsSecurityHeaderFilterTest.java| 6 + 9 files changed, 246 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/34c5686c/ambari-server/conf/unix/ambari.properties -- diff --git a/ambari-server/conf/unix/ambari.properties b/ambari-server/conf/unix/ambari.properties index 4dcbe99..371653f 100644 --- a/ambari-server/conf/unix/ambari.properties +++ b/ambari-server/conf/unix/ambari.properties @@ -113,11 +113,17 @@ rolling.upgrade.skip.packages.prefixes= http.strict-transport-security=max-age=31536000 http.x-xss-protection=1; mode=block http.x-frame-options=DENY +http.x-content-type-options=nosniff +http.cache-control=no-store +http.pragma=no-cache # HTTP Header settings for Ambari Views views.http.strict-transport-security=max-age=31536000 views.http.x-xss-protection=1; mode=block views.http.x-frame-options=SAMEORIGIN +views.http.x-content-type-options=nosniff +views.http.cache-control=no-store +views.http.pragma=no-cache mpacks.staging.path=$ROOT/var/lib/ambari-server/resources/mpacks http://git-wip-us.apache.org/repos/asf/ambari/blob/34c5686c/ambari-server/conf/windows/ambari.properties -- diff --git a/ambari-server/conf/windows/ambari.properties b/ambari-server/conf/windows/ambari.properties index 64cce3b..c1c0a99 100644 --- a/ambari-server/conf/windows/ambari.properties +++ b/ambari-server/conf/windows/ambari.properties @@ -93,10 +93,16 @@ ulimit.open.files=1 http.strict-transport-security=max-age=31536000 http.x-xss-protection=1; mode=block http.x-frame-options=DENY +http.x-content-type-options=nosniff +http.cache-control=no-store +http.pragma=no-cache # HTTP Header settings for Ambari Views views.http.strict-transport-security=max-age=31536000 views.http.x-xss-protection=1; mode=block views.http.x-frame-options=SAMEORIGIN +views.http.x-content-type-options=nosniff +views.http.cache-control=no-store +views.http.pragma=no-cache mpacks.staging.path=resources\\mpacks http://git-wip-us.apache.org/repos/asf/ambari/blob/34c5686c/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java index 2e850ef..e976f45 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java @@ -2182,6 +2182,27 @@ public class Configuration { "http.x-xss-protection", "1; mode=block"); /** + * The value that will be used to set the {@code X-Content-Type} HTTP response header. + */ + @Markdown(description = "The value that will be used to set the `X-CONTENT-TYPE` HTTP response header.") + public static final ConfigurationProperty HTTP_X_CONTENT_TYPE_HEADER_VALUE = new ConfigurationProperty<>( + "http.x-content-type-options", "nosniff"); + + /** + * The value that will be used to set the {@code Cache-Control} HTTP response header. + */ + @Markdown(description = "The value that will be used to set the `Cache-Control` HTTP response header.") + public static final ConfigurationProperty HTTP_CACHE_CONTROL_HEADER_VALUE = new ConfigurationProperty<>( + "http.cache-control", "no-store"); + + /** + * The value that will be used to set the {@code PRAGMA} HTTP response header. + */ +
[09/20] ambari git commit: AMBARI-18502: Logging of ambari agent scheduling activities in debug mode (Ranjan Banerjee via Nahappan Somasundaram)
AMBARI-18502: Logging of ambari agent scheduling activities in debug mode (Ranjan Banerjee via Nahappan Somasundaram) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3e4b368f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3e4b368f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3e4b368f Branch: refs/heads/branch-dev-patch-upgrade Commit: 3e4b368f9bde259b29d3a2e97fd84e773af434c3 Parents: 6587fda Author: Nahappan SomasundaramAuthored: Mon Oct 10 20:47:32 2016 -0700 Committer: Nahappan Somasundaram Committed: Mon Oct 10 20:47:32 2016 -0700 -- ambari-agent/src/main/python/ambari_agent/apscheduler/scheduler.py | 1 + ambari-agent/src/main/python/ambari_agent/apscheduler/threadpool.py | 1 + 2 files changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3e4b368f/ambari-agent/src/main/python/ambari_agent/apscheduler/scheduler.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/scheduler.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/scheduler.py index 35460b2..f787a2d 100644 --- a/ambari-agent/src/main/python/ambari_agent/apscheduler/scheduler.py +++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/scheduler.py @@ -544,6 +544,7 @@ class Scheduler(object): for job in tuple(jobstore.jobs): run_times = job.get_run_times(now) if run_times: +logger.debug('Scheduler submitting job %s to run', job.name) self._threadpool.submit(self._run_job, job, run_times) # Increase the job's run count http://git-wip-us.apache.org/repos/asf/ambari/blob/3e4b368f/ambari-agent/src/main/python/ambari_agent/apscheduler/threadpool.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/threadpool.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/threadpool.py index 6cd7ce2..cb19888 100644 --- a/ambari-agent/src/main/python/ambari_agent/apscheduler/threadpool.py +++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/threadpool.py @@ -83,6 +83,7 @@ class ThreadPool(object): break try: +logger.debug('Worker thread starting job %s', args[0]) func(*args, **kwargs) except: logger.exception('Error in worker thread')
[7/7] ambari git commit: Merge branch 'trunk' into branch-feature-AMBARI-18456
Merge branch 'trunk' into branch-feature-AMBARI-18456 Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a851d8f1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a851d8f1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a851d8f1 Branch: refs/heads/branch-feature-AMBARI-18456 Commit: a851d8f128b6ea5f1b247a931f48f35fdc35db2a Parents: 18c7412 2131466 Author: Jonathan HurleyAuthored: Thu Oct 13 08:31:03 2016 -0400 Committer: Jonathan Hurley Committed: Thu Oct 13 08:31:03 2016 -0400 -- ambari-server/conf/windows/ambari.properties| 1 + .../server/actionmanager/ActionDBAccessor.java | 13 +++ .../actionmanager/ActionDBAccessorImpl.java | 14 +++ .../server/actionmanager/ActionScheduler.java | 4 +- .../server/configuration/Configuration.java | 23 + .../ambari/server/controller/AmbariServer.java | 50 +++ .../apache/ambari/server/orm/dao/StageDAO.java | 10 +++ .../ambari/server/orm/entities/StageEntity.java | 5 +- .../0.1.0/package/scripts/metrics_grafana.py| 6 +- .../0.1.0/package/scripts/params_linux.py | 6 ++ .../stacks/HDP/2.5/upgrades/upgrade-2.5.xml | 2 +- .../actionmanager/TestActionScheduler.java | 12 +-- .../scheduler/ExecutionScheduleManagerTest.java | 90 ++-- .../server/upgrade/UpgradeCatalog221Test.java | 42 + .../AMBARI_METRICS/test_metrics_grafana.py | 5 +- .../2.0.6/configs/default_ams_embedded.json | 9 +- ambari-web/app/controllers/installer.js | 3 + ambari-web/app/views/wizard/step1_view.js | 8 +- 18 files changed, 223 insertions(+), 80 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a851d8f1/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java --
[2/7] ambari git commit: AMBARI-18579. Grafana fails to start after deployment (aonishuk)
AMBARI-18579. Grafana fails to start after deployment (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5d007e24 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5d007e24 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5d007e24 Branch: refs/heads/branch-feature-AMBARI-18456 Commit: 5d007e248e24e02d4d8c5c818a1125830370936c Parents: 82afd3a Author: Andrew OnishukAuthored: Wed Oct 12 20:12:27 2016 +0300 Committer: Andrew Onishuk Committed: Wed Oct 12 20:13:13 2016 +0300 -- .../AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana.py | 6 -- .../AMBARI_METRICS/0.1.0/package/scripts/params_linux.py| 6 ++ .../stacks/2.0.6/AMBARI_METRICS/test_metrics_grafana.py | 5 +++-- .../python/stacks/2.0.6/configs/default_ams_embedded.json | 9 +++-- 4 files changed, 20 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5d007e24/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana.py -- diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana.py index 542663f..606f119 100644 --- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana.py +++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana.py @@ -43,7 +43,8 @@ class AmsGrafana(Script): start_cmd = format("{ams_grafana_script} start") Execute(start_cmd, -user=params.ams_user +user=params.ams_user, +not_if = params.grafana_process_exists_cmd, ) # Create datasource create_ams_datasource() @@ -55,7 +56,8 @@ class AmsGrafana(Script): env.set_params(params) self.configure(env, action = 'stop') Execute((format("{ams_grafana_script}"), 'stop'), -sudo=True +sudo=True, +only_if = params.grafana_process_exists_cmd, ) def status(self, env): http://git-wip-us.apache.org/repos/asf/ambari/blob/5d007e24/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_linux.py index 58c7c1d..da399f7 100644 --- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_linux.py @@ -22,6 +22,7 @@ from resource_management.libraries.script.script import Script from resource_management.libraries.functions import conf_select from resource_management.libraries.functions.default import default from resource_management.libraries.functions.format import format +from resource_management.core.shell import as_user from ambari_commons import OSCheck from ambari_commons.constants import AMBARI_SUDO_BINARY from resource_management.libraries.functions.expect import expect @@ -34,6 +35,8 @@ ams_user = config['configurations']['ams-env']['ambari_metrics_user'] #RPM versioning support rpm_version = default("/configurations/hadoop-env/rpm_version", None) +ams_grafana_pid_dir = config['configurations']['ams-grafana-env']['metrics_grafana_pid_dir'] + #hadoop params if rpm_version is not None: #RPM versioning support @@ -56,3 +59,6 @@ dfs_type = default("/commandParams/dfs_type", "") hbase_regionserver_shutdown_timeout = expect('/configurations/ams-hbase-env/hbase_regionserver_shutdown_timeout', int, 30) + +grafana_pid_file = format("{ams_grafana_pid_dir}/grafana-server.pid") +grafana_process_exists_cmd = as_user(format("test -f {grafana_pid_file} && ps -p `cat {grafana_pid_file}`"), ams_user) http://git-wip-us.apache.org/repos/asf/ambari/blob/5d007e24/ambari-server/src/test/python/stacks/2.0.6/AMBARI_METRICS/test_metrics_grafana.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/AMBARI_METRICS/test_metrics_grafana.py b/ambari-server/src/test/python/stacks/2.0.6/AMBARI_METRICS/test_metrics_grafana.py index 2e24d82..9ac14c4 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/AMBARI_METRICS/test_metrics_grafana.py +++
[6/7] ambari git commit: AMBARI-18576. When multiple requests are running, aborting any will incorrectly abort all requests instead the desired one (alejandro)
AMBARI-18576. When multiple requests are running, aborting any will incorrectly abort all requests instead the desired one (alejandro) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/21314666 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/21314666 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/21314666 Branch: refs/heads/branch-feature-AMBARI-18456 Commit: 2131466610b41af761fd1a105312c6553685c5ac Parents: 2709304 Author: Alejandro FernandezAuthored: Wed Oct 12 15:59:29 2016 -0700 Committer: Alejandro Fernandez Committed: Wed Oct 12 15:59:32 2016 -0700 -- .../ambari/server/actionmanager/ActionDBAccessor.java | 13 + .../server/actionmanager/ActionDBAccessorImpl.java| 14 ++ .../ambari/server/actionmanager/ActionScheduler.java | 4 ++-- .../org/apache/ambari/server/orm/dao/StageDAO.java| 10 ++ .../ambari/server/orm/entities/StageEntity.java | 5 - .../server/actionmanager/TestActionScheduler.java | 12 ++-- 6 files changed, 49 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/21314666/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java index 0e78cbc..8aef70d 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java @@ -86,6 +86,19 @@ public interface ActionDBAccessor { public List getStagesInProgress(); /** + * Returns all the pending stages in a request, including queued and not-queued. A stage is + * considered in progress if it is in progress for any host. + * + * The results will be sorted by stage ID making this call + * expensive in some scenarios. Use {@link #getCommandsInProgressCount()} in + * order to determine if there are stages that are in progress before getting + * the stages from this method. + * + * @see HostRoleStatus#IN_PROGRESS_STATUSES + */ + public List getStagesInProgressForRequest(Long requestId); + + /** * Gets the number of commands in progress. * * @return the number of commands in progress. http://git-wip-us.apache.org/repos/asf/ambari/blob/21314666/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java index c31ca7e..2c87583 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java @@ -270,10 +270,24 @@ public class ActionDBAccessorImpl implements ActionDBAccessor { */ @Override @Experimental(feature = ExperimentalFeature.PARALLEL_PROCESSING) + public List getStagesInProgressForRequest(Long requestId) { +List stageEntities = stageDAO.findByRequestIdAndCommandStatuses(requestId, HostRoleStatus.IN_PROGRESS_STATUSES); +return getStagesForEntities(stageEntities); + } + + /** + * {@inheritDoc} + */ + @Override + @Experimental(feature = ExperimentalFeature.PARALLEL_PROCESSING) public List getStagesInProgress() { List stageEntities = stageDAO.findByCommandStatuses( HostRoleStatus.IN_PROGRESS_STATUSES); +return getStagesForEntities(stageEntities); + } + @Experimental(feature = ExperimentalFeature.PARALLEL_PROCESSING) + private List getStagesForEntities(List stageEntities) { // experimentally enable parallel stage processing @Experimental(feature = ExperimentalFeature.PARALLEL_PROCESSING) boolean useConcurrentStageProcessing = configuration.isExperimentalConcurrentStageProcessingEnabled(); http://git-wip-us.apache.org/repos/asf/ambari/blob/21314666/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java index e380ae4..8cbfb1e 100644 ---
[5/7] ambari git commit: AMBARI-18566 Installer wizard-> Select Versions page: Selecting Red Hat Satellite option and clicking next button makes wizard stuck (zhewang)
AMBARI-18566 Installer wizard-> Select Versions page: Selecting Red Hat Satellite option and clicking next button makes wizard stuck (zhewang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2709304c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2709304c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2709304c Branch: refs/heads/branch-feature-AMBARI-18456 Commit: 2709304c50a934679069c2ac63e1dfe64e7dfc3c Parents: 911deb7 Author: Zhe (Joe) WangAuthored: Wed Oct 12 13:50:01 2016 -0700 Committer: Zhe (Joe) Wang Committed: Wed Oct 12 13:51:34 2016 -0700 -- ambari-web/app/controllers/installer.js | 3 +++ ambari-web/app/views/wizard/step1_view.js | 8 +++- 2 files changed, 10 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2709304c/ambari-web/app/controllers/installer.js -- diff --git a/ambari-web/app/controllers/installer.js b/ambari-web/app/controllers/installer.js index f8f70a0..5493b3a 100644 --- a/ambari-web/app/controllers/installer.js +++ b/ambari-web/app/controllers/installer.js @@ -831,6 +831,9 @@ App.InstallerController = App.WizardController.extend({ return os.get('repositories.length'); }).reduce(Em.sum, 0)); var verifyBaseUrl = !wizardStep1Controller.get('skipValidationChecked') && !wizardStep1Controller.get('selectedStack.useRedhatSatellite'); + if (!verifyBaseUrl) { +dfd.resolve(); + } selectedStack.get('operatingSystems').forEach(function (os) { if (os.get('isSelected') && !os.get('isEmpty')) { os.get('repositories').forEach(function (repo) { http://git-wip-us.apache.org/repos/asf/ambari/blob/2709304c/ambari-web/app/views/wizard/step1_view.js -- diff --git a/ambari-web/app/views/wizard/step1_view.js b/ambari-web/app/views/wizard/step1_view.js index 2b80ad5..bfabc02 100644 --- a/ambari-web/app/views/wizard/step1_view.js +++ b/ambari-web/app/views/wizard/step1_view.js @@ -76,7 +76,13 @@ App.WizardStep1View = Em.View.extend({ * * @type {bool} */ - showWarning: Em.computed.or('invalidFormatUrlExist', 'isNoOsChecked', 'isNoOsFilled'), + warningExist: Em.computed.or('invalidFormatUrlExist', 'isNoOsChecked', 'isNoOsFilled'), + + skipVerifyBaseUrl: Em.computed.or('controller.selectedStack.skipValidationChecked', 'controller.selectedStack.useRedhatSatellite'), + + verifyBaseUrl: Em.computed.not('skipVerifyBaseUrl'), + + showWarning: Em.computed.and('warningExist', 'verifyBaseUrl'), /** * Onclick handler for recheck repos urls. Used in Advanced Repository Options.
[4/7] ambari git commit: AMBARI-18575. Fix for improving time taken by 'ExecutionScheduleManagerTest' and 'UpgradeCatalog221Test' java tests.
AMBARI-18575. Fix for improving time taken by 'ExecutionScheduleManagerTest' and 'UpgradeCatalog221Test' java tests. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/911deb74 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/911deb74 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/911deb74 Branch: refs/heads/branch-feature-AMBARI-18456 Commit: 911deb744485aa0366aad168c98566cf6381d4cc Parents: 60dc240 Author: Swapan ShridharAuthored: Tue Oct 11 16:09:00 2016 -0700 Committer: Swapan Shridhar Committed: Wed Oct 12 13:08:48 2016 -0700 -- .../scheduler/ExecutionScheduleManagerTest.java | 90 ++-- .../server/upgrade/UpgradeCatalog221Test.java | 42 + 2 files changed, 69 insertions(+), 63 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/911deb74/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionScheduleManagerTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionScheduleManagerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionScheduleManagerTest.java index f2fe3b8..0179486 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionScheduleManagerTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionScheduleManagerTest.java @@ -17,26 +17,16 @@ */ package org.apache.ambari.server.scheduler; -import static org.easymock.EasyMock.anyObject; -import static org.easymock.EasyMock.capture; -import static org.easymock.EasyMock.createMock; -import static org.easymock.EasyMock.createMockBuilder; -import static org.easymock.EasyMock.createNiceMock; -import static org.easymock.EasyMock.eq; -import static org.easymock.EasyMock.expect; -import static org.easymock.EasyMock.expectLastCall; -import static org.easymock.EasyMock.replay; -import static org.easymock.EasyMock.verify; -import static org.hamcrest.CoreMatchers.instanceOf; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; - -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - +import com.google.gson.Gson; +import com.google.inject.Binder; +import com.google.inject.Guice; +import com.google.inject.Inject; +import com.google.inject.Injector; +import com.google.inject.Module; +import com.google.inject.persist.PersistService; +import com.google.inject.persist.Transactional; +import com.google.inject.util.Modules; +import junit.framework.Assert; import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.actionmanager.ActionDBAccessor; import org.apache.ambari.server.actionmanager.HostRoleStatus; @@ -58,8 +48,8 @@ import org.apache.ambari.server.state.scheduler.RequestExecutionFactory; import org.apache.ambari.server.state.scheduler.Schedule; import org.easymock.Capture; import org.easymock.EasyMock; -import org.junit.After; -import org.junit.Before; +import org.junit.AfterClass; +import org.junit.BeforeClass; import org.junit.Test; import org.quartz.CronTrigger; import org.quartz.JobDataMap; @@ -76,34 +66,42 @@ import org.quartz.impl.matchers.GroupMatcher; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.google.gson.Gson; -import com.google.inject.Binder; -import com.google.inject.Guice; -import com.google.inject.Inject; -import com.google.inject.Injector; -import com.google.inject.Module; -import com.google.inject.persist.PersistService; -import com.google.inject.persist.Transactional; -import com.google.inject.util.Modules; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; -import junit.framework.Assert; +import static org.easymock.EasyMock.anyObject; +import static org.easymock.EasyMock.capture; +import static org.easymock.EasyMock.createMock; +import static org.easymock.EasyMock.createMockBuilder; +import static org.easymock.EasyMock.createNiceMock; +import static org.easymock.EasyMock.eq; +import static org.easymock.EasyMock.expect; +import static org.easymock.EasyMock.expectLastCall; +import static org.easymock.EasyMock.replay; +import static org.easymock.EasyMock.verify; +import static org.hamcrest.CoreMatchers.instanceOf; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; public class ExecutionScheduleManagerTest { - private Clusters clusters; - private Cluster cluster; - private String clusterName; - private Injector injector; - private AmbariMetaInfo metaInfo; - private ExecutionScheduleManager
[1/7] ambari git commit: AMBARI-18568. Hive shows restart indicator after RU (ncole)
Repository: ambari Updated Branches: refs/heads/branch-feature-AMBARI-18456 18c74125a -> a851d8f12 AMBARI-18568. Hive shows restart indicator after RU (ncole) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/82afd3a0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/82afd3a0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/82afd3a0 Branch: refs/heads/branch-feature-AMBARI-18456 Commit: 82afd3a0ff4dac37a8c56b914b37c1c9476c30ee Parents: 9511638 Author: Nate ColeAuthored: Tue Oct 11 17:08:05 2016 -0400 Committer: Nate Cole Committed: Wed Oct 12 10:36:03 2016 -0400 -- .../src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/82afd3a0/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml index 88d9b13..28b34a2 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml @@ -246,8 +246,8 @@ true false -HIVE_METASTORE HIVE_SERVER +HIVE_METASTORE HIVE_SERVER_INTERACTIVE WEBHCAT_SERVER
[3/7] ambari git commit: AMBARI-18543. Option to enable request/access logs in Ambari. (Amarnath reddy pappu via swagle)
AMBARI-18543. Option to enable request/access logs in Ambari. (Amarnath reddy pappu via swagle) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/60dc2402 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/60dc2402 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/60dc2402 Branch: refs/heads/branch-feature-AMBARI-18456 Commit: 60dc240216bf54f35dfb5d3fea823ccceee2c9a4 Parents: 5d007e2 Author: Siddharth WagleAuthored: Wed Oct 12 11:04:54 2016 -0700 Committer: Siddharth Wagle Committed: Wed Oct 12 11:04:54 2016 -0700 -- ambari-server/conf/windows/ambari.properties| 1 + .../server/configuration/Configuration.java | 23 + .../ambari/server/controller/AmbariServer.java | 50 3 files changed, 74 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/60dc2402/ambari-server/conf/windows/ambari.properties -- diff --git a/ambari-server/conf/windows/ambari.properties b/ambari-server/conf/windows/ambari.properties index c1c0a99..e47319e 100644 --- a/ambari-server/conf/windows/ambari.properties +++ b/ambari-server/conf/windows/ambari.properties @@ -51,6 +51,7 @@ server.execution.scheduler.maxThreads=5 server.execution.scheduler.maxDbConnections=5 server.execution.scheduler.misfire.toleration.minutes=480 + # Kerberos settings kerberos.keytab.cache.dir = data\\cache http://git-wip-us.apache.org/repos/asf/ambari/blob/60dc2402/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java index e976f45..378db18 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java @@ -1680,6 +1680,27 @@ public class Configuration { "server.tmp.dir", AmbariPath.getPath("/var/lib/ambari-server/tmp")); /** + * Request logs path . + */ + @Markdown(description = "The location on the Ambari Server where request logs can be created.") + public static final ConfigurationProperty REQUEST_LOGPATH = new ConfigurationProperty<>( + "server.requestlogs.path", null); + + /** + * The pattern of request logs . + */ + @Markdown(description = "The pattern of request log file name") + public static final ConfigurationProperty REQUEST_LOGNAMEPATTERN = new ConfigurationProperty<>( + "server.requestlogs.namepattern", "ambari-access-_mm_dd.log"); + + /** + * The number of days request logs can be retained. + */ + @Markdown(description = "The number of days that request log would be retained.") + public static final ConfigurationProperty REQUEST_LOG_RETAINDAYS = new ConfigurationProperty<>( + "server.requestlogs.retaindays", 15); + + /** * The time, in {@link TimeUnit#MILLISECONDS}, until an external script is killed. */ @Markdown(description = "The time, in milliseconds, until an external script is killed.") @@ -2566,6 +2587,8 @@ public class Configuration { configsMap.put(JAVA_HOME.getKey(), getProperty(JAVA_HOME)); configsMap.put(PARALLEL_STAGE_EXECUTION.getKey(), getProperty(PARALLEL_STAGE_EXECUTION)); configsMap.put(SERVER_TMP_DIR.getKey(), getProperty(SERVER_TMP_DIR)); +configsMap.put(REQUEST_LOGPATH.getKey(), getProperty(REQUEST_LOGPATH)); +configsMap.put(REQUEST_LOG_RETAINDAYS.getKey(), getProperty(REQUEST_LOG_RETAINDAYS)); configsMap.put(EXTERNAL_SCRIPT_TIMEOUT.getKey(), getProperty(EXTERNAL_SCRIPT_TIMEOUT)); configsMap.put(SHARED_RESOURCES_DIR.getKey(), getProperty(SHARED_RESOURCES_DIR)); configsMap.put(KDC_PORT.getKey(), getProperty(KDC_PORT)); http://git-wip-us.apache.org/repos/asf/ambari/blob/60dc2402/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java index 5e498f0..c05840e 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java @@ -124,12 +124,17 @@ import org.apache.ambari.server.view.AmbariViewsMDCLoggingFilter; import org.apache.ambari.server.view.ViewDirectoryWatcher; import