ambari git commit: AMBARI-21046. UI: Upgrades should be started using repo_version_ids instead of version strings (alexantonenko)
Repository: ambari Updated Branches: refs/heads/branch-feature-AMBARI-12556 0f266ed6a -> 560b0d194 AMBARI-21046. UI: Upgrades should be started using repo_version_ids instead of version strings (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/560b0d19 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/560b0d19 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/560b0d19 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: 560b0d1946cfd7d26419e995f9138a3a281b6602 Parents: 0f266ed Author: Alex AntonenkoAuthored: Wed May 17 19:24:44 2017 +0300 Committer: Jonathan Hurley Committed: Tue May 23 22:54:35 2017 -0400 -- .../controllers/main/admin/stack_and_upgrade_controller.js| 7 +-- ambari-web/app/utils/ajax/ajax.js | 2 +- .../main/admin/stack_and_upgrade_controller_test.js | 6 ++ 3 files changed, 12 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/560b0d19/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 d6829d9..a676f7429 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 @@ -414,7 +414,8 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage, if (currentVersion) { this.set('currentVersion', { repository_version: currentVersion.get('repositoryVersion.repositoryVersion'), -repository_name: currentVersion.get('repositoryVersion.displayName') +repository_name: currentVersion.get('repositoryVersion.displayName'), +id: currentVersion.get('repositoryVersion.id') }); } }, @@ -735,6 +736,7 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage, data: { value: currentVersion.repository_version, label: currentVersion.repository_name, +id: currentVersion.id, isDowngrade: true, upgradeType: this.get('upgradeType') }, @@ -1377,7 +1379,8 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage, label: version.get('displayName'), type: version.get('upgradeType'), skipComponentFailures: version.get('skipComponentFailures') ? 'true' : 'false', - skipSCFailures: version.get('skipSCFailures') ? 'true' : 'false' + skipSCFailures: version.get('skipSCFailures') ? 'true' : 'false', + id: version.get('id') }; if (App.get('supports.preUpgradeCheck')) { this.set('requestInProgress', true); http://git-wip-us.apache.org/repos/asf/ambari/blob/560b0d19/ambari-web/app/utils/ajax/ajax.js -- diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js index bf49b63..929214c 100644 --- a/ambari-web/app/utils/ajax/ajax.js +++ b/ambari-web/app/utils/ajax/ajax.js @@ -1712,7 +1712,7 @@ var urls = { timeout : 60, data: JSON.stringify({ "Upgrade": { -"repository_version": data.value, +"repository_version_id": data.id, "upgrade_type": data.type, "skip_failures": data.skipComponentFailures, "skip_service_check_failures": data.skipSCFailures, http://git-wip-us.apache.org/repos/asf/ambari/blob/560b0d19/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 81be6af..4585991 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 @@ -128,6 +128,7 @@ describe('App.MainAdminStackAndUpgradeController', function() { sinon.stub(App.StackVersion, 'find').returns([Em.Object.create({ state: 'CURRENT', repositoryVersion: { + id: '1', repositoryVersion: '2.2', displayName: 'HDP-2.2' } @@ -155,6 +156,7 @@ describe('App.MainAdminStackAndUpgradeController', function() { }); it('currentVersion is corrent', function () { expect(controller.get('currentVersion')).to.eql({ +"id": "1", "repository_version": "2.2",
[04/50] [abbrv] ambari git commit: AMBARI-21048. HDP 3.0 TP - create service definition for Storm with configs, kerberos, widgets, etc.(vbrodetsky)
http://git-wip-us.apache.org/repos/asf/ambari/blob/6ab4d28a/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/package/templates/config.yaml.j2 -- diff --git a/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/package/templates/config.yaml.j2 b/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/package/templates/config.yaml.j2 new file mode 100644 index 000..67b89c4 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/package/templates/config.yaml.j2 @@ -0,0 +1,75 @@ +# 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. + +nimbusHost: {{nimbus_host}} +nimbusPort: {{nimbus_port}} + +# HTTP-specific options. +http: + + # The port on which the HTTP server listens for service requests. + port: {{rest_api_port}} + + # The port on which the HTTP server listens for administrative requests. + adminPort: {{rest_api_admin_port}} + +{% if ganglia_installed %} +enableGanglia: {{ganglia_installed}} + +# ganglia configuration (necessary if ganglia reporting is enabled) +ganglia: + + # how often to report to ganglia metrics (in seconds) + reportInterval: {{ganglia_report_interval}} + + # the hostname of the gmond server where storm cluster metrics will be sent + host: "{{ganglia_server}}" + + # address mode + # default is MULTICAST + addressMode: "UNICAST" + + # an : pair to spoof + # this allows us to simulate storm cluster metrics coming from a specific host + #spoof: "192.168.1.1:storm" +{% endif %} + +{% if has_metric_collector and stack_supports_storm_ams %} +enableGanglia: False + +ganglia: + reportInterval: {{metric_collector_report_interval}} + +enableMetricsSink: True + +metrics_collector: + + reportInterval: {{metric_collector_report_interval}} + collector.hosts: "{{ams_collector_hosts}}" + protocol: "{{metric_collector_protocol}}" + port: "{{metric_collector_port}}" + appId: "{{metric_collector_app_id}}" + host_in_memory_aggregation = {{host_in_memory_aggregation}} + host_in_memory_aggregation_port = {{host_in_memory_aggregation_port}} + + # HTTPS settings + truststore.path : "{{metric_truststore_path}}" + truststore.type : "{{metric_truststore_type}}" + truststore.password : "{{metric_truststore_password}}" + + instanceId={{cluster_name}} + set.instanceId={{set_instanceId}} + +{% endif %} http://git-wip-us.apache.org/repos/asf/ambari/blob/6ab4d28a/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/package/templates/input.config-storm.json.j2 -- diff --git a/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/package/templates/input.config-storm.json.j2 b/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/package/templates/input.config-storm.json.j2 new file mode 100644 index 000..a2a4841 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/package/templates/input.config-storm.json.j2 @@ -0,0 +1,78 @@ +{# + # 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. + #} +{ + "input":[ +{ + "type":"storm_drpc", + "rowtype":"service", + "path":"{{default('/configurations/storm-env/storm_log_dir', '/var/log/storm')}}/drpc.log" +}, +{ + "type":"storm_logviewer", + "rowtype":"service", + "path":"{{default('/configurations/storm-env/storm_log_dir', '/var/log/storm')}}/logviewer.log" +
[49/50] [abbrv] ambari git commit: AMBARI-21064. HDP 3.0 TP - create Service Advisor for Oozie.(vbrodetskyi)
AMBARI-21064. HDP 3.0 TP - create Service Advisor for Oozie.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1c19200c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1c19200c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1c19200c Branch: refs/heads/branch-feature-AMBARI-12556 Commit: 1c19200cd446159fba94395867184d2d144c48c7 Parents: a2eefe8 Author: Vitaly BrodetskyiAuthored: Wed May 24 01:10:29 2017 +0300 Committer: Vitaly Brodetskyi Committed: Wed May 24 01:10:29 2017 +0300 -- .../OOZIE/4.2.0.3.0/service_advisor.py | 314 +++ 1 file changed, 314 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1c19200c/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.3.0/service_advisor.py -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.3.0/service_advisor.py b/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.3.0/service_advisor.py new file mode 100644 index 000..d1e2b77 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.3.0/service_advisor.py @@ -0,0 +1,314 @@ +#!/usr/bin/env ambari-python-wrap +""" +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. +""" + +# Python imports +import imp +import os +import traceback +import re +import socket +import fnmatch + + +from resource_management.core.logger import Logger + +SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) +STACKS_DIR = os.path.join(SCRIPT_DIR, '../../../stacks/') +PARENT_FILE = os.path.join(STACKS_DIR, 'service_advisor.py') + +try: + with open(PARENT_FILE, 'rb') as fp: +service_advisor = imp.load_module('service_advisor', fp, PARENT_FILE, ('.py', 'rb', imp.PY_SOURCE)) +except Exception as e: + traceback.print_exc() + print "Failed to load parent" + +class OozieServiceAdvisor(service_advisor.ServiceAdvisor): + + def __init__(self, *args, **kwargs): +self.as_super = super(OozieServiceAdvisor, self) +self.as_super.__init__(*args, **kwargs) + +# Always call these methods +self.modifyMastersWithMultipleInstances() +self.modifyCardinalitiesDict() +self.modifyHeapSizeProperties() +self.modifyNotValuableComponents() +self.modifyComponentsNotPreferableOnServer() +self.modifyComponentLayoutSchemes() + + def modifyMastersWithMultipleInstances(self): +""" +Modify the set of masters with multiple instances. +Must be overriden in child class. +""" +# Nothing to do +pass + + def modifyCardinalitiesDict(self): +""" +Modify the dictionary of cardinalities. +Must be overriden in child class. +""" +# Nothing to do +pass + + def modifyHeapSizeProperties(self): +""" +Modify the dictionary of heap size properties. +Must be overriden in child class. +""" +pass + + def modifyNotValuableComponents(self): +""" +Modify the set of components whose host assignment is based on other services. +Must be overriden in child class. +""" +# Nothing to do +pass + + def modifyComponentsNotPreferableOnServer(self): +""" +Modify the set of components that are not preferable on the server. +Must be overriden in child class. +""" +# Nothing to do +pass + + def modifyComponentLayoutSchemes(self): +""" +Modify layout scheme dictionaries for components. +The scheme dictionary basically maps the number of hosts to +host index where component should exist. +Must be overriden in child class. +""" +self.componentLayoutSchemes.update({ + 'OOZIE_SERVER': {6: 1, 31: 2, "else": 3}, + }) + + def getServiceComponentLayoutValidations(self, services, hosts): +""" +Get a list of errors. +Must be overriden in child class. +""" + +return [] + + def getServiceConfigurationRecommendations(self, configurations, clusterData, services, hosts): +""" +Entry point. +Must be
[41/50] [abbrv] ambari git commit: AMBARI-21029. Integrate SettingService with Swagger (adoroszlai)
AMBARI-21029. Integrate SettingService with Swagger (adoroszlai) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/51fc3cf7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/51fc3cf7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/51fc3cf7 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: 51fc3cf77302c7bc04ffb9fdbd53f053b053514f Parents: 0177263 Author: Attila DoroszlaiAuthored: Tue May 23 11:35:31 2017 +0200 Committer: Attila Doroszlai Committed: Tue May 23 11:35:31 2017 +0200 -- .../api/services/SettingRequestSwagger.java | 30 + .../server/api/services/SettingService.java | 126 --- .../server/controller/SettingRequest.java | 69 ++ .../server/controller/SettingResponse.java | 90 + .../internal/SettingResourceProvider.java | 64 ++ .../server/api/services/SettingServiceTest.java | 2 +- 6 files changed, 337 insertions(+), 44 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/51fc3cf7/ambari-server/src/main/java/org/apache/ambari/server/api/services/SettingRequestSwagger.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/SettingRequestSwagger.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/SettingRequestSwagger.java new file mode 100644 index 000..4e854a4 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/SettingRequestSwagger.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.ambari.server.api.services; + +import org.apache.ambari.server.controller.ApiModel; +import org.apache.ambari.server.controller.SettingRequest; +import org.apache.ambari.server.controller.internal.SettingResourceProvider; + +import io.swagger.annotations.ApiModelProperty; + +@SuppressWarnings("unused") // for Swagger +public interface SettingRequestSwagger extends ApiModel { + @ApiModelProperty(name = SettingResourceProvider.RESPONSE_KEY) + SettingRequest getSettingRequest(); +} http://git-wip-us.apache.org/repos/asf/ambari/blob/51fc3cf7/ambari-server/src/main/java/org/apache/ambari/server/api/services/SettingService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/SettingService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/SettingService.java index e186be2..b8da678 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/SettingService.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/SettingService.java @@ -1,4 +1,4 @@ -/** +/* * 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 @@ -29,18 +29,35 @@ import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.Context; import javax.ws.rs.core.HttpHeaders; +import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.ws.rs.core.UriInfo; import org.apache.ambari.server.api.resources.ResourceInstance; +import org.apache.ambari.server.controller.SettingResponse.SettingResponseWrapper; +import org.apache.ambari.server.controller.internal.SettingResourceProvider; import org.apache.ambari.server.controller.spi.Resource; +import org.apache.http.HttpStatus; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import io.swagger.annotations.ApiResponse; +import io.swagger.annotations.ApiResponses; /** * Service responsible for setting resource requests. */ -@Path("/settings/") +@Path("/settings")
[21/50] [abbrv] ambari git commit: AMBARI-21071. Ambari Infra Manager: add jobs/steps REST API endpoints (oleewere)
AMBARI-21071. Ambari Infra Manager: add jobs/steps REST API endpoints (oleewere) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9ffef7fc Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9ffef7fc Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9ffef7fc Branch: refs/heads/branch-feature-AMBARI-12556 Commit: 9ffef7fc58b4313dfdf8d96badce5198855934a7 Parents: c23602c Author: oleewereAuthored: Fri May 19 14:41:42 2017 +0200 Committer: oleewere Committed: Sat May 20 12:51:51 2017 +0200 -- .../org/apache/ambari/infra/InfraManager.java | 1 + .../conf/batch/InfraManagerBatchConfig.java | 55 .../apache/ambari/infra/manager/JobManager.java | 274 +++ .../infra/model/ExecutionContextResponse.java | 40 +++ .../ambari/infra/model/JobDetailsResponse.java | 53 .../model/JobExecutionDetailsResponse.java | 49 .../infra/model/JobExecutionInfoResponse.java | 141 ++ .../ambari/infra/model/JobExecutionRequest.java | 46 .../infra/model/JobExecutionRestartRequest.java | 52 .../infra/model/JobExecutionStopRequest.java| 50 .../infra/model/JobInstanceDetailsResponse.java | 54 .../infra/model/JobInstanceStartRequest.java| 49 .../ambari/infra/model/JobOperationParams.java | 31 +++ .../apache/ambari/infra/model/JobRequest.java | 37 +++ .../apache/ambari/infra/model/PageRequest.java | 49 .../model/StepExecutionContextResponse.java | 58 .../infra/model/StepExecutionInfoResponse.java | 115 .../model/StepExecutionProgressResponse.java| 53 .../infra/model/StepExecutionRequest.java | 49 .../infra/model/wrapper/JobExecutionData.java | 118 .../infra/model/wrapper/StepExecutionData.java | 133 + .../ambari/infra/rest/JobExceptionMapper.java | 110 .../apache/ambari/infra/rest/JobResource.java | 151 -- 23 files changed, 1748 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9ffef7fc/ambari-infra/ambari-infra-manager/src/main/java/org/apache/ambari/infra/InfraManager.java -- diff --git a/ambari-infra/ambari-infra-manager/src/main/java/org/apache/ambari/infra/InfraManager.java b/ambari-infra/ambari-infra-manager/src/main/java/org/apache/ambari/infra/InfraManager.java index 656127e..227bab4 100644 --- a/ambari-infra/ambari-infra-manager/src/main/java/org/apache/ambari/infra/InfraManager.java +++ b/ambari-infra/ambari-infra-manager/src/main/java/org/apache/ambari/infra/InfraManager.java @@ -142,6 +142,7 @@ public class InfraManager { ServletHolder jerseyServlet = context.addServlet(org.glassfish.jersey.servlet.ServletContainer.class, "/api/v1/*"); jerseyServlet.setInitOrder(1); jerseyServlet.setInitParameter("jersey.config.server.provider.packages","org.apache.ambari.infra.rest,io.swagger.jaxrs.listing"); + context.getSessionHandler().getSessionManager().setMaxInactiveInterval(SESSION_TIMEOUT); context.getSessionHandler().getSessionManager().getSessionCookieConfig().setName(INFRA_MANAGER_SESSION_ID); http://git-wip-us.apache.org/repos/asf/ambari/blob/9ffef7fc/ambari-infra/ambari-infra-manager/src/main/java/org/apache/ambari/infra/conf/batch/InfraManagerBatchConfig.java -- diff --git a/ambari-infra/ambari-infra-manager/src/main/java/org/apache/ambari/infra/conf/batch/InfraManagerBatchConfig.java b/ambari-infra/ambari-infra-manager/src/main/java/org/apache/ambari/infra/conf/batch/InfraManagerBatchConfig.java index 7310626..c3d8db6 100644 --- a/ambari-infra/ambari-infra-manager/src/main/java/org/apache/ambari/infra/conf/batch/InfraManagerBatchConfig.java +++ b/ambari-infra/ambari-infra-manager/src/main/java/org/apache/ambari/infra/conf/batch/InfraManagerBatchConfig.java @@ -21,6 +21,14 @@ package org.apache.ambari.infra.conf.batch; import org.apache.ambari.infra.job.dummy.DummyItemProcessor; import org.apache.ambari.infra.job.dummy.DummyItemWriter; import org.apache.ambari.infra.job.dummy.DummyObject; +import org.springframework.batch.admin.service.JdbcSearchableJobExecutionDao; +import org.springframework.batch.admin.service.JdbcSearchableJobInstanceDao; +import org.springframework.batch.admin.service.JdbcSearchableStepExecutionDao; +import org.springframework.batch.admin.service.JobService; +import org.springframework.batch.admin.service.SearchableJobExecutionDao; +import org.springframework.batch.admin.service.SearchableJobInstanceDao; +import org.springframework.batch.admin.service.SearchableStepExecutionDao; +import
[16/50] [abbrv] ambari git commit: AMBARI-21068 : Kafka broker goes down after Ambari upgrade from 2.5.0 to 2.5.1 due to missing 'kafka.timeline.metrics.instanceId' property. (dsen via avijayan)
AMBARI-21068 : Kafka broker goes down after Ambari upgrade from 2.5.0 to 2.5.1 due to missing 'kafka.timeline.metrics.instanceId' property. (dsen via avijayan) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c9f705de Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c9f705de Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c9f705de Branch: refs/heads/branch-feature-AMBARI-12556 Commit: c9f705de801aac16f7da4550bcd180ff56b8c685 Parents: ae40bed Author: Aravindan VijayanAuthored: Fri May 19 16:39:55 2017 -0700 Committer: Aravindan Vijayan Committed: Fri May 19 16:39:55 2017 -0700 -- .../org/apache/ambari/server/upgrade/UpgradeCatalog251.java | 1 + .../org/apache/ambari/server/upgrade/UpgradeCatalog251Test.java | 5 + 2 files changed, 6 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c9f705de/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog251.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog251.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog251.java index 5ed33a8..5e2eb16 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog251.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog251.java @@ -104,6 +104,7 @@ public class UpgradeCatalog251 extends AbstractUpgradeCatalog { */ @Override protected void executeDMLUpdates() throws AmbariException, SQLException { +addNewConfigurationsFromXml(); updateKAFKAConfigs(); } http://git-wip-us.apache.org/repos/asf/ambari/blob/c9f705de/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog251Test.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog251Test.java b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog251Test.java index d725ec4..fda5f0e 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog251Test.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog251Test.java @@ -179,11 +179,16 @@ public class UpgradeCatalog251Test { @Test public void testExecuteDMLUpdates() throws Exception { Method updateKAFKAConfigs = UpgradeCatalog251.class.getDeclaredMethod("updateKAFKAConfigs"); +Method addNewConfigurationsFromXml = AbstractUpgradeCatalog.class.getDeclaredMethod("addNewConfigurationsFromXml"); UpgradeCatalog251 upgradeCatalog251 = createMockBuilder(UpgradeCatalog251.class) .addMockedMethod(updateKAFKAConfigs) +.addMockedMethod(addNewConfigurationsFromXml) .createMock(); +upgradeCatalog251.addNewConfigurationsFromXml(); +expectLastCall().once(); + Field field = AbstractUpgradeCatalog.class.getDeclaredField("dbAccessor"); field.set(upgradeCatalog251, dbAccessor);
[43/50] [abbrv] ambari git commit: Merge remote-tracking branch 'origin/trunk' into ambari-rest-api-explorer
Merge remote-tracking branch 'origin/trunk' into ambari-rest-api-explorer Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/651bdcbd Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/651bdcbd Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/651bdcbd Branch: refs/heads/branch-feature-AMBARI-12556 Commit: 651bdcbdf86c8addace33b1f9bac066633296106 Parents: 51fc3cf 7c92953 Author: Attila DoroszlaiAuthored: Tue May 23 11:52:00 2017 +0200 Committer: Attila Doroszlai Committed: Tue May 23 11:52:00 2017 +0200 -- .../clusters/ClustersManageAccessCtrl.js|2 +- .../stackVersions/StackVersionsCreateCtrl.js| 19 + .../stackVersions/StackVersionsEditCtrl.js | 102 +- .../ui/admin-web/app/scripts/i18n.config.js |2 +- .../ui/admin-web/app/scripts/services/Stack.js |3 +- .../resources/ui/admin-web/app/views/main.html | 50 +- .../views/stackVersions/stackVersionPage.html |3 +- .../ui/admin-web/app/views/users/create.html|2 +- ambari-agent/conf/unix/install-helper.sh|3 +- ambari-agent/pom.xml|1 + .../src/main/python/ambari_agent/ActionQueue.py |9 +- .../main/python/ambari_agent/AmbariConfig.py| 83 +- .../src/main/python/ambari_agent/Controller.py | 18 +- .../ambari_agent/CustomServiceOrchestrator.py | 38 +- .../src/main/python/ambari_agent/Hardware.py|2 + .../src/main/python/ambari_agent/HostInfo.py| 15 +- .../src/main/python/ambari_agent/NetUtil.py |5 +- .../ambari_agent/StatusCommandsExecutor.py | 279 +- .../python/ambari_agent/alerts/web_alert.py |5 +- .../src/main/python/ambari_agent/hostname.py|8 + ambari-agent/src/packages/tarball/all.xml | 11 +- .../test/python/ambari_agent/TestActionQueue.py | 13 +- .../test/python/ambari_agent/TestController.py | 14 + .../TestCustomServiceOrchestrator.py| 51 - .../test/python/ambari_agent/TestHardware.py|4 +- .../src/test/python/ambari_agent/TestShell.py |2 +- .../python/resource_management/TestScript.py| 56 +- .../main/python/ambari_commons/inet_utils.py| 43 +- .../src/main/python/ambari_commons/network.py | 20 +- .../libraries/functions/conf_select.py | 13 +- .../libraries/functions/curl_krb_request.py | 17 +- .../libraries/functions/decorator.py| 23 +- .../libraries/functions/jmx.py |7 +- .../libraries/functions/namenode_ha_utils.py|6 +- .../functions/setup_ranger_plugin_xml.py| 26 +- .../libraries/functions/version_select_util.py | 40 + .../libraries/script/script.py | 171 +- .../HIVE/package/scripts/mysql_service.py |5 + ambari-infra/.gitignore |6 + ambari-infra/ambari-infra-assembly/pom.xml | 91 + .../src/main/package/deb/manager/control| 22 + .../src/main/package/deb/manager/postinst | 15 + .../src/main/package/deb/manager/postrm | 15 + .../src/main/package/deb/manager/preinst| 15 + .../src/main/package/deb/manager/prerm | 15 + ambari-infra/ambari-infra-manager/README.md | 31 + ambari-infra/ambari-infra-manager/build.xml | 54 + .../ambari-infra-manager/docker/Dockerfile | 52 + .../ambari-infra-manager/docker/bin/start.sh| 21 + .../docker/infra-manager-docker.sh | 85 + ambari-infra/ambari-infra-manager/pom.xml | 431 ++ .../org/apache/ambari/infra/InfraManager.java | 186 + .../infra/common/InfraManagerConstants.java | 29 + .../infra/conf/InfraManagerApiDocConfig.java| 54 + .../ambari/infra/conf/InfraManagerConfig.java | 36 + .../conf/batch/InfraManagerBatchConfig.java | 282 + .../infra/job/dummy/DummyItemProcessor.java | 36 + .../ambari/infra/job/dummy/DummyItemWriter.java | 36 + .../ambari/infra/job/dummy/DummyObject.java | 40 + .../apache/ambari/infra/manager/JobManager.java | 274 + .../infra/model/ExecutionContextResponse.java | 40 + .../ambari/infra/model/JobDetailsResponse.java | 53 + .../model/JobExecutionDetailsResponse.java | 49 + .../infra/model/JobExecutionInfoResponse.java | 141 + .../ambari/infra/model/JobExecutionRequest.java | 46 + .../infra/model/JobExecutionRestartRequest.java | 52 + .../infra/model/JobExecutionStopRequest.java| 50 + .../infra/model/JobInstanceDetailsResponse.java | 54 + .../infra/model/JobInstanceStartRequest.java| 49 + .../ambari/infra/model/JobOperationParams.java | 31 + .../apache/ambari/infra/model/JobRequest.java | 37 + .../apache/ambari/infra/model/PageRequest.java | 49 + .../model/StepExecutionContextResponse.java | 58 +
[05/50] [abbrv] ambari git commit: AMBARI-21048. HDP 3.0 TP - create service definition for Storm with configs, kerberos, widgets, etc.(vbrodetsky)
http://git-wip-us.apache.org/repos/asf/ambari/blob/6ab4d28a/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/package/scripts/params_linux.py new file mode 100644 index 000..78ec165 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/package/scripts/params_linux.py @@ -0,0 +1,424 @@ +#!/usr/bin/env python +""" +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. + +""" +import os +import re +import ambari_simplejson as json # simplejson is much faster comparing to Python 2.6 json module and has the same functions set. + +import status_params + +from ambari_commons.constants import AMBARI_SUDO_BINARY +from ambari_commons import yaml_utils +from resource_management.libraries.functions import format +from resource_management.libraries.functions.default import default +from resource_management.libraries.functions.get_bare_principal import get_bare_principal +from resource_management.libraries.script import Script +from resource_management.libraries.resources.hdfs_resource import HdfsResource +from resource_management.libraries.functions import stack_select +from resource_management.libraries.functions import conf_select +from resource_management.libraries.functions import get_kinit_path +from resource_management.libraries.functions.get_not_managed_resources import get_not_managed_resources +from resource_management.libraries.functions.stack_features import check_stack_feature +from resource_management.libraries.functions.stack_features import get_stack_feature_version +from resource_management.libraries.functions import StackFeature +from resource_management.libraries.functions.expect import expect +from resource_management.libraries.functions.setup_atlas_hook import has_atlas_in_cluster +from resource_management.libraries.functions import is_empty +from ambari_commons.ambari_metrics_helper import select_metric_collector_hosts_from_hostnames +from resource_management.libraries.functions.setup_ranger_plugin_xml import get_audit_configs, generate_ranger_service_config + +# server configurations +config = Script.get_config() +tmp_dir = Script.get_tmp_dir() +stack_root = status_params.stack_root +sudo = AMBARI_SUDO_BINARY + +limits_conf_dir = "/etc/security/limits.d" + +# Needed since this is an Atlas Hook service. +cluster_name = config['clusterName'] + +stack_name = status_params.stack_name +upgrade_direction = default("/commandParams/upgrade_direction", None) +version = default("/commandParams/version", None) + +agent_stack_retry_on_unavailability = config['hostLevelParams']['agent_stack_retry_on_unavailability'] +agent_stack_retry_count = expect("/hostLevelParams/agent_stack_retry_count", int) + +storm_component_home_dir = status_params.storm_component_home_dir +conf_dir = status_params.conf_dir + +stack_version_unformatted = status_params.stack_version_unformatted +stack_version_formatted = status_params.stack_version_formatted +stack_supports_ru = stack_version_formatted and check_stack_feature(StackFeature.ROLLING_UPGRADE, stack_version_formatted) +stack_supports_storm_kerberos = stack_version_formatted and check_stack_feature(StackFeature.STORM_KERBEROS, stack_version_formatted) +stack_supports_storm_ams = stack_version_formatted and check_stack_feature(StackFeature.STORM_AMS, stack_version_formatted) +stack_supports_core_site_for_ranger_plugin = check_stack_feature(StackFeature.CORE_SITE_FOR_RANGER_PLUGINS_SUPPORT, stack_version_formatted) + +# get the correct version to use for checking stack features +version_for_stack_feature_checks = get_stack_feature_version(config) + +stack_supports_ranger_kerberos = check_stack_feature(StackFeature.RANGER_KERBEROS_SUPPORT, version_for_stack_feature_checks) +stack_supports_ranger_audit_db = check_stack_feature(StackFeature.RANGER_AUDIT_DB_SUPPORT, version_for_stack_feature_checks) + +# default hadoop params +rest_lib_dir = "/usr/lib/storm/contrib/storm-rest" +storm_bin_dir = "/usr/bin" +storm_lib_dir =
[47/50] [abbrv] ambari git commit: AMBARI-21052: Regex pattern for version number in Register Version UI should depend on stack's version dir (sangeetar)
AMBARI-21052: Regex pattern for version number in Register Version UI should depend on stack's version dir (sangeetar) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b5fdb57c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b5fdb57c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b5fdb57c Branch: refs/heads/branch-feature-AMBARI-12556 Commit: b5fdb57c5173cbf241782e9daa6dee4f4dc63c3c Parents: cd769e2 Author: Sangeeta RavindranAuthored: Tue May 23 14:02:10 2017 -0700 Committer: Sangeeta Ravindran Committed: Tue May 23 14:02:10 2017 -0700 -- .../stackVersions/StackVersionsCreateCtrl.js| 1 - .../ui/admin-web/app/scripts/i18n.config.js | 2 +- .../ui/admin-web/app/scripts/services/Stack.js | 32 +++- .../views/stackVersions/stackVersionPage.html | 4 +-- .../StackVersionsCreateCtrl_test.js | 6 ++-- 5 files changed, 37 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b5fdb57c/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js index 69c35c0..70f6658 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js @@ -34,7 +34,6 @@ angular.module('ambariAdminConsole') $scope.useRedhatSatellite = false; $scope.clusterName = $routeParams.clusterName; - $scope.subversionPattern = /^\d+\.\d+(-\d+)?$/; $scope.upgradeStack = { stack_name: '', stack_version: '', http://git-wip-us.apache.org/repos/asf/ambari/blob/b5fdb57c/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js index fd2c6e5..43b32da 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js @@ -374,7 +374,7 @@ angular.module('ambariAdminConsole') 'versions.deregister': 'Deregister Version', 'versions.deregisterConfirmation': 'Are you sure you want to deregister version {{versionName}} ?', -'versions.placeholder': 'Version Number (0.0)', +'versions.placeholder': 'Version Number {{pattern}}', 'versions.repos': 'Repositories', 'versions.os': 'OS', 'versions.baseURL': 'Base URL', http://git-wip-us.apache.org/repos/asf/ambari/blob/b5fdb57c/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js index b496987..a203b5c 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js @@ -88,6 +88,7 @@ angular.module('ambariAdminConsole') }, allPublicStackVersions: function() { + var self = this; var url = '/version_definitions?fields=VersionDefinition/stack_default,VersionDefinition/stack_repo_update_link_exists,operating_systems/repositories/Repositories/*,VersionDefinition/stack_services,VersionDefinition/repository_version' + '/show_available=true'; var deferred = $q.defer(); @@ -104,7 +105,6 @@ angular.module('ambariAdminConsole') stackNameVersion: version.VersionDefinition.stack_name + '-' + version.VersionDefinition.stack_version, displayName: version.VersionDefinition.stack_name + '-' + version.VersionDefinition.repository_version.split('-')[0], //HDP-2.3.4.0 displayNameFull: version.VersionDefinition.stack_name + '-' + version.VersionDefinition.repository_version, //HDP-2.3.4.0-23 - editableDisplayName: version.VersionDefinition.repository_version.substring(4), isNonXMLdata: true, repositoryVersion: version.VersionDefinition.repository_version, stackNameRepositoryVersion: version.VersionDefinition.stack_name + '-' +
[45/50] [abbrv] ambari git commit: AMBARI-21087. Infra manger: Add static data folder servlet endpoint (oleewere)
AMBARI-21087. Infra manger: Add static data folder servlet endpoint (oleewere) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4fcdaae4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4fcdaae4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4fcdaae4 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: 4fcdaae4ce7788620d9b6146dfaef10ad1e7c60e Parents: 0d68810 Author: oleewereAuthored: Mon May 22 13:54:06 2017 +0200 Committer: oleewere Committed: Tue May 23 12:49:25 2017 +0200 -- .../org/apache/ambari/infra/InfraManager.java | 29 ++-- .../infra/common/InfraManagerConstants.java | 2 ++ 2 files changed, 28 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4fcdaae4/ambari-infra/ambari-infra-manager/src/main/java/org/apache/ambari/infra/InfraManager.java -- diff --git a/ambari-infra/ambari-infra-manager/src/main/java/org/apache/ambari/infra/InfraManager.java b/ambari-infra/ambari-infra-manager/src/main/java/org/apache/ambari/infra/InfraManager.java index 227bab4..186f98c 100644 --- a/ambari-infra/ambari-infra-manager/src/main/java/org/apache/ambari/infra/InfraManager.java +++ b/ambari-infra/ambari-infra-manager/src/main/java/org/apache/ambari/infra/InfraManager.java @@ -32,6 +32,7 @@ import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.server.handler.HandlerList; import org.eclipse.jetty.server.handler.ResourceHandler; +import org.eclipse.jetty.servlet.DefaultServlet; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; import org.eclipse.jetty.util.resource.Resource; @@ -48,6 +49,8 @@ import java.net.URI; import java.net.URISyntaxException; import java.net.URL; +import static org.apache.ambari.infra.common.InfraManagerConstants.DATA_FOLDER_LOCATION_PARAM; +import static org.apache.ambari.infra.common.InfraManagerConstants.DEFAULT_DATA_FOLDER_LOCATION; import static org.apache.ambari.infra.common.InfraManagerConstants.DEFAULT_PORT; import static org.apache.ambari.infra.common.InfraManagerConstants.DEFAULT_PROTOCOL; import static org.apache.ambari.infra.common.InfraManagerConstants.INFRA_MANAGER_SESSION_ID; @@ -78,6 +81,13 @@ public class InfraManager { .argName("port_number") .build(); +final Option dataFolderOption = Option.builder("df") + .longOpt("data-folder") + .desc("Infra Manager data folder location") + .numberOfArgs(1) + .argName("data_folder") + .build(); + final Option protocolOption = Option.builder("t") .longOpt("tls-enabled") .desc("TLS enabled for Infra Manager") @@ -86,17 +96,21 @@ public class InfraManager { options.addOption(helpOption); options.addOption(portOption); options.addOption(protocolOption); +options.addOption(dataFolderOption); try { CommandLineParser cmdLineParser = new DefaultParser(); CommandLine cli = cmdLineParser.parse(options, args); int port = cli.hasOption('p') ? Integer.parseInt(cli.getOptionValue('p')) : DEFAULT_PORT; String protocol = cli.hasOption("t") ? PROTOCOL_SSL : DEFAULT_PROTOCOL; + String dataFolder = cli.hasOption("df") ? cli.getOptionValue("df"): DEFAULT_DATA_FOLDER_LOCATION; + + System.setProperty(DATA_FOLDER_LOCATION_PARAM, dataFolder); // be able to access it from jobs Server server = buildServer(port, protocol); HandlerList handlers = new HandlerList(); handlers.addHandler(createSwaggerContext()); - handlers.addHandler(createBaseWebappContext()); + handlers.addHandler(createBaseWebappContext(dataFolder)); server.setHandler(handlers); server.start(); @@ -124,13 +138,22 @@ public class InfraManager { return server; } - private static WebAppContext createBaseWebappContext() throws MalformedURLException { + private static WebAppContext createBaseWebappContext(String dataFolder) throws MalformedURLException { URI webResourceBase = findWebResourceBase(); WebAppContext context = new WebAppContext(); -context.setBaseResource(Resource.newResource(webResourceBase)); +ResourceCollection resources = new ResourceCollection(Resource.newResource(webResourceBase)); +context.setBaseResource(resources); context.setContextPath(ROOT_CONTEXT); context.setParentLoaderPriority(true); +// Data folder servlet +ServletHolder dataServlet = new ServletHolder("static-data", DefaultServlet.class); +dataServlet.setInitParameter("dirAllowed","true"); +dataServlet.setInitParameter("pathInfoOnly","true"); +
[20/50] [abbrv] ambari git commit: AMBARI-21080. Update shuffle timeout settings for hdp stack. (sseth via Swapan Shridhar).
AMBARI-21080. Update shuffle timeout settings for hdp stack. (sseth via Swapan Shridhar). Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c23602c9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c23602c9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c23602c9 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: c23602c9f0412bba8375e7f8f28f05c970e04159 Parents: 55af336 Author: Swapan ShridharAuthored: Sat May 20 01:01:07 2017 -0700 Committer: Swapan Shridhar Committed: Sat May 20 01:01:07 2017 -0700 -- .../stacks/HDP/2.5/upgrades/config-upgrade.xml | 2 ++ .../HIVE/configuration/tez-interactive-site.xml | 12 2 files changed, 14 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c23602c9/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml index 88b8a35..a29f74b 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml @@ -495,6 +495,8 @@ + + http://git-wip-us.apache.org/repos/asf/ambari/blob/c23602c9/ambari-server/src/main/resources/stacks/HDP/2.6/services/HIVE/configuration/tez-interactive-site.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/services/HIVE/configuration/tez-interactive-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.6/services/HIVE/configuration/tez-interactive-site.xml index 6752d65..2c9b272 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/HIVE/configuration/tez-interactive-site.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/HIVE/configuration/tez-interactive-site.xml @@ -126,5 +126,17 @@ Whether rescheduled tasks should be treated at higher priority + +tez.runtime.shuffle.connect.timeout +3 +Shuffle connect timeouts (ms) + + + +tez.runtime.shuffle.read.timeout +3 +Shuffle read timeout (ms) + +
[29/50] [abbrv] ambari git commit: AMBARI-21067. Atlas config values not getting populated on BP cluster install with strategy : NEVER_APPLY (magyari_sandor)
AMBARI-21067. Atlas config values not getting populated on BP cluster install with strategy : NEVER_APPLY (magyari_sandor) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/74972de5 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/74972de5 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/74972de5 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: 74972de559b21633288c03785dc672e792a172bb Parents: fd4a7a4 Author: Sandor MagyariAuthored: Fri May 19 09:06:24 2017 +0200 Committer: Sandor Magyari Committed: Mon May 22 14:27:38 2017 +0200 -- .../0.7.0.2.5/configuration/application-properties.xml| 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/74972de5/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.2.5/configuration/application-properties.xml -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.2.5/configuration/application-properties.xml b/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.2.5/configuration/application-properties.xml index 70af02c..f34d8be 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.2.5/configuration/application-properties.xml +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.2.5/configuration/application-properties.xml @@ -24,7 +24,7 @@ atlas.audit.hbase.zookeeper.quorum - +localhost @@ -38,7 +38,7 @@ atlas.graph.storage.hostname - +localhost @@ -66,7 +66,7 @@ atlas.graph.index.search.solr.zookeeper-url - +localhost:2181/infra-solr The ZooKeeper quorum setup for Solr as comma separated value. @@ -145,7 +145,7 @@ atlas.kafka.bootstrap.servers - +localhost:6667 Comma separated list of Kafka broker endpoints in host:port form @@ -157,7 +157,7 @@ atlas.kafka.zookeeper.connect - +localhost:2181 Comma separated list of servers forming Zookeeper quorum used by Kafka.
[37/50] [abbrv] ambari git commit: AMBARI-20812. Hive view 1.5 does not work in Safari8 and IE11 (pallavkul)
AMBARI-20812. Hive view 1.5 does not work in Safari8 and IE11 (pallavkul) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/32501f68 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/32501f68 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/32501f68 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: 32501f68e6ecda58bf3a6eef4be10264d0bd0669 Parents: 201677b Author: pallavkulAuthored: Tue May 23 12:27:34 2017 +0530 Committer: pallavkul Committed: Tue May 23 12:27:34 2017 +0530 -- .../src/main/resources/ui/hive-web/Brocfile.js | 1 + .../ui/hive-web/vendor/browser-pollyfills.js| 213 +++ 2 files changed, 214 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/32501f68/contrib/views/hive-next/src/main/resources/ui/hive-web/Brocfile.js -- diff --git a/contrib/views/hive-next/src/main/resources/ui/hive-web/Brocfile.js b/contrib/views/hive-next/src/main/resources/ui/hive-web/Brocfile.js index 318d1f8..791c88d 100644 --- a/contrib/views/hive-next/src/main/resources/ui/hive-web/Brocfile.js +++ b/contrib/views/hive-next/src/main/resources/ui/hive-web/Brocfile.js @@ -50,5 +50,6 @@ app.import('vendor/codemirror/show-hint.js'); app.import('vendor/codemirror/codemirror.css'); app.import('vendor/codemirror/show-hint.css'); app.import('vendor/dagre.min.js'); +app.import('vendor/browser-pollyfills.js'); module.exports = app.toTree(); http://git-wip-us.apache.org/repos/asf/ambari/blob/32501f68/contrib/views/hive-next/src/main/resources/ui/hive-web/vendor/browser-pollyfills.js -- diff --git a/contrib/views/hive-next/src/main/resources/ui/hive-web/vendor/browser-pollyfills.js b/contrib/views/hive-next/src/main/resources/ui/hive-web/vendor/browser-pollyfills.js new file mode 100644 index 000..88a59c1 --- /dev/null +++ b/contrib/views/hive-next/src/main/resources/ui/hive-web/vendor/browser-pollyfills.js @@ -0,0 +1,213 @@ +/** + * 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. + */ + + +if (!String.prototype.startsWith) { + String.prototype.startsWith = function (searchString, position) { +position = position || 0; +return this.substr(position, searchString.length) === searchString; + }; +} + +if (!String.prototype.endsWith) { + String.prototype.endsWith = function (searchString, position) { +var subjectString = this.toString(); +if (typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > subjectString.length) { + position = subjectString.length; +} +position -= searchString.length; +var lastIndex = subjectString.lastIndexOf(searchString, position); +return lastIndex !== -1 && lastIndex === position; + }; +} + +if (typeof Object.assign != 'function') { + Object.assign = function (target, varArgs) { // .length of function is 2 +'use strict'; +if (target == null) { // TypeError if undefined or null + throw new TypeError('Cannot convert undefined or null to object'); +} + +var to = Object(target); + +for (var index = 1; index < arguments.length; index++) { + var nextSource = arguments[index]; + + if (nextSource != null) { // Skip over if undefined or null +for (var nextKey in nextSource) { + // Avoid bugs when hasOwnProperty is shadowed + if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { +to[nextKey] = nextSource[nextKey]; + } +} + } +} +return to; + }; +} + + +if (!Array.from) { + Array.from = (function () { +var toStr = Object.prototype.toString; +var isCallable = function (fn) { + return typeof fn === 'function' || toStr.call(fn) === '[object Function]'; +}; +var toInteger = function (value) { + var number = Number(value); + if (isNaN(number)) { +return 0; + } +
[17/50] [abbrv] ambari git commit: AMBARI-21068 : Kafka broker goes down after Ambari upgrade from 2.5.0 to 2.5.1 due to missing 'kafka.timeline.metrics.instanceId' property. (Addendum Patch) (avijaya
AMBARI-21068 : Kafka broker goes down after Ambari upgrade from 2.5.0 to 2.5.1 due to missing 'kafka.timeline.metrics.instanceId' property. (Addendum Patch) (avijayan) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d740384e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d740384e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d740384e Branch: refs/heads/branch-feature-AMBARI-12556 Commit: d740384e8059d9d7b12d7ae99e7423a92c4df4bf Parents: c9f705d Author: Aravindan VijayanAuthored: Fri May 19 16:40:30 2017 -0700 Committer: Aravindan Vijayan Committed: Fri May 19 16:40:30 2017 -0700 -- .../metrics2/sink/timeline/HadoopTimelineMetricsSink.java | 2 +- .../sink/timeline/HadoopTimelineMetricsSinkTest.java | 2 +- .../metrics2/sink/kafka/KafkaTimelineMetricsReporter.java | 4 ++-- .../metrics2/sink/storm/StormTimelineMetricsReporter.java | 6 -- .../metrics2/sink/storm/StormTimelineMetricsSink.java | 2 +- .../metrics2/sink/storm/StormTimelineMetricsSink.java | 2 +- .../templates/hadoop-metrics2-accumulo.properties.j2 | 2 -- .../package/templates/hadoop-metrics2-hbase.properties.j2 | 2 -- .../package/templates/flume-metrics2.properties.j2| 3 --- .../hadoop-metrics2-hbase.properties-GANGLIA-MASTER.j2| 2 -- .../hadoop-metrics2-hbase.properties-GANGLIA-RS.j2| 2 -- .../configuration/hadoop-metrics2.properties.xml | 2 -- .../templates/hadoop-metrics2-hivemetastore.properties.j2 | 2 -- .../templates/hadoop-metrics2-hiveserver2.properties.j2 | 2 -- .../package/templates/hadoop-metrics2-llapdaemon.j2 | 2 -- .../templates/hadoop-metrics2-llaptaskscheduler.j2| 2 -- .../templates/hadoop-metrics2-hivemetastore.properties.j2 | 2 -- .../templates/hadoop-metrics2-hiveserver2.properties.j2 | 2 -- .../package/templates/hadoop-metrics2-llapdaemon.j2 | 2 -- .../templates/hadoop-metrics2-llaptaskscheduler.j2| 2 -- .../KAFKA/0.10.0.3.0/configuration/kafka-broker.xml | 10 -- .../KAFKA/0.8.1/configuration/kafka-broker.xml| 10 -- .../STORM/0.9.1/package/templates/config.yaml.j2 | 3 --- .../0.9.1/package/templates/storm-metrics2.properties.j2 | 2 -- .../STORM/1.0.1.3.0/package/templates/config.yaml.j2 | 3 --- .../package/templates/storm-metrics2.properties.j2| 2 -- .../before-START/templates/hadoop-metrics2.properties.j2 | 2 -- .../HDFS/configuration/hadoop-metrics2.properties.xml | 2 -- .../before-START/templates/hadoop-metrics2.properties.j2 | 2 -- 29 files changed, 10 insertions(+), 73 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d740384e/ambari-metrics/ambari-metrics-hadoop-sink/src/main/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSink.java -- diff --git a/ambari-metrics/ambari-metrics-hadoop-sink/src/main/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSink.java b/ambari-metrics/ambari-metrics-hadoop-sink/src/main/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSink.java index c235c7c..a290ced 100644 --- a/ambari-metrics/ambari-metrics-hadoop-sink/src/main/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSink.java +++ b/ambari-metrics/ambari-metrics-hadoop-sink/src/main/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSink.java @@ -98,7 +98,7 @@ public class HadoopTimelineMetricsSink extends AbstractTimelineMetricsSink imple } serviceName = getServiceName(conf); -instanceId = conf.getString(INSTANCE_ID_PROPERTY); +instanceId = conf.getString(INSTANCE_ID_PROPERTY, null); setInstanceId = conf.getBoolean(SET_INSTANCE_ID_PROPERTY, false); LOG.info("Identified hostname = " + hostName + ", serviceName = " + serviceName); http://git-wip-us.apache.org/repos/asf/ambari/blob/d740384e/ambari-metrics/ambari-metrics-hadoop-sink/src/test/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSinkTest.java -- diff --git a/ambari-metrics/ambari-metrics-hadoop-sink/src/test/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSinkTest.java b/ambari-metrics/ambari-metrics-hadoop-sink/src/test/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSinkTest.java index 4a009dc..30c5c23 100644 --- a/ambari-metrics/ambari-metrics-hadoop-sink/src/test/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSinkTest.java +++
[27/50] [abbrv] ambari git commit: AMBARI-21033 Log Search use POJOs for input configuration (mgergely)
http://git-wip-us.apache.org/repos/asf/ambari/blob/fd4a7a46/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/InputFileBaseDescriptorImpl.java -- diff --git a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/InputFileBaseDescriptorImpl.java b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/InputFileBaseDescriptorImpl.java new file mode 100644 index 000..51c7ec8 --- /dev/null +++ b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/InputFileBaseDescriptorImpl.java @@ -0,0 +1,66 @@ +/* + * 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.logsearch.config.zookeeper.model.inputconfig.impl; + +import org.apache.ambari.logsearch.config.api.model.inputconfig.InputFileBaseDescriptor; + +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; + +public class InputFileBaseDescriptorImpl extends InputDescriptorImpl implements InputFileBaseDescriptor { + @Expose + @SerializedName("checkpoint_interval_ms") + private Integer checkpointIntervalMs; + + @Expose + @SerializedName("process_file") + private Boolean processFile; + + @Expose + @SerializedName("copy_file") + private Boolean copyFile; + + @Override + public Boolean getProcessFile() { +return processFile; + } + + public void setProcessFile(Boolean processFile) { +this.processFile = processFile; + } + + @Override + public Boolean getCopyFile() { +return copyFile; + } + + public void setCopyFile(Boolean copyFile) { +this.copyFile = copyFile; + } + + @Override + public Integer getCheckpointIntervalMs() { +return checkpointIntervalMs; + } + + public void setCheckpointIntervalMs(Integer checkpointIntervalMs) { +this.checkpointIntervalMs = checkpointIntervalMs; + } +} http://git-wip-us.apache.org/repos/asf/ambari/blob/fd4a7a46/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/InputFileDescriptorImpl.java -- diff --git a/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/InputFileDescriptorImpl.java b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/InputFileDescriptorImpl.java new file mode 100644 index 000..3bfd161 --- /dev/null +++ b/ambari-logsearch/ambari-logsearch-config-zookeeper/src/main/java/org/apache/ambari/logsearch/config/zookeeper/model/inputconfig/impl/InputFileDescriptorImpl.java @@ -0,0 +1,25 @@ +/* + * 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.logsearch.config.zookeeper.model.inputconfig.impl; + +import org.apache.ambari.logsearch.config.api.model.inputconfig.InputFileDescriptor; + +public class InputFileDescriptorImpl extends InputFileBaseDescriptorImpl implements InputFileDescriptor { +}
[33/50] [abbrv] ambari git commit: AMBARI-21081 : Upgrade to 2.5.1 from 2.5.0 adds cgroups related configs back to YARN and indicates restart required. (smohanty via avijayan)
AMBARI-21081 : Upgrade to 2.5.1 from 2.5.0 adds cgroups related configs back to YARN and indicates restart required. (smohanty via avijayan) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6c683214 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6c683214 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6c683214 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: 6c68321448099167748efc8981103934a617dc11 Parents: 5ea441a Author: Aravindan VijayanAuthored: Mon May 22 10:31:50 2017 -0700 Committer: Aravindan Vijayan Committed: Mon May 22 10:31:50 2017 -0700 -- .../stacks/HDP/2.2/services/YARN/configuration/yarn-site.xml | 8 1 file changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6c683214/ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/configuration/yarn-site.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/configuration/yarn-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/configuration/yarn-site.xml index 0eb3366..d0b4bb1 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/configuration/yarn-site.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/configuration/yarn-site.xml @@ -193,7 +193,7 @@ yarn_cgroups_enabled - + yarn.nodemanager.linux-container-executor.cgroups.hierarchy @@ -205,7 +205,7 @@ yarn_cgroups_enabled - + yarn.nodemanager.linux-container-executor.cgroups.mount @@ -217,7 +217,7 @@ yarn_cgroups_enabled - + yarn.nodemanager.linux-container-executor.cgroups.mount-path @@ -229,7 +229,7 @@ yarn_cgroups_enabled - + yarn.nodemanager.linux-container-executor.cgroups.strict-resource-usage
[22/50] [abbrv] ambari git commit: Revert "Revert "ADDENDUM. AMBARI-21011. Upgrade Code. Append PATH to YARN config 'yarn.nodemanager.admin-env' for HDP 2.6.""
Revert "Revert "ADDENDUM. AMBARI-21011. Upgrade Code. Append PATH to YARN config 'yarn.nodemanager.admin-env' for HDP 2.6."" This reverts commit 0a61f9857ec95162801fc2c8aae05fef67fbbd52. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ccd6b25e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ccd6b25e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ccd6b25e Branch: refs/heads/branch-feature-AMBARI-12556 Commit: ccd6b25ed2f053a9b1b2045fd0cf41f4472e657e Parents: 9ffef7f Author: Swapan ShridharAuthored: Mon May 22 01:10:15 2017 -0700 Committer: Swapan Shridhar Committed: Mon May 22 01:11:15 2017 -0700 -- .../stacks/HDP/2.3/upgrades/config-upgrade.xml | 8 .../stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml | 6 ++ .../resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml | 1 + .../stacks/HDP/2.4/upgrades/config-upgrade.xml | 6 +- .../stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml | 6 ++ .../resources/stacks/HDP/2.4/upgrades/upgrade-2.6.xml | 1 + .../stacks/HDP/2.5/upgrades/config-upgrade.xml | 8 .../stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml | 6 ++ .../resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml | 4 .../stacks/HDP/2.6/upgrades/config-upgrade.xml | 13 + .../stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml | 7 +++ .../resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml | 1 + 12 files changed, 66 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ccd6b25e/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml index 8b5c07d..98bb056 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml @@ -546,6 +546,14 @@ + + + +yarn-site + + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/ccd6b25e/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml index 5aa08c5..4d2b3ec 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml @@ -353,6 +353,12 @@ + + + Updating YARN NodeManager admin env config + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/ccd6b25e/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml index d98bb53..f1dd943 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml @@ -789,6 +789,7 @@ + http://git-wip-us.apache.org/repos/asf/ambari/blob/ccd6b25e/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml index b3d19d4..b448a2d 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml @@ -332,7 +332,11 @@ - + +yarn-site + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/ccd6b25e/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml
[13/50] [abbrv] ambari git commit: AMBARI-21057. Change Storage of Data on Request/Stage/Task To Reduce Redundency (dgrinenko via dlysnichenko)
AMBARI-21057. Change Storage of Data on Request/Stage/Task To Reduce Redundency (dgrinenko via dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f2bbe478 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f2bbe478 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f2bbe478 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: f2bbe4781841b871993b3e8dd88e5f56169cf1b8 Parents: f7a1d4e Author: Lisnichenko DmitroAuthored: Fri May 19 11:52:12 2017 +0300 Committer: Lisnichenko Dmitro Committed: Fri May 19 11:52:12 2017 +0300 -- .../server/actionmanager/ActionManager.java | 4 +- .../server/actionmanager/ActionScheduler.java | 25 +++-- .../ambari/server/actionmanager/Request.java| 18 +++- .../server/actionmanager/RequestFactory.java| 4 +- .../ambari/server/actionmanager/Stage.java | 14 --- .../server/actionmanager/StageFactory.java | 1 - .../server/actionmanager/StageFactoryImpl.java | 4 +- .../AmbariCustomCommandExecutionHelper.java | 12 ++- .../AmbariManagementControllerImpl.java | 15 ++- .../server/controller/KerberosHelperImpl.java | 51 + .../ClusterStackVersionResourceProvider.java| 3 +- .../HostStackVersionResourceProvider.java | 4 +- .../internal/RequestResourceProvider.java | 9 +- .../internal/RequestStageContainer.java | 11 +- .../internal/StageResourceProvider.java | 9 +- .../internal/UpgradeResourceProvider.java | 13 +-- .../server/hooks/users/UserHookService.java | 3 +- .../apache/ambari/server/orm/DBAccessor.java| 24 + .../ambari/server/orm/DBAccessorImpl.java | 44 .../server/orm/entities/RequestEntity.java | 19 .../ambari/server/orm/entities/StageEntity.java | 18 .../server/orm/entities/StageEntity_.java | 4 - .../server/orm/helpers/dbms/DbmsHelper.java | 21 .../orm/helpers/dbms/GenericDbmsHelper.java | 8 ++ .../server/orm/helpers/dbms/MySqlHelper.java| 12 +++ .../server/orm/helpers/dbms/OracleHelper.java | 12 +++ .../server/orm/helpers/dbms/PostgresHelper.java | 12 +++ .../ambari/server/stageplanner/RoleGraph.java | 2 +- .../server/upgrade/UpgradeCatalog251.java | 29 + .../apache/ambari/server/utils/StageUtils.java | 8 +- .../main/resources/Ambari-DDL-Derby-CREATE.sql | 2 +- .../main/resources/Ambari-DDL-MySQL-CREATE.sql | 2 +- .../main/resources/Ambari-DDL-Oracle-CREATE.sql | 2 +- .../resources/Ambari-DDL-Postgres-CREATE.sql| 2 +- .../resources/Ambari-DDL-SQLAnywhere-CREATE.sql | 2 +- .../resources/Ambari-DDL-SQLServer-CREATE.sql | 2 +- .../src/main/resources/properties.json | 1 + .../ExecutionCommandWrapperTest.java| 4 +- .../ambari/server/actionmanager/StageTest.java | 2 +- .../actionmanager/TestActionDBAccessorImpl.java | 34 +++--- .../server/actionmanager/TestActionManager.java | 8 +- .../actionmanager/TestActionScheduler.java | 43 +--- .../ambari/server/actionmanager/TestStage.java | 5 +- .../server/agent/HeartbeatProcessorTest.java| 4 +- .../server/agent/HeartbeatTestHelper.java | 4 +- .../server/agent/TestHeartbeatHandler.java | 4 +- .../AmbariManagementControllerTest.java | 18 ++-- .../server/controller/KerberosHelperTest.java | 105 +-- .../internal/CalculatedStatusTest.java | 2 +- ...ClusterStackVersionResourceProviderTest.java | 10 +- .../internal/RequestStageContainerTest.java | 3 +- .../server/hooks/users/UserHookServiceTest.java | 4 +- .../serveraction/ServerActionExecutorTest.java | 9 +- .../server/stageplanner/TestStagePlanner.java | 2 +- .../ambari/server/utils/StageUtilsTest.java | 2 +- 55 files changed, 493 insertions(+), 196 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f2bbe478/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionManager.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionManager.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionManager.java index 398bc9d..13cdce1 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionManager.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionManager.java @@ -77,8 +77,8 @@ public class ActionManager { scheduler.stop(); } - public void sendActions(List stages, ExecuteActionRequest actionRequest) throws AmbariException { -Request request =
[30/50] [abbrv] ambari git commit: AMBARI-21060. HDP 3.0 TP - create service definition for Oozie with configs, kerberos, widgets, etc.(vbrodetskyi)
http://git-wip-us.apache.org/repos/asf/ambari/blob/cdc18ecb/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.3.0/package/scripts/oozie_server.py -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.3.0/package/scripts/oozie_server.py b/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.3.0/package/scripts/oozie_server.py new file mode 100644 index 000..9320bc3 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.3.0/package/scripts/oozie_server.py @@ -0,0 +1,163 @@ +#!/usr/bin/env python +""" +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. + +""" + +from resource_management.core import Logger +from resource_management.libraries.script import Script +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.libraries.functions.stack_features import check_stack_feature +from resource_management.libraries.functions.format import format +from resource_management.libraries.functions import default +from resource_management.libraries.functions.constants import Direction +from resource_management.libraries.functions.security_commons import build_expectations +from resource_management.libraries.functions.security_commons import cached_kinit_executor +from resource_management.libraries.functions.security_commons import get_params_from_filesystem +from resource_management.libraries.functions.security_commons import validate_security_config_properties +from resource_management.libraries.functions.security_commons import FILE_TYPE_XML + +from ambari_commons import OSConst +from ambari_commons.os_family_impl import OsFamilyImpl +from ambari_commons.constants import UPGRADE_TYPE_NON_ROLLING, UPGRADE_TYPE_ROLLING + +from oozie import oozie +from oozie_service import oozie_service +from oozie_server_upgrade import OozieUpgrade + +from check_oozie_server_status import check_oozie_server_status +from resource_management.core.resources.zkmigrator import ZkMigrator + +class OozieServer(Script): + + def get_component_name(self): +return "oozie-server" + + def install(self, env): +self.install_packages(env) + + def configure(self, env, upgrade_type=None): +import params + +# The configure command doesn't actually receive the upgrade_type from Script.py, so get it from the config dictionary +if upgrade_type is None: + upgrade_type = Script.get_upgrade_type(default("/commandParams/upgrade_type", "")) + +if upgrade_type is not None and params.upgrade_direction == Direction.UPGRADE and params.version is not None: + Logger.info(format("Configuring Oozie during upgrade type: {upgrade_type}, direction: {params.upgrade_direction}, and version {params.version}")) + if params.version and check_stack_feature(StackFeature.ROLLING_UPGRADE, params.version): +# In order for the "/current/oozie-" point to the new version of +# oozie, we need to create the symlinks both for server and client. +# This is required as both need to be pointing to new installed oozie version. + +# Sets the symlink : eg: /current/oozie-client -> /a.b.c.d-/oozie +stack_select.select("oozie-client", params.version) +# Sets the symlink : eg: /current/oozie-server -> /a.b.c.d-/oozie +stack_select.select("oozie-server", params.version) + + if params.version and check_stack_feature(StackFeature.CONFIG_VERSIONING, params.version): +conf_select.select(params.stack_name, "oozie", params.version) + +env.set_params(params) +oozie(is_server=True) + + def start(self, env, upgrade_type=None): +import params +env.set_params(params) + +self.configure(env) + +# preparing the WAR file must run after configure since configure writes out +# oozie-env.sh which is needed to have the right environment directories setup! +if upgrade_type is not None: + OozieUpgrade.prepare_warfile() + +oozie_service(action='start', upgrade_type=upgrade_type) + + def stop(self, env, upgrade_type=None): +import
[01/50] [abbrv] ambari git commit: AMBARI-21026. Integrate BlueprintService with Swagger (Balazs Bence Sari via adoroszlai)
Repository: ambari Updated Branches: refs/heads/branch-feature-AMBARI-12556 c4148d805 -> 0f266ed6a AMBARI-21026. Integrate BlueprintService with Swagger (Balazs Bence Sari via adoroszlai) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f6787946 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f6787946 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f6787946 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: f678794617f6e221bd63b8abd9b1c54618680831 Parents: 9763993 Author: Balazs Bence SariAuthored: Thu May 18 11:42:38 2017 +0200 Committer: Attila Doroszlai Committed: Thu May 18 11:42:38 2017 +0200 -- .../ambari/server/api/services/BaseService.java | 4 +- .../server/api/services/BlueprintService.java | 105 +-- .../server/controller/BlueprintSwagger.java | 91 3 files changed, 188 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f6787946/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java index 5f6474c..ce668ee 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java @@ -76,6 +76,9 @@ public abstract class BaseService { static final String QUERY_TO_DESCRIPTION = "The ending page resource (inclusive). \"end\" is also accepted."; static final String QUERY_TO_TYPE = "integer"; static final String QUERY_TO_VALUES = "range[1, infinity]"; + static final String QUERY_PREDICATE = "{predicate}"; + static final String QUERY_PREDICATE_DESCRIPTION = "The predicate to filter resources by. Omitting the predicate will " + + "match all resources."; static final String RESPONSE_CONTAINER_LIST = "List"; @@ -85,7 +88,6 @@ public abstract class BaseService { static final String PARAM_TYPE_QUERY = "query"; static final String PARAM_TYPE_BODY = "body"; - static final String FIELDS_SEPARATOR = ", "; /** http://git-wip-us.apache.org/repos/asf/ambari/blob/f6787946/ambari-server/src/main/java/org/apache/ambari/server/api/services/BlueprintService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/BlueprintService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/BlueprintService.java index 8159ea4..b23752f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/BlueprintService.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/BlueprintService.java @@ -28,11 +28,22 @@ import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.Context; import javax.ws.rs.core.HttpHeaders; +import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.ws.rs.core.UriInfo; import org.apache.ambari.server.api.resources.ResourceInstance; +import org.apache.ambari.server.controller.BlueprintSwagger; import org.apache.ambari.server.controller.spi.Resource; +import org.apache.http.HttpStatus; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import io.swagger.annotations.ApiResponse; +import io.swagger.annotations.ApiResponses; /** * Service responsible for handling REST requests for the /blueprints endpoint. @@ -41,8 +52,10 @@ import org.apache.ambari.server.controller.spi.Resource; * immutable. */ @Path("/blueprints/") +@Api(value = "Blueprints", description = "Endpoint for blueprint specific operations") public class BlueprintService extends BaseService { + public static final String BLUEPRINT_REQUEST_TYPE = "org.apache.ambari.server.controller.BlueprintSwagger"; /** * Handles: GET /blueprints * Get all blueprints. @@ -52,7 +65,27 @@ public class BlueprintService extends BaseService { * @return blueprint collection resource representation */ @GET - @Produces("text/plain") + @Produces(MediaType.TEXT_PLAIN) + @ApiOperation(value = "Get all blueprints", + nickname = "BlueprintService#getBlueprints", + response = BlueprintSwagger.class, + responseContainer = RESPONSE_CONTAINER_LIST) + @ApiImplicitParams({ + @ApiImplicitParam(name = QUERY_FIELDS, value =
[36/50] [abbrv] ambari git commit: AMBARI-20904.WFM: Include an option to clear filters in workflow dashboard(Anita Jebaraj via Venkata Sairam)
AMBARI-20904.WFM: Include an option to clear filters in workflow dashboard(Anita Jebaraj via Venkata Sairam) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/201677be Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/201677be Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/201677be Branch: refs/heads/branch-feature-AMBARI-12556 Commit: 201677be8deec6e3d898126fbc23b2114be2fa4c Parents: 9415478 Author: Venkata SairamAuthored: Tue May 23 08:42:36 2017 +0530 Committer: Venkata Sairam Committed: Tue May 23 08:42:36 2017 +0530 -- .../ui/app/components/search-create-new-bar.js | 12 +++- .../app/templates/components/search-create-new-bar.hbs | 4 2 files changed, 15 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/201677be/contrib/views/wfmanager/src/main/resources/ui/app/components/search-create-new-bar.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/search-create-new-bar.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/search-create-new-bar.js index 4bfb5fa..ed761c7 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/search-create-new-bar.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/search-create-new-bar.js @@ -168,7 +168,10 @@ export default Ember.Component.extend(Ember.Evented,{ } this.sendAction('onSearch', { type: this.get('jobType'), filter: this.getAllFilters() }); }, - +doClearFilters(){ + this.filter={}; + this.sendAction('onSearch', { type: this.get('jobType'), filter: this.getAllFilters() }); +}, getAllFilters(){ var allFilters = []; Object.keys(this.filter).forEach(function(value){ @@ -204,6 +207,13 @@ export default Ember.Component.extend(Ember.Evented,{ this.$("#endDate").trigger("dp.show"); } }, +clearFilters() { + this.$("#startDate").val(''); + this.$("#endDate").val(''); + this.$('#search-field').tagsinput('removeAll'); + this.$('.tt-input').val(''); + this.doClearFilters(); +}, onClear(type) { if (type ==='start' && this.get('startDate') === "") { this.filterByDate("", type); http://git-wip-us.apache.org/repos/asf/ambari/blob/201677be/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/search-create-new-bar.hbs -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/search-create-new-bar.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/search-create-new-bar.hbs index b9c6029..8bdc768 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/search-create-new-bar.hbs +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/search-create-new-bar.hbs @@ -38,6 +38,10 @@ + + + +
[38/50] [abbrv] ambari git commit: AMBARI-21035. Integrate ClusterService with Swagger, addendum (adoroszlai)
AMBARI-21035. Integrate ClusterService with Swagger, addendum (adoroszlai) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f2cad775 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f2cad775 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f2cad775 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: f2cad775e98e6478fcc4282a8eff1014cc00414d Parents: f678794 Author: Attila DoroszlaiAuthored: Tue May 23 10:55:13 2017 +0200 Committer: Attila Doroszlai Committed: Tue May 23 10:55:13 2017 +0200 -- .../api/services/ClusterRequestSwagger.java | 30 ++ .../server/api/services/ClusterService.java | 2 +- .../server/state/ClusterHealthReport.java | 43 +++- 3 files changed, 64 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f2cad775/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterRequestSwagger.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterRequestSwagger.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterRequestSwagger.java new file mode 100644 index 000..693a462 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterRequestSwagger.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.ambari.server.api.services; + +import org.apache.ambari.server.controller.ApiModel; +import org.apache.ambari.server.controller.ClusterRequest; +import org.apache.ambari.server.controller.internal.ClusterResourceProvider; + +import io.swagger.annotations.ApiModelProperty; + +@SuppressWarnings("unused") // for Swagger +public interface ClusterRequestSwagger extends ApiModel { + @ApiModelProperty(name = ClusterResourceProvider.RESPONSE_KEY) + ClusterRequest getClusterRequest(); +} http://git-wip-us.apache.org/repos/asf/ambari/blob/f2cad775/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java index 80fcd2e..f61fb2a 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java @@ -59,7 +59,7 @@ import io.swagger.annotations.ApiResponses; @Api(value = "/clusters", description = "Endpoint for cluster-specific operations") public class ClusterService extends BaseService { - private static final String CLUSTER_REQUEST_TYPE = "org.apache.ambari.server.controller.ClusterRequest"; + private static final String CLUSTER_REQUEST_TYPE = "org.apache.ambari.server.api.services.ClusterRequestSwagger"; private static final String ARTIFACT_REQUEST_TYPE = "org.apache.ambari.server.controller.ClusterArtifactRequest"; /** http://git-wip-us.apache.org/repos/asf/ambari/blob/f2cad775/ambari-server/src/main/java/org/apache/ambari/server/state/ClusterHealthReport.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/ClusterHealthReport.java b/ambari-server/src/main/java/org/apache/ambari/server/state/ClusterHealthReport.java index 4be44c6..90dac00 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/ClusterHealthReport.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/ClusterHealthReport.java @@ -20,11 +20,24 @@ package org.apache.ambari.server.state; import org.codehaus.jackson.annotate.JsonProperty; +import io.swagger.annotations.ApiModelProperty; + /** * Cluster Health Report (part of Clusters API
[34/50] [abbrv] ambari git commit: AMBARI-21033 ADDENDUM - Log Search use POJOs for input configuration (oleewere)
AMBARI-21033 ADDENDUM - Log Search use POJOs for input configuration (oleewere) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0626b789 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0626b789 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0626b789 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: 0626b789ba477c494dc5a260b2bca61e3d906690 Parents: 6c68321 Author: oleewereAuthored: Mon May 22 20:31:16 2017 +0200 Committer: oleewere Committed: Mon May 22 20:31:24 2017 +0200 -- .../config/api/LogSearchConfigFactoryTest.java | 16 1 file changed, 8 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0626b789/ambari-logsearch/ambari-logsearch-config-api/src/test/java/org/apache/ambari/logsearch/config/api/LogSearchConfigFactoryTest.java -- diff --git a/ambari-logsearch/ambari-logsearch-config-api/src/test/java/org/apache/ambari/logsearch/config/api/LogSearchConfigFactoryTest.java b/ambari-logsearch/ambari-logsearch-config-api/src/test/java/org/apache/ambari/logsearch/config/api/LogSearchConfigFactoryTest.java index 8e7154e..425694f 100644 --- a/ambari-logsearch/ambari-logsearch-config-api/src/test/java/org/apache/ambari/logsearch/config/api/LogSearchConfigFactoryTest.java +++ b/ambari-logsearch/ambari-logsearch-config-api/src/test/java/org/apache/ambari/logsearch/config/api/LogSearchConfigFactoryTest.java @@ -20,14 +20,12 @@ package org.apache.ambari.logsearch.config.api; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; -import org.apache.ambari.logsearch.config.api.LogSearchConfig; -import org.apache.ambari.logsearch.config.api.LogSearchConfigFactory; import org.apache.ambari.logsearch.config.api.LogSearchConfig.Component; import org.junit.Test; -import com.google.common.collect.ImmutableMap; - import junit.framework.Assert; public class LogSearchConfigFactoryTest { @@ -42,17 +40,19 @@ public class LogSearchConfigFactoryTest { @Test public void testCustomConfig() throws Exception { +Map logsearchConfClassMap = new HashMap<>(); +logsearchConfClassMap.put("logsearch.config.class", "org.apache.ambari.logsearch.config.api.LogSearchConfigClass2"); LogSearchConfig config = LogSearchConfigFactory.createLogSearchConfig(Component.SERVER, -ImmutableMap.of("logsearch.config.class", "org.apache.ambari.logsearch.config.api.LogSearchConfigClass2"), -LogSearchConfigClass1.class); + logsearchConfClassMap, LogSearchConfigClass1.class); Assert.assertSame(config.getClass(), LogSearchConfigClass2.class); } @Test(expected = IllegalArgumentException.class) public void testNonConfigClass() throws Exception { +Map logsearchConfClassMap = new HashMap<>(); +logsearchConfClassMap.put("logsearch.config.class", "org.apache.ambari.logsearch.config.api.NonLogSearchConfigClass"); LogSearchConfigFactory.createLogSearchConfig(Component.SERVER, -ImmutableMap.of("logsearch.config.class", "org.apache.ambari.logsearch.config.api.NonLogSearchConfigClass"), -LogSearchConfigClass1.class); + logsearchConfClassMap, LogSearchConfigClass1.class); } }
[09/50] [abbrv] ambari git commit: AMBARI-21045. Enable Storm's AutoTGT configs in secure mode.
AMBARI-21045. Enable Storm's AutoTGT configs in secure mode. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3499004c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3499004c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3499004c Branch: refs/heads/branch-feature-AMBARI-12556 Commit: 3499004cc6c692c142ba4f6ad857ba67ea81d254 Parents: 7dc2ddc Author: Sriharsha ChintalapaniAuthored: Thu May 18 13:34:29 2017 -0700 Committer: Sriharsha Chintalapani Committed: Thu May 18 13:34:29 2017 -0700 -- .../STORM/0.9.1/configuration/storm-env.xml | 11 ++ .../STORM/1.1.0/configuration/storm-site.xml| 44 ++ .../common-services/STORM/1.1.0/kerberos.json | 138 +++ .../common-services/STORM/1.1.0/metainfo.xml| 44 ++ .../stacks/HDP/2.6/services/STORM/metainfo.xml | 4 + 5 files changed, 241 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3499004c/ambari-server/src/main/resources/common-services/STORM/0.9.1/configuration/storm-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1/configuration/storm-env.xml b/ambari-server/src/main/resources/common-services/STORM/0.9.1/configuration/storm-env.xml index 4cfe3d5..cfa33e2 100644 --- a/ambari-server/src/main/resources/common-services/STORM/0.9.1/configuration/storm-env.xml +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1/configuration/storm-env.xml @@ -125,6 +125,17 @@ export STORM_LOG_DIR={{log_dir}} export STORM_CONF_DIR={{conf_dir}} export STORM_HOME={{storm_component_home_dir}} + +#set storm-auto creds +# check if storm_jaas.conf in config , only enable storm_auto_creds in secure mode. +STORM_HOME="$(dirname $(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ))" +STORM_JAAS_CONF=$STORM_HOME/config/storm_jaas.conf +STORM_AUTOCREDS_LIB_DIR=/usr/hdp/current/storm-client/external/storm-autocreds + +if [ -f $STORM_JAAS_CONF ] && [ -d $STORM_AUTOCREDS_LIB_DIR ]; then +export STORM_EXT_CLASSPATH=$STORM_AUTOCREDS_LIB_DIR +fi + content http://git-wip-us.apache.org/repos/asf/ambari/blob/3499004c/ambari-server/src/main/resources/common-services/STORM/1.1.0/configuration/storm-site.xml -- diff --git a/ambari-server/src/main/resources/common-services/STORM/1.1.0/configuration/storm-site.xml b/ambari-server/src/main/resources/common-services/STORM/1.1.0/configuration/storm-site.xml new file mode 100644 index 000..1a5dde9 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/STORM/1.1.0/configuration/storm-site.xml @@ -0,0 +1,44 @@ + + + + + +nimbus.autocredential.plugins.classes + + Allows users to add token based authentication for services such as HDFS, HBase, Hive + + + + +nimbus.credential.renewers.freq.secs + + Frequency at which tokens will be renewed. + + + + +nimbus.credential.renewers.classes + + List of classes for token renewal + + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/3499004c/ambari-server/src/main/resources/common-services/STORM/1.1.0/kerberos.json -- diff --git a/ambari-server/src/main/resources/common-services/STORM/1.1.0/kerberos.json b/ambari-server/src/main/resources/common-services/STORM/1.1.0/kerberos.json new file mode 100644 index 000..643cfd3 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/STORM/1.1.0/kerberos.json @@ -0,0 +1,138 @@ +{ + "services": [ +{ + "name": "STORM", + "identities": [ +{ + "name": "/spnego" +}, +{ + "name": "/smokeuser" +}, +{ + "name": "storm_components", + "principal": { +"value": "${storm-env/storm_user}${principal_suffix}@${realm}", +"type": "user", +"configuration": "storm-env/storm_principal_name" + }, + "keytab": { +"file": "${keytab_dir}/storm.headless.keytab", +"owner": { + "name": "${storm-env/storm_user}", + "access": "r" +}, +"group": { + "name": "${cluster-env/user_group}", + "access": "" +}, +"configuration": "storm-env/storm_keytab" + } +}, +{ + "name": "/STORM/storm_components", + "principal": { +"configuration": "storm-atlas-application.properties/atlas.jaas.KafkaClient.option.principal" + }, + "keytab": { +
[32/50] [abbrv] ambari git commit: AMBARI-21069. Minimize config changes during ambari upgrade. Add script to compare stack configs (dlysnichenko)
AMBARI-21069. Minimize config changes during ambari upgrade. Add script to compare stack configs (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5ea441aa Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5ea441aa Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5ea441aa Branch: refs/heads/branch-feature-AMBARI-12556 Commit: 5ea441aa7b4080a7a1eb07a4a1e01a2aa8d0d92e Parents: cdc18ec Author: Lisnichenko DmitroAuthored: Mon May 22 18:48:32 2017 +0300 Committer: Lisnichenko Dmitro Committed: Mon May 22 18:48:32 2017 +0300 -- .../config-utils/diff_stack_properties.py | 154 +++ 1 file changed, 154 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5ea441aa/dev-support/config-utils/diff_stack_properties.py -- diff --git a/dev-support/config-utils/diff_stack_properties.py b/dev-support/config-utils/diff_stack_properties.py new file mode 100644 index 000..beef608 --- /dev/null +++ b/dev-support/config-utils/diff_stack_properties.py @@ -0,0 +1,154 @@ +#!/usr/bin/env python +""" +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. +""" + +import sys +import os + +import xml.etree.ElementTree as ET + +COMMON = "common-services" +STACKS = "stacks" +CONFIG_DIR = "configuration" +SERVICES_DIR = "services" + +SYMLINKS_TXT = "symlinks.txt" +VERSIONS_TXT = "versions.txt" + + +def main(): + """ Parse arguments from user, check that all required args are passed in and start work.""" + + if len(sys.argv) != 3: +print "usage: diff_stack_properties.py [first_stack_dir] [second_stack_dir]" +sys.exit(-1) + + args = sys.argv[1:] + + if not os.path.exists(args[0]) or not os.path.exists(args[1]): +print "usage: diff_stack_properties.py [first_stack_dir] [second_stack_dir]" +sys.exit(-1) + + args = sys.argv[1:] + + do_work(args) + + +def do_work(args): + """ + Compare stack dirs. + :param args: + """ + new_stacks = args[0] + old_stacks = args[1] + + compare_common(new_stacks, old_stacks) + + compare_stacks(new_stacks, old_stacks) + + +def compare_stacks(new_stacks, old_stacks): + print "#[{}]#".format(STACKS) + for stack in [stack for stack in os.listdir(os.path.join(new_stacks, STACKS)) if +os.path.isdir(os.path.join(new_stacks, STACKS, stack))]: +for version in os.listdir(os.path.join(new_stacks, STACKS, stack)): + if os.path.exists(os.path.join(new_stacks, STACKS, stack, version, CONFIG_DIR)): +diff = compare_config_dirs(os.path.join(new_stacks, STACKS, stack, version, CONFIG_DIR), + os.path.join(old_stacks, STACKS, stack, version, CONFIG_DIR)) +if diff != "": + print "#{}.{}#".format(stack, version) + print diff + if os.path.exists(os.path.join(new_stacks, STACKS, stack, version, SERVICES_DIR)): +print "#{}.{}#".format(stack, version) +for service_name in os.listdir(os.path.join(new_stacks, STACKS, stack, version, SERVICES_DIR)): + new_configs_dir = os.path.join(new_stacks, STACKS, stack, version, SERVICES_DIR, service_name, CONFIG_DIR) + old_configs_dir = os.path.join(old_stacks, STACKS, stack, version, SERVICES_DIR, service_name, CONFIG_DIR) + diff = compare_config_dirs(new_configs_dir, old_configs_dir) + if diff != "": +print "=={}==".format(service_name) +print diff + + +def compare_common(new_stacks, old_stacks): + print "#[{}]#".format(COMMON) + for service_name in os.listdir(os.path.join(new_stacks, COMMON)): +for version in os.listdir(os.path.join(new_stacks, COMMON, service_name)): + new_configs_dir = os.path.join(new_stacks, COMMON, service_name, version, CONFIG_DIR) + old_configs_dir = os.path.join(old_stacks, COMMON, service_name, version, CONFIG_DIR) +
[40/50] [abbrv] ambari git commit: AMBARI-21063. Integrate RequestService with Swagger (Balazs Bence Sari via adoroszlai)
AMBARI-21063. Integrate RequestService with Swagger (Balazs Bence Sari via adoroszlai) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/01772631 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/01772631 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/01772631 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: 017726319c77c4bc6cae86f1f1e42b1b6d4f1ce0 Parents: f2cad77 Author: Balazs Bence SariAuthored: Tue May 23 10:58:03 2017 +0200 Committer: Attila Doroszlai Committed: Tue May 23 10:58:03 2017 +0200 -- .../server/api/services/RequestService.java | 105 +-- .../server/controller/RequestPostRequest.java | 96 + .../server/controller/RequestPostResponse.java | 43 .../server/controller/RequestPutRequest.java| 33 ++ .../server/controller/RequestRequest.java | 6 ++ .../server/controller/RequestResponse.java | 100 ++ .../internal/RequestResourceFilter.java | 3 +- .../internal/RequestResourceProvider.java | 66 ++-- 8 files changed, 409 insertions(+), 43 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/01772631/ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestService.java index 936b857..3532695 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestService.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestService.java @@ -30,18 +30,35 @@ import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.Context; import javax.ws.rs.core.HttpHeaders; +import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.ws.rs.core.UriInfo; import org.apache.ambari.server.api.resources.ResourceInstance; +import org.apache.ambari.server.controller.RequestPostResponse; +import org.apache.ambari.server.controller.RequestResponse; import org.apache.ambari.server.controller.spi.Resource; +import org.apache.http.HttpStatus; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import io.swagger.annotations.ApiResponse; +import io.swagger.annotations.ApiResponses; /** * Service responsible for request resource requests. */ @Path("/requests/") +@Api(value = "Requests", description = "Endpoint for request specific operations") public class RequestService extends BaseService { + + private static final String REQUEST_POST_REQUEST_TYPE = "org.apache.ambari.server.controller.RequestPostRequest"; + private static final String REQUEST_PUT_REQUEST_TYPE = "org.apache.ambari.server.controller.RequestPutRequest"; + /** * Parent cluster name. */ @@ -73,9 +90,23 @@ public class RequestService extends BaseService { */ @GET @Path("{requestId}") - @Produces("text/plain") + @Produces(MediaType.TEXT_PLAIN) + @ApiOperation(value = "Get the details of a request", + nickname = "RequestService#getRequest", + response = RequestResponse.class) + @ApiImplicitParams({ + @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, + defaultValue = "Requests/*", + dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY) + }) + @ApiResponses(value = { + @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION), + @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED), + @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND), + @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR) + }) public Response getRequest(String body, @Context HttpHeaders headers, @Context UriInfo ui, - @PathParam("requestId") String requestId) { + @ApiParam @PathParam("requestId") String requestId) { return handleRequest(headers, body, ui, Request.Type.GET, createRequestResource(m_clusterName, requestId)); @@ -91,7 +122,27 @@ public class RequestService extends BaseService { * @return request collection resource representation */ @GET - @Produces("text/plain") + @Produces(MediaType.TEXT_PLAIN) + @ApiOperation(value = "Get all requests. A predicate can be given to filter results.", + nickname =
[06/50] [abbrv] ambari git commit: AMBARI-21048. HDP 3.0 TP - create service definition for Storm with configs, kerberos, widgets, etc.(vbrodetsky)
http://git-wip-us.apache.org/repos/asf/ambari/blob/6ab4d28a/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/configuration/storm-worker-log4j.xml -- diff --git a/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/configuration/storm-worker-log4j.xml b/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/configuration/storm-worker-log4j.xml new file mode 100644 index 000..46291f7 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/configuration/storm-worker-log4j.xml @@ -0,0 +1,189 @@ + + + + + +storm_wrkr_a1_maxfilesize +100 +The maximum size of backup file before the log is rotated +Storm Worker Log: backup file size + + MB + + + + +storm_wrkr_a1_maxbackupindex +9 +The number of backup files +Storm Worker Log: # of backup files + + int + 0 + + + + +storm_wrkr_out_maxfilesize +100 +The maximum size of backup file before the log is rotated +Storm Worker Standard out Log: backup file size + + MB + + + + +storm_wrkr_out_maxbackupindex +4 +The number of backup files +Storm Worker Standard out Log: # of backup files + + int + 0 + + + + +storm_wrkr_err_maxfilesize +100 +The maximum size of backup file before the log is rotated +Storm Worker Standard Error Log: backup file size + + MB + + + + +storm_wrkr_err_maxbackupindex +4 +The number of backup files +Storm Worker Standard Error Log: # of backup files + + int + 0 + + + + +content +storm-worker-log4j template +Custom worker.xml + + + content + false + + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/6ab4d28a/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/kerberos.json -- diff --git a/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/kerberos.json b/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/kerberos.json new file mode 100644 index 000..a034411 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/kerberos.json @@ -0,0 +1,134 @@ +{ + "services": [ +{ + "name": "STORM", + "identities": [ +{ + "name": "/spnego" +}, +{ + "name": "/smokeuser" +}, +{ + "name": "storm_components", + "principal": { +"value": "${storm-env/storm_user}${principal_suffix}@${realm}", +"type": "user", +"configuration": "storm-env/storm_principal_name" + }, + "keytab": { +"file": "${keytab_dir}/storm.headless.keytab", +"owner": { + "name": "${storm-env/storm_user}", + "access": "r" +}, +"group": { + "name": "${cluster-env/user_group}", + "access": "" +}, +"configuration": "storm-env/storm_keytab" + } +}, +{ + "name": "/STORM/storm_components", + "principal": { +"configuration": "storm-atlas-application.properties/atlas.jaas.KafkaClient.option.principal" + }, + "keytab": { +"configuration": "storm-atlas-application.properties/atlas.jaas.KafkaClient.option.keyTab" + } +} + ], + "configurations": [ +{ + "storm-site": { +"nimbus.authorizer": "org.apache.storm.security.auth.authorizer.SimpleACLAuthorizer", +"drpc.authorizer": "org.apache.storm.security.auth.authorizer.DRPCSimpleACLAuthorizer", +"ui.filter": "org.apache.hadoop.security.authentication.server.AuthenticationFilter", +"storm.principal.tolocal": "org.apache.storm.security.auth.KerberosPrincipalToLocal", +"supervisor.enable": "true", +"storm.zookeeper.superACL": "sasl:{{storm_bare_jaas_principal}}", +"java.security.auth.login.config": "{{conf_dir}}/storm_jaas.conf", +"nimbus.impersonation.authorizer": "org.apache.storm.security.auth.authorizer.ImpersonationAuthorizer", +"nimbus.impersonation.acl": "{ {{storm_bare_jaas_principal}} : {hosts: ['*'], groups: ['*']}}", +"nimbus.admins": "['{{storm_bare_jaas_principal}}', '{{ambari_bare_jaas_principal}}']", +"nimbus.supervisor.users": "['{{storm_bare_jaas_principal}}']", +"ui.filter.params": "{'type': 'kerberos', 'kerberos.principal': '{{storm_ui_jaas_principal}}', 'kerberos.keytab': '{{storm_ui_keytab_path}}', 'kerberos.name.rules': 'DEFAULT'}" + } +}, +{ + "ranger-storm-audit": { +
[48/50] [abbrv] ambari git commit: AMBARI-21088. HDP 3.0 TP - create service definition for Zeppelin with configs, kerberos, widgets, etc.(vbrodetskyi)
AMBARI-21088. HDP 3.0 TP - create service definition for Zeppelin with configs, kerberos, widgets, etc.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a2eefe84 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a2eefe84 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a2eefe84 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: a2eefe849062266fa41edd7466bb395954c06ff0 Parents: b5fdb57 Author: Vitaly BrodetskyiAuthored: Wed May 24 01:05:48 2017 +0300 Committer: Vitaly Brodetskyi Committed: Wed May 24 01:05:48 2017 +0300 -- .../ZEPPELIN/0.6.0.3.0/alerts.json | 18 + .../0.6.0.3.0/configuration/zeppelin-config.xml | 189 .../0.6.0.3.0/configuration/zeppelin-env.xml| 185 .../configuration/zeppelin-log4j-properties.xml | 37 ++ .../configuration/zeppelin-shiro-ini.xml| 90 .../ZEPPELIN/0.6.0.3.0/kerberos.json| 53 +++ .../ZEPPELIN/0.6.0.3.0/metainfo.xml | 111 + .../package/scripts/alert_check_zeppelin.py | 47 ++ .../package/scripts/livy2_config_template.py| 107 + .../0.6.0.3.0/package/scripts/master.py | 448 +++ .../0.6.0.3.0/package/scripts/params.py | 228 ++ .../0.6.0.3.0/package/scripts/service_check.py | 39 ++ .../package/scripts/spark2_config_template.py | 84 .../0.6.0.3.0/package/scripts/status_params.py | 29 ++ .../templates/input.config-zeppelin.json.j2 | 48 ++ .../0.6.0.3.0/quicklinks/quicklinks.json| 35 ++ .../ZEPPELIN/0.6.0.3.0/role_command_order.json | 7 + .../HDP/3.0/services/ZEPPELIN/metainfo.xml | 27 ++ 18 files changed, 1782 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a2eefe84/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.3.0/alerts.json -- diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.3.0/alerts.json b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.3.0/alerts.json new file mode 100644 index 000..8e9b6e7 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.3.0/alerts.json @@ -0,0 +1,18 @@ +{ + "ZEPPELIN": { +"service": [], +"ZEPPELIN_MASTER": [ + { +"name": "zeppelin_server_status", +"label": "Zeppelin Server Status", +"description": "This host-level alert is triggered if the Zeppelin server cannot be determined to be up and responding to client requests.", +"interval": 1, +"scope": "ANY", +"source": { + "type": "SCRIPT", + "path": "ZEPPELIN/0.6.0.2.5/package/scripts/alert_check_zeppelin.py" +} + } +] + } +} http://git-wip-us.apache.org/repos/asf/ambari/blob/a2eefe84/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.3.0/configuration/zeppelin-config.xml -- diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.3.0/configuration/zeppelin-config.xml b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.3.0/configuration/zeppelin-config.xml new file mode 100644 index 000..c0ce711 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.3.0/configuration/zeppelin-config.xml @@ -0,0 +1,189 @@ + + + + + + +zeppelin.server.addr +0.0.0.0 +Server address + + + +zeppelin.server.port +9995 +Server port.The subsequent port (e.g. 9996) should also be open as it will be +used by the web socket + + + + +zeppelin.notebook.dir +notebook +notebook persist + + + +zeppelin.notebook.homescreen + +id of notebook to be displayed in homescreen. e.g.) 2A94M5J1Z Empty value +displays default home screen + + + + +zeppelin.notebook.homescreen.hide +false +hide homescreen notebook from list when this value set to true + + + +zeppelin.notebook.s3.user +user +user name for s3 folder structure. If S3 is used to store the notebooks, it is +necessary to use the following folder structure bucketname/username/notebook/ + + + + +zeppelin.notebook.s3.bucket +zeppelin +bucket name for notebook storage. If S3 is used to store the notebooks, it is +necessary to use the following folder structure bucketname/username/notebook/ + + + + +zeppelin.notebook.storage +org.apache.zeppelin.notebook.repo.VFSNotebookRepo +notebook persistence layer implementation. If S3 is used, set
[50/50] [abbrv] ambari git commit: Merge branch 'trunk' into branch-feature-AMBARI-12556
Merge branch 'trunk' into branch-feature-AMBARI-12556 Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0f266ed6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0f266ed6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0f266ed6 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: 0f266ed6a7b1df2c3d3b18aa49649e12d01b1a4b Parents: c4148d8 1c19200 Author: Jonathan HurleyAuthored: Tue May 23 18:49:01 2017 -0400 Committer: Jonathan Hurley Committed: Tue May 23 19:58:42 2017 -0400 -- LICENSE.txt |17 + .../stackVersions/StackVersionsCreateCtrl.js| 1 - .../ui/admin-web/app/scripts/i18n.config.js | 2 +- .../ui/admin-web/app/scripts/services/Stack.js |32 +- .../views/stackVersions/stackVersionPage.html | 4 +- .../StackVersionsCreateCtrl_test.js | 6 +- .../libraries/functions/conf_select.py |13 +- .../org/apache/ambari/infra/InfraManager.java |30 +- .../infra/common/InfraManagerConstants.java | 2 + .../conf/batch/InfraManagerBatchConfig.java |55 + .../apache/ambari/infra/manager/JobManager.java | 274 + .../infra/model/ExecutionContextResponse.java |40 + .../ambari/infra/model/JobDetailsResponse.java |53 + .../model/JobExecutionDetailsResponse.java |49 + .../infra/model/JobExecutionInfoResponse.java | 141 + .../ambari/infra/model/JobExecutionRequest.java |46 + .../infra/model/JobExecutionRestartRequest.java |52 + .../infra/model/JobExecutionStopRequest.java|50 + .../infra/model/JobInstanceDetailsResponse.java |54 + .../infra/model/JobInstanceStartRequest.java|49 + .../ambari/infra/model/JobOperationParams.java |31 + .../apache/ambari/infra/model/JobRequest.java |37 + .../apache/ambari/infra/model/PageRequest.java |49 + .../model/StepExecutionContextResponse.java |58 + .../infra/model/StepExecutionInfoResponse.java | 115 + .../model/StepExecutionProgressResponse.java|53 + .../infra/model/StepExecutionRequest.java |49 + .../infra/model/wrapper/JobExecutionData.java | 118 + .../infra/model/wrapper/StepExecutionData.java | 133 + .../ambari/infra/rest/JobExceptionMapper.java | 110 + .../apache/ambari/infra/rest/JobResource.java | 151 +- .../ambari-logsearch-config-api/pom.xml |14 +- .../config/api/InputConfigMonitor.java |13 +- .../logsearch/config/api/LogSearchConfig.java | 3 +- .../config/api/LogSearchConfigFactory.java |10 +- .../api/model/inputconfig/Conditions.java |24 + .../config/api/model/inputconfig/Fields.java|26 + .../api/model/inputconfig/FilterDescriptor.java |39 + .../model/inputconfig/FilterGrokDescriptor.java |28 + .../model/inputconfig/FilterJsonDescriptor.java |23 + .../inputconfig/FilterKeyValueDescriptor.java |28 + .../api/model/inputconfig/InputConfig.java |28 + .../api/model/inputconfig/InputDescriptor.java |54 + .../inputconfig/InputFileBaseDescriptor.java|28 + .../model/inputconfig/InputFileDescriptor.java |23 + .../inputconfig/InputS3FileDescriptor.java |26 + .../model/inputconfig/MapDateDescriptor.java|26 + .../inputconfig/MapFieldCopyDescriptor.java |24 + .../model/inputconfig/MapFieldDescriptor.java |24 + .../inputconfig/MapFieldNameDescriptor.java |24 + .../inputconfig/MapFieldValueDescriptor.java|26 + .../api/model/inputconfig/PostMapValues.java|26 + .../config/api/LogSearchConfigClass1.java | 3 +- .../config/api/LogSearchConfigClass2.java | 3 +- .../config/api/LogSearchConfigFactoryTest.java |16 +- .../ambari-logsearch-config-zookeeper/pom.xml | 6 + .../config/zookeeper/LogSearchConfigZK.java |72 +- .../model/inputconfig/impl/ConditionsImpl.java |37 + .../model/inputconfig/impl/FieldsImpl.java |39 + .../model/inputconfig/impl/FilterAdapter.java |42 + .../inputconfig/impl/FilterDescriptorImpl.java | 113 + .../impl/FilterGrokDescriptorImpl.java |66 + .../impl/FilterJsonDescriptorImpl.java |25 + .../impl/FilterKeyValueDescriptorImpl.java |63 + .../model/inputconfig/impl/InputAdapter.java|58 + .../model/inputconfig/impl/InputConfigGson.java |46 + .../model/inputconfig/impl/InputConfigImpl.java |54 + .../inputconfig/impl/InputDescriptorImpl.java | 204 + .../impl/InputFileBaseDescriptorImpl.java |66 + .../impl/InputFileDescriptorImpl.java |25 + .../impl/InputS3FileDescriptorImpl.java |53 + .../inputconfig/impl/MapDateDescriptorImpl.java |58 +
[44/50] [abbrv] ambari git commit: Merge branch 'ambari-rest-api-explorer' into trunk
Merge branch 'ambari-rest-api-explorer' into trunk Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0d688106 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0d688106 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0d688106 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: 0d688106a59a6d96d5ca6d7e50146d4c9418f5b1 Parents: 7c92953 651bdcb Author: Attila DoroszlaiAuthored: Tue May 23 11:56:59 2017 +0200 Committer: Attila Doroszlai Committed: Tue May 23 11:56:59 2017 +0200 -- LICENSE.txt |17 + ambari-server/checkstyle.xml| 1 + ambari-server/docs/api/generated/index.html | 17421 + ambari-server/docs/api/generated/swagger.json | 2305 ++ ambari-server/pom.xml | 121 +- ambari-server/src/main/assemblies/server.xml| 2 +- .../server/api/services/ActionService.java |98 +- .../api/services/ActiveWidgetLayoutService.java |76 - .../ambari/server/api/services/BaseService.java |41 + .../server/api/services/BlueprintService.java | 105 +- .../api/services/ClusterRequestSwagger.java |30 + .../server/api/services/ClusterService.java | 305 +- .../api/services/GroupPrivilegeService.java |77 - .../server/api/services/GroupService.java | 155 - .../ambari/server/api/services/HostService.java | 188 +- .../server/api/services/MemberService.java | 163 - .../server/api/services/RequestService.java | 105 +- .../server/api/services/RootServiceService.java | 363 +- .../server/api/services/ServiceService.java | 293 +- .../api/services/SettingRequestSwagger.java |30 + .../server/api/services/SettingService.java | 126 +- .../server/api/services/StacksService.java | 730 +- .../api/services/UserAuthorizationService.java | 103 - .../api/services/UserPrivilegeService.java |79 - .../ambari/server/api/services/UserService.java | 175 - .../api/services/ViewDataMigrationService.java | 122 - .../ViewExternalSubResourceService.java | 146 - .../api/services/ViewInstanceService.java | 282 - .../api/services/ViewPermissionService.java | 186 - .../api/services/ViewPrivilegeService.java |55 - .../ambari/server/api/services/ViewService.java | 162 - .../api/services/ViewSubResourceService.java| 134 - .../server/api/services/ViewVersionService.java | 199 - .../services/groups/GroupPrivilegeService.java | 113 + .../api/services/groups/GroupService.java | 177 + .../api/services/groups/MemberService.java | 200 + .../users/ActiveWidgetLayoutService.java| 111 + .../users/UserAuthorizationService.java | 120 + .../services/users/UserPrivilegeService.java| 113 + .../server/api/services/users/UserService.java | 193 + .../views/ViewDataMigrationService.java | 113 + .../views/ViewExternalSubResourceService.java | 148 + .../api/services/views/ViewInstanceService.java | 313 + .../services/views/ViewPermissionService.java | 208 + .../services/views/ViewPrivilegeService.java| 268 + .../server/api/services/views/ViewService.java | 181 + .../services/views/ViewSubResourceService.java | 136 + .../api/services/views/ViewVersionService.java | 208 + .../request/eventcreator/HostEventCreator.java | 4 +- .../ambari/server/controller/ActionRequest.java |19 + .../server/controller/ActionRequestSwagger.java |31 + .../server/controller/ActionResponse.java |20 +- .../controller/ActiveWidgetLayoutRequest.java |66 + .../controller/ActiveWidgetLayoutResponse.java | 142 + .../AmbariManagementControllerImpl.java | 7 +- .../ambari/server/controller/ApiModel.java |28 + .../server/controller/BlueprintSwagger.java |91 + .../controller/ClusterArtifactRequest.java |46 + .../controller/ClusterArtifactResponse.java |49 + .../server/controller/ClusterRequest.java | 111 +- .../server/controller/ClusterResponse.java | 106 +- .../ClusterServiceArtifactRequest.java |46 + .../ClusterServiceArtifactResponse.java |52 + .../controller/ComponentDependencyResponse.java |64 + .../controller/ExtensionLinkResponse.java | 137 +- .../controller/GroupPrivilegeResponse.java |61 + .../ambari/server/controller/GroupRequest.java | 5 +- .../ambari/server/controller/GroupResponse.java | 7 +- .../ambari/server/controller/HostRequest.java |72 +- .../ambari/server/controller/HostResponse.java | 287 +- .../ambari/server/controller/MemberRequest.java | 4 + .../server/controller/MemberResponse.java | 6 +-
[42/50] [abbrv] ambari git commit: Merge remote-tracking branch 'origin/trunk' into ambari-rest-api-explorer
http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/pom.xml -- http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/main/assemblies/server.xml -- http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java -- http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestRequest.java -- diff --cc ambari-server/src/main/java/org/apache/ambari/server/controller/RequestRequest.java index 5dfc148,05c4bad..ca9cf4c --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestRequest.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestRequest.java @@@ -39,8 -37,9 +39,10 @@@ public class RequestRequest private String abortReason; + private boolean removePendingHostRequests = false; + + @ApiModelProperty(name = "request_status", notes = "Only valid value is ABORTED.") public HostRoleStatus getStatus() { return status; } http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ArtifactResourceProvider.java -- http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java -- http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ProvisionClusterRequest.java -- http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java -- diff --cc ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java index 1fc4bd5,d82ff25..f41eb26 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java @@@ -91,40 -92,42 +92,44 @@@ public class RequestResourceProvider ex // - Property ID constants - // Requests - public static final String REQUEST_CLUSTER_NAME_PROPERTY_ID = "Requests/cluster_name"; - public static final String REQUEST_CLUSTER_ID_PROPERTY_ID = "Requests/cluster_id"; - public static final String REQUEST_ID_PROPERTY_ID = "Requests/id"; - protected static final String REQUEST_STATUS_PROPERTY_ID = "Requests/request_status"; - protected static final String REQUEST_ABORT_REASON_PROPERTY_ID = "Requests/abort_reason"; - protected static final String REQUEST_CONTEXT_ID = "Requests/request_context"; - public static final String REQUEST_SOURCE_SCHEDULE = "Requests/request_schedule"; - public static final String REQUEST_SOURCE_SCHEDULE_ID = "Requests/request_schedule/schedule_id"; - public static final String REQUEST_SOURCE_SCHEDULE_HREF = "Requests/request_schedule/href"; - protected static final String REQUEST_TYPE_ID = "Requests/type"; - protected static final String REQUEST_INPUTS_ID = "Requests/inputs"; - protected static final String REQUEST_CLUSTER_HOST_INFO_ID = "Requests/cluster_host_info"; - protected static final String REQUEST_RESOURCE_FILTER_ID = "Requests/resource_filters"; - protected static final String REQUEST_OPERATION_LEVEL_ID = "Requests/operation_level"; - protected static final String REQUEST_CREATE_TIME_ID = "Requests/create_time"; - protected static final String REQUEST_START_TIME_ID = "Requests/start_time"; - protected static final String REQUEST_END_TIME_ID = "Requests/end_time"; - protected static final String REQUEST_EXCLUSIVE_ID = "Requests/exclusive"; - protected static final String REQUEST_TASK_CNT_ID = "Requests/task_count"; - protected static final String REQUEST_FAILED_TASK_CNT_ID = "Requests/failed_task_count"; - protected static final String REQUEST_ABORTED_TASK_CNT_ID = "Requests/aborted_task_count"; - protected static final String REQUEST_TIMED_OUT_TASK_CNT_ID = "Requests/timed_out_task_count"; - protected static final String REQUEST_COMPLETED_TASK_CNT_ID = "Requests/completed_task_count"; - protected static final String REQUEST_QUEUED_TASK_CNT_ID = "Requests/queued_task_count"; - protected static
[46/50] [abbrv] ambari git commit: AMBARI-20984 Be able to include stack repos in blueprint (dili)
AMBARI-20984 Be able to include stack repos in blueprint (dili) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cd769e2e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cd769e2e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cd769e2e Branch: refs/heads/branch-feature-AMBARI-12556 Commit: cd769e2e79de11519b333aa86c4c54e68be40996 Parents: 4fcdaae Author: Di LiAuthored: Tue May 23 12:03:53 2017 -0400 Committer: Di Li Committed: Tue May 23 12:03:53 2017 -0400 -- .../server/api/services/AmbariMetaInfo.java | 21 .../ambari/server/topology/Blueprint.java | 3 + .../ambari/server/topology/BlueprintImpl.java | 33 +- .../server/topology/RepositorySetting.java | 116 +++ .../apache/ambari/server/topology/Setting.java | 2 + .../ambari/server/topology/TopologyManager.java | 49 +++- .../ClusterDeployWithStartOnlyTest.java | 5 +- ...InstallWithoutStartOnComponentLevelTest.java | 5 +- .../ClusterInstallWithoutStartTest.java | 7 +- .../ambari/server/topology/SettingTest.java | 18 +++ .../server/topology/TopologyManagerTest.java| 5 +- 11 files changed, 250 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/cd769e2e/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java index c655c62..b509e97 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java @@ -934,6 +934,27 @@ public class AmbariMetaInfo { } } + public void createRepo(String stackName, String stackVersion, String osType, String repoId, String baseUrl, String mirrorsList) throws AmbariException { +if (!stackRoot.exists()) { + throw new StackAccessException("Create repo - Stack root does not exist."); +} + +if (null != baseUrl) { + createRepoInMetaInfo(stackName, stackVersion, osType, repoId, baseUrl, REPOSITORY_XML_PROPERTY_BASEURL); +} else if (null != mirrorsList) { + createRepoInMetaInfo(stackName, stackVersion, osType, repoId, mirrorsList, REPOSITORY_XML_PROPERTY_MIRRORSLIST); +} + } + + private void createRepoInMetaInfo(String stackName, String stackVersion, String osType, String repoId, String value, String repositoryXmlProperty) { +String metaKey = generateRepoMetaKey(stackName, stackVersion, osType, +repoId, repositoryXmlProperty); +MetainfoEntity entity = new MetainfoEntity(); +entity.setMetainfoName(metaKey); +entity.setMetainfoValue(value); +metaInfoDAO.create(entity); + } + public File getStackRoot() { return stackRoot; } http://git-wip-us.apache.org/repos/asf/ambari/blob/cd769e2e/ambari-server/src/main/java/org/apache/ambari/server/topology/Blueprint.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/topology/Blueprint.java b/ambari-server/src/main/java/org/apache/ambari/server/topology/Blueprint.java index 139a1ee..99e1c75 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/topology/Blueprint.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/topology/Blueprint.java @@ -19,6 +19,7 @@ package org.apache.ambari.server.topology; import java.util.Collection; +import java.util.List; import java.util.Map; import org.apache.ambari.server.controller.internal.Stack; @@ -167,4 +168,6 @@ public interface Blueprint { * @return entity representation of the blueprint */ BlueprintEntity toEntity(); + + List getRepositorySettings(); } http://git-wip-us.apache.org/repos/asf/ambari/blob/cd769e2e/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintImpl.java index 826e4e5..415efd8 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintImpl.java @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Set;
[26/50] [abbrv] ambari git commit: AMBARI-21033 Log Search use POJOs for input configuration (mgergely)
http://git-wip-us.apache.org/repos/asf/ambari/blob/fd4a7a46/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputManager.java -- diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputManager.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputManager.java index ba872f8..4d6c43b 100644 --- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputManager.java +++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputManager.java @@ -70,7 +70,7 @@ public class OutputManager { Input input = inputMarker.input; // Update the block with the context fields -for (Map.Entryentry : input.getContextFields().entrySet()) { +for (Map.Entry entry : input.getInputDescriptor().getAddFields().entrySet()) { if (jsonObj.get(entry.getKey()) == null || entry.getKey().equals("cluster") && "null".equals(jsonObj.get(entry.getKey( { jsonObj.put(entry.getKey(), entry.getValue()); } @@ -79,13 +79,13 @@ public class OutputManager { // TODO: Ideally most of the overrides should be configurable if (jsonObj.get("type") == null) { - jsonObj.put("type", input.getStringValue("type")); + jsonObj.put("type", input.getInputDescriptor().getType()); } if (jsonObj.get("path") == null && input.getFilePath() != null) { jsonObj.put("path", input.getFilePath()); } -if (jsonObj.get("path") == null && input.getStringValue("path") != null) { - jsonObj.put("path", input.getStringValue("path")); +if (jsonObj.get("path") == null && input.getInputDescriptor().getPath() != null) { + jsonObj.put("path", input.getInputDescriptor().getPath()); } if (jsonObj.get("host") == null && LogFeederUtil.hostName != null) { jsonObj.put("host", LogFeederUtil.hostName); http://git-wip-us.apache.org/repos/asf/ambari/blob/fd4a7a46/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputS3File.java -- diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputS3File.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputS3File.java index d0f51b2..076d12d 100644 --- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputS3File.java +++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputS3File.java @@ -19,9 +19,6 @@ package org.apache.ambari.logfeeder.output; import com.google.common.annotations.VisibleForTesting; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import org.apache.ambari.logfeeder.common.ConfigHandler; import org.apache.ambari.logfeeder.common.LogFeederConstants; import org.apache.ambari.logfeeder.filter.Filter; import org.apache.ambari.logfeeder.input.InputMarker; @@ -31,11 +28,18 @@ import org.apache.ambari.logfeeder.output.spool.RolloverCondition; import org.apache.ambari.logfeeder.output.spool.RolloverHandler; import org.apache.ambari.logfeeder.util.LogFeederUtil; import org.apache.ambari.logfeeder.util.S3Util; +import org.apache.ambari.logsearch.config.api.model.inputconfig.FilterDescriptor; +import org.apache.ambari.logsearch.config.api.model.inputconfig.InputS3FileDescriptor; +import org.apache.ambari.logsearch.config.zookeeper.model.inputconfig.impl.InputConfigGson; +import org.apache.ambari.logsearch.config.zookeeper.model.inputconfig.impl.InputConfigImpl; +import org.apache.ambari.logsearch.config.zookeeper.model.inputconfig.impl.InputDescriptorImpl; +import org.apache.ambari.logsearch.config.zookeeper.model.inputconfig.impl.InputS3FileDescriptorImpl; import org.apache.log4j.Logger; import java.io.File; -import java.util.*; -import java.util.Map.Entry; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; /** @@ -50,7 +54,6 @@ import java.util.Map.Entry; public class OutputS3File extends Output implements RolloverCondition, RolloverHandler { private static final Logger LOG = Logger.getLogger(OutputS3File.class); - public static final String INPUT_ATTRIBUTE_TYPE = "type"; public static final String GLOBAL_CONFIG_S3_PATH_SUFFIX = "global.config.json"; private LogSpooler logSpooler; @@ -72,9 +75,9 @@ public class OutputS3File extends Output implements RolloverCondition, RolloverH */ @Override public void copyFile(File inputFile, InputMarker inputMarker) { -String type = inputMarker.input.getStringValue(INPUT_ATTRIBUTE_TYPE); +String type =
[15/50] [abbrv] ambari git commit: AMBARI-20973. Review the use/need of host clean up script. (Ishan Bhatt via Jaimin)
AMBARI-20973. Review the use/need of host clean up script. (Ishan Bhatt via Jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ae40bed9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ae40bed9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ae40bed9 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: ae40bed9fc99965babaf3457bbd04758bba99023 Parents: f952c9e Author: Jaimin JetlyAuthored: Fri May 19 10:20:48 2017 -0700 Committer: Jaimin Jetly Committed: Fri May 19 10:20:48 2017 -0700 -- ambari-web/app/messages.js | 6 +- .../app/templates/wizard/step3/step3_host_warnings_popup.hbs | 4 +--- 2 files changed, 2 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ae40bed9/ambari-web/app/messages.js -- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index f34cbdc..0c15a19 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -755,11 +755,7 @@ Em.I18n.translations = { 'installer.step3.hostWarningsPopup.report.user': '### Users## A space delimited list of users who should not exist.# Provided so that administrators can easily copy paths into scripts, email etc.# Example: userdel hdfs##USERS', 'installer.step3.hostWarningsPopup.report.folder': '\\ /folder', 'installer.step3.hostWarningsPopup.checks': 'Host Checks found', - 'installer.step3.hostWarningsPopup.notice.beginning': 'After manually resolving the issues, click Rerun Checks.' + -'To manually resolve issues on each host run the HostCleanup script (Python 2.6 or greater is required):', - 'installer.step3.hostWarningsPopup.notice.command': 'python /usr/lib/python2.6/site-packages/ambari_agent/HostCleanup.py --silent --skip=users', - 'installer.step3.hostWarningsPopup.notice.end': 'Note: Clean up of Firewall and Transparent Huge Page issues are not supported by the HostCleanup script.' + -'Note: To clean up in interactive mode, remove --silent option. To clean up all resources, including users, remove --skip=users option. Use --help for a list of available options.', + 'installer.step3.hostWarningsPopup.notice.beginning': 'After manually resolving the issues, click Rerun Checks.', 'installer.step3.hostWarningsPopup.summary':'{0} on {1}', 'installer.step3.hostWarningsPopup.jdk':'JDK Issues', 'installer.step3.hostWarningsPopup.jdk.name':'JDK not found at {0}', http://git-wip-us.apache.org/repos/asf/ambari/blob/ae40bed9/ambari-web/app/templates/wizard/step3/step3_host_warnings_popup.hbs -- diff --git a/ambari-web/app/templates/wizard/step3/step3_host_warnings_popup.hbs b/ambari-web/app/templates/wizard/step3/step3_host_warnings_popup.hbs index 07ff31b..e234254 100644 --- a/ambari-web/app/templates/wizard/step3/step3_host_warnings_popup.hbs +++ b/ambari-web/app/templates/wizard/step3/step3_host_warnings_popup.hbs @@ -20,9 +20,7 @@ {{t installer.step3.hostWarningsPopup.checks}} {{view.warningsNotice}}. - {{t installer.step3.hostWarningsPopup.notice.beginning}} - {{t installer.step3.hostWarningsPopup.notice.command}} - {{t installer.step3.hostWarningsPopup.notice.end}} + {{t installer.step3.hostWarningsPopup.notice.beginning}}
[31/50] [abbrv] ambari git commit: AMBARI-21060. HDP 3.0 TP - create service definition for Oozie with configs, kerberos, widgets, etc.(vbrodetskyi)
AMBARI-21060. HDP 3.0 TP - create service definition for Oozie with configs, kerberos, widgets, etc.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cdc18ecb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cdc18ecb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cdc18ecb Branch: refs/heads/branch-feature-AMBARI-12556 Commit: cdc18ecb9d06ef6810962fb3742d75781ff8e831 Parents: 74972de Author: Vitaly BrodetskyiAuthored: Mon May 22 15:41:25 2017 +0300 Committer: Vitaly Brodetskyi Committed: Mon May 22 15:42:16 2017 +0300 -- .../common-services/OOZIE/4.2.0.3.0/alerts.json | 45 ++ .../OOZIE/4.2.0.3.0/configuration/oozie-env.xml | 255 + .../4.2.0.3.0/configuration/oozie-log4j.xml | 149 ++ .../4.2.0.3.0/configuration/oozie-site.xml | 254 + .../OOZIE/4.2.0.3.0/kerberos.json | 70 +++ .../OOZIE/4.2.0.3.0/metainfo.xml| 203 .../package/alerts/alert_check_oozie_server.py | 244 + .../4.2.0.3.0/package/files/oozieSmoke2.sh | 84 +++ .../files/prepareOozieHdfsDirectories.sh| 42 ++ .../4.2.0.3.0/package/files/wrap_ooziedb.sh | 31 ++ .../scripts/check_oozie_server_status.py| 38 ++ .../OOZIE/4.2.0.3.0/package/scripts/oozie.py| 516 +++ .../4.2.0.3.0/package/scripts/oozie_client.py | 78 +++ .../4.2.0.3.0/package/scripts/oozie_server.py | 163 ++ .../package/scripts/oozie_server_upgrade.py | 237 + .../4.2.0.3.0/package/scripts/oozie_service.py | 188 +++ .../OOZIE/4.2.0.3.0/package/scripts/params.py | 39 ++ .../4.2.0.3.0/package/scripts/params_linux.py | 374 ++ .../4.2.0.3.0/package/scripts/params_windows.py | 34 ++ .../4.2.0.3.0/package/scripts/service_check.py | 140 + .../4.2.0.3.0/package/scripts/status_params.py | 65 +++ .../package/templates/adminusers.txt.j2 | 28 + .../templates/input.config-oozie.json.j2| 48 ++ .../package/templates/oozie-log4j.properties.j2 | 93 .../4.2.0.3.0/package/templates/oozie.conf.j2 | 35 ++ .../package/templates/zkmigrator_jaas.conf.j2 | 26 + .../OOZIE/4.2.0.3.0/quicklinks/quicklinks.json | 45 ++ .../OOZIE/4.2.0.3.0/role_command_order.json | 9 + .../OOZIE/4.2.0.3.0/themes/theme.json | 116 + .../stacks/HDP/3.0/services/OOZIE/metainfo.xml | 27 + 30 files changed, 3676 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/cdc18ecb/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.3.0/alerts.json -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.3.0/alerts.json b/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.3.0/alerts.json new file mode 100644 index 000..a1d267f --- /dev/null +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.3.0/alerts.json @@ -0,0 +1,45 @@ +{ + "OOZIE": { +"service": [], +"OOZIE_SERVER": [ + { +"name": "oozie_server_webui", +"label": "Oozie Server Web UI", +"description": "This host-level alert is triggered if the Oozie server Web UI is unreachable.", +"interval": 1, +"scope": "ANY", +"source": { + "type": "WEB", + "uri": { +"http": "{{oozie-site/oozie.base.url}}/?user.name={{oozie-env/oozie_user}}", +"kerberos_keytab": "{{cluster-env/smokeuser_keytab}}", +"kerberos_principal": "{{cluster-env/smokeuser_principal_name}}", +"connection_timeout": 5.0 + }, + "reporting": { +"ok": { + "text": "HTTP {0} response in {2:.3f}s" +}, +"warning":{ + "text": "HTTP {0} response from {1} in {2:.3f}s ({3})" +}, +"critical": { + "text": "Connection failed to {1} ({3})" +} + } +} + }, + { +"name": "oozie_server_status", +"label": "Oozie Server Status", +"description": "This host-level alert is triggered if the Oozie server cannot be determined to be up and responding to client requests.", +"interval": 1, +"scope": "ANY", +"source": { + "type": "SCRIPT", + "path": "OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py" +} + } +] + } +} http://git-wip-us.apache.org/repos/asf/ambari/blob/cdc18ecb/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.3.0/configuration/oozie-env.xml -- diff --git
[02/50] [abbrv] ambari git commit: AMBARI-21039. Atlas web UI inaccessible after adding Atlas service on upgraded cluster with Hive because /etc/atlas/conf symlink was created ahead of time (alejandro
AMBARI-21039. Atlas web UI inaccessible after adding Atlas service on upgraded cluster with Hive because /etc/atlas/conf symlink was created ahead of time (alejandro) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9cb87011 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9cb87011 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9cb87011 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: 9cb87011c716e6fc8eeec0b2ca57a75fa9c7d2d9 Parents: 2e27f66 Author: Alejandro FernandezAuthored: Thu May 18 12:16:33 2017 -0400 Committer: Alejandro Fernandez Committed: Thu May 18 12:16:33 2017 -0400 -- .../libraries/functions/conf_select.py | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9cb87011/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py b/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py index ce00f0c..facf186 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py @@ -356,11 +356,16 @@ def select(stack_name, package, version, try_create=True, ignore_errors=False): then the Atlas RPM will not be able to copy its artifacts into /etc/atlas/conf directory and therefore prevent Ambari from by copying those unmanaged contents into /etc/atlas/$version/0 ''' - parent_dir = os.path.dirname(current_dir) - if os.path.exists(parent_dir): -Link(conf_dir, to=current_dir) + component_list = default("/localComponents", []) + if "ATLAS_SERVER" in component_list or "ATLAS_CLIENT" in component_list: +Logger.info("Atlas is installed on this host.") +parent_dir = os.path.dirname(current_dir) +if os.path.exists(parent_dir): + Link(conf_dir, to=current_dir) +else: + Logger.info("Will not create symlink from {0} to {1} because the destination's parent dir does not exist.".format(conf_dir, current_dir)) else: -Logger.info("Will not create symlink from {0} to {1} because the destination's parent dir does not exist.".format(conf_dir, current_dir)) +Logger.info("Will not create symlink from {0} to {1} because Atlas is not installed on this host.".format(conf_dir, current_dir)) else: # Normal path for other packages Link(conf_dir, to=current_dir)
[28/50] [abbrv] ambari git commit: AMBARI-21033 Log Search use POJOs for input configuration (mgergely)
AMBARI-21033 Log Search use POJOs for input configuration (mgergely) Change-Id: Ibf28c16309cf3ced0f0eea69d832ecd8accd2d62 Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fd4a7a46 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fd4a7a46 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fd4a7a46 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: fd4a7a46a2db9869dca28294660ca40e693504ea Parents: cbb1e90 Author: Miklos GergelyAuthored: Mon May 22 12:49:50 2017 +0200 Committer: Miklos Gergely Committed: Mon May 22 12:49:50 2017 +0200 -- .../ambari-logsearch-config-api/pom.xml | 14 +- .../config/api/InputConfigMonitor.java | 13 +- .../logsearch/config/api/LogSearchConfig.java | 3 +- .../config/api/LogSearchConfigFactory.java | 10 +- .../api/model/inputconfig/Conditions.java | 24 +++ .../config/api/model/inputconfig/Fields.java| 26 +++ .../api/model/inputconfig/FilterDescriptor.java | 39 .../model/inputconfig/FilterGrokDescriptor.java | 28 +++ .../model/inputconfig/FilterJsonDescriptor.java | 23 +++ .../inputconfig/FilterKeyValueDescriptor.java | 28 +++ .../api/model/inputconfig/InputConfig.java | 28 +++ .../api/model/inputconfig/InputDescriptor.java | 54 + .../inputconfig/InputFileBaseDescriptor.java| 28 +++ .../model/inputconfig/InputFileDescriptor.java | 23 +++ .../inputconfig/InputS3FileDescriptor.java | 26 +++ .../model/inputconfig/MapDateDescriptor.java| 26 +++ .../inputconfig/MapFieldCopyDescriptor.java | 24 +++ .../model/inputconfig/MapFieldDescriptor.java | 24 +++ .../inputconfig/MapFieldNameDescriptor.java | 24 +++ .../inputconfig/MapFieldValueDescriptor.java| 26 +++ .../api/model/inputconfig/PostMapValues.java| 26 +++ .../config/api/LogSearchConfigClass1.java | 3 +- .../config/api/LogSearchConfigClass2.java | 3 +- .../ambari-logsearch-config-zookeeper/pom.xml | 6 + .../config/zookeeper/LogSearchConfigZK.java | 72 ++- .../model/inputconfig/impl/ConditionsImpl.java | 37 .../model/inputconfig/impl/FieldsImpl.java | 39 .../model/inputconfig/impl/FilterAdapter.java | 42 .../inputconfig/impl/FilterDescriptorImpl.java | 113 ++ .../impl/FilterGrokDescriptorImpl.java | 66 ++ .../impl/FilterJsonDescriptorImpl.java | 25 +++ .../impl/FilterKeyValueDescriptorImpl.java | 63 ++ .../model/inputconfig/impl/InputAdapter.java| 58 ++ .../model/inputconfig/impl/InputConfigGson.java | 46 + .../model/inputconfig/impl/InputConfigImpl.java | 54 + .../inputconfig/impl/InputDescriptorImpl.java | 204 +++ .../impl/InputFileBaseDescriptorImpl.java | 66 ++ .../impl/InputFileDescriptorImpl.java | 25 +++ .../impl/InputS3FileDescriptorImpl.java | 53 + .../inputconfig/impl/MapDateDescriptorImpl.java | 58 ++ .../impl/MapFieldCopyDescriptorImpl.java| 45 .../impl/MapFieldNameDescriptorImpl.java| 45 .../impl/MapFieldValueDescriptorImpl.java | 58 ++ .../inputconfig/impl/PostMapValuesAdapter.java | 99 + .../inputconfig/impl/PostMapValuesImpl.java | 40 .../org/apache/ambari/logfeeder/LogFeeder.java | 2 +- .../ambari/logfeeder/common/ConfigBlock.java| 107 +- .../ambari/logfeeder/common/ConfigHandler.java | 126 ++-- .../ambari/logfeeder/common/ConfigItem.java | 97 + .../apache/ambari/logfeeder/filter/Filter.java | 53 +++-- .../ambari/logfeeder/filter/FilterGrok.java | 11 +- .../ambari/logfeeder/filter/FilterJSON.java | 3 - .../ambari/logfeeder/filter/FilterKeyValue.java | 12 +- .../logfeeder/input/AbstractInputFile.java | 16 +- .../apache/ambari/logfeeder/input/Input.java| 112 ++ .../ambari/logfeeder/input/InputFile.java | 6 +- .../ambari/logfeeder/input/InputS3File.java | 5 +- .../ambari/logfeeder/input/InputSimulate.java | 23 +-- .../logfeeder/loglevelfilter/FilterLogData.java | 2 +- .../apache/ambari/logfeeder/mapper/Mapper.java | 4 +- .../ambari/logfeeder/mapper/MapperDate.java | 15 +- .../logfeeder/mapper/MapperFieldCopy.java | 13 +- .../logfeeder/mapper/MapperFieldName.java | 14 +- .../logfeeder/mapper/MapperFieldValue.java | 14 +- .../apache/ambari/logfeeder/output/Output.java | 3 - .../logfeeder/output/OutputLineFilter.java | 2 +- .../ambari/logfeeder/output/OutputManager.java | 8 +- .../ambari/logfeeder/output/OutputS3File.java | 96 - .../ambari/logfeeder/util/LogFeederUtil.java| 51 - .../ambari/logfeeder/filter/FilterGrokTest.java | 37 ++--
[39/50] [abbrv] ambari git commit: AMBARI-21084.Files view on IE 11- On Concatenating files or downloading, the concatenated or downloaded file occupies the entire UI.(Venkata Sairam)
AMBARI-21084.Files view on IE 11- On Concatenating files or downloading, the concatenated or downloaded file occupies the entire UI.(Venkata Sairam) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7c929539 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7c929539 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7c929539 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: 7c9295395923a95ada6e51100b14d1e535590caa Parents: 32501f6 Author: Venkata SairamAuthored: Tue May 23 14:26:15 2017 +0530 Committer: Venkata Sairam Committed: Tue May 23 14:26:15 2017 +0530 -- .../java/org/apache/ambari/view/filebrowser/DownloadService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7c929539/contrib/views/files/src/main/java/org/apache/ambari/view/filebrowser/DownloadService.java -- diff --git a/contrib/views/files/src/main/java/org/apache/ambari/view/filebrowser/DownloadService.java b/contrib/views/files/src/main/java/org/apache/ambari/view/filebrowser/DownloadService.java index 10b7c9e..1334c06 100644 --- a/contrib/views/files/src/main/java/org/apache/ambari/view/filebrowser/DownloadService.java +++ b/contrib/views/files/src/main/java/org/apache/ambari/view/filebrowser/DownloadService.java @@ -112,7 +112,7 @@ public class DownloadService extends HdfsService { ResponseBuilder result = Response.ok(fs); if (download) { result.header("Content-Disposition", - "inline; filename=\"" + status.getPath().getName() + "\"").type(MediaType.APPLICATION_OCTET_STREAM); + "attachment; filename=\"" + status.getPath().getName() + "\"").type(MediaType.APPLICATION_OCTET_STREAM); } else { FileNameMap fileNameMap = URLConnection.getFileNameMap(); String mimeType = fileNameMap.getContentTypeFor(status.getPath().getName()); @@ -278,7 +278,7 @@ public class DownloadService extends HdfsService { }; ResponseBuilder response = Response.ok(result); if (request.download) { -response.header("Content-Disposition", "inline; filename=\"concatResult.txt\"").type(MediaType.APPLICATION_OCTET_STREAM); +response.header("Content-Disposition", "attachment; filename=\"concatResult.txt\"").type(MediaType.APPLICATION_OCTET_STREAM); } else { response.header("Content-Disposition", "filename=\"concatResult.txt\"").type(MediaType.TEXT_PLAIN); }
[12/50] [abbrv] ambari git commit: AMBARI-21057. Change Storage of Data on Request/Stage/Task To Reduce Redundency (dgrinenko via dlysnichenko)
http://git-wip-us.apache.org/repos/asf/ambari/blob/f2bbe478/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionDBAccessorImpl.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionDBAccessorImpl.java b/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionDBAccessorImpl.java index c1056dd..75ad9ab 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionDBAccessorImpl.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionDBAccessorImpl.java @@ -193,7 +193,7 @@ public class TestActionDBAccessorImpl { List stages = new ArrayList<>(); stages.add(createStubStage(hostName, requestId, stageId)); stages.add(createStubStage(hostName, requestId, stageId + 1)); -Request request = new Request(stages, clusters); +Request request = new Request(stages, "", clusters); db.persistActions(request); assertEquals(2, stages.size()); } @@ -539,7 +539,7 @@ public class TestActionDBAccessorImpl { @Test public void testAbortRequest() throws AmbariException { Stage s = stageFactory.createNew(requestId, "/a/b", "cluster1", 1L, "action db accessor test", - "clusterHostInfo", "commandParamsStage", "hostParamsStage"); + "commandParamsStage", "hostParamsStage"); s.setStageId(stageId); clusters.addHost("host2"); @@ -576,7 +576,8 @@ public class TestActionDBAccessorImpl { String hostName = cmd.getHostName(); cmd.setStatus(HostRoleStatus.COMPLETED); -Request request = new Request(stages, clusters); +Request request = new Request(stages, "", clusters); +request.setClusterHostInfo("clusterHostInfo"); db.persistActions(request); db.abortOperation(requestId); @@ -620,7 +621,7 @@ public class TestActionDBAccessorImpl { stages.add(stage); -Request request = new Request(stages, clusters); +Request request = new Request(stages, "", clusters); // persist entities db.persistActions(request); @@ -668,7 +669,7 @@ public class TestActionDBAccessorImpl { @Test public void testGet1000TasksFromOracleDB() throws Exception { Stage s = stageFactory.createNew(requestId, "/a/b", "cluster1", 1L, "action db accessor test", - "clusterHostInfo", "commandParamsStage", "hostParamsStage"); + "commandParamsStage", "hostParamsStage"); s.setStageId(stageId); for (int i = 1000; i < 2002; i++) { String host = "host" + i; @@ -681,7 +682,8 @@ public class TestActionDBAccessorImpl { List stages = new ArrayList<>(); stages.add(s); -Request request = new Request(stages, clusters); +Request request = new Request(stages, "", clusters); +request.setClusterHostInfo("clusterHostInfo"); db.persistActions(request); List entities = @@ -709,7 +711,7 @@ public class TestActionDBAccessorImpl { Stage s = createStubStage(hostname, requestId, stageId); List stages = new ArrayList<>(); stages.add(s); -Request request = new Request(stages, clusters); +Request request = new Request(stages, "", clusters); db.persistActions(request); } @@ -723,7 +725,7 @@ public class TestActionDBAccessorImpl { stages.add(stage); } -Request request = new Request(stages, clusters); +Request request = new Request(stages, "", clusters); db.persistActions(request); } @@ -733,7 +735,7 @@ public class TestActionDBAccessorImpl { Stage s = createStubStage(hostname, requestId, stageId); List stages = new ArrayList<>(); stages.add(s); -Request request = new Request(stages, clusters); +Request request = new Request(stages, "", clusters); s.setHostRoleStatus(hostname, Role.HBASE_REGIONSERVER.name(), HostRoleStatus.COMPLETED); s.setHostRoleStatus(hostname, Role.HBASE_MASTER.name(), HostRoleStatus.COMPLETED); @@ -747,7 +749,7 @@ public class TestActionDBAccessorImpl { List stages = new ArrayList<>(); stages.add(s); -Request request = new Request(stages, clusters); +Request request = new Request(stages, "", clusters); s.setHostRoleStatus(hostname, Role.HBASE_REGIONSERVER.name(), HostRoleStatus.PENDING); s.setHostRoleStatus(hostname, Role.HBASE_MASTER.name(), HostRoleStatus.COMPLETED); @@ -756,7 +758,7 @@ public class TestActionDBAccessorImpl { private Stage createStubStage(String hostname, long requestId, long stageId) { Stage s = stageFactory.createNew(requestId, "/a/b", "cluster1", 1L, "action db accessor test", - "clusterHostInfo", "commandParamsStage", "hostParamsStage"); + "commandParamsStage", "hostParamsStage"); s.setStageId(stageId); s.addHostRoleExecutionCommand(hostname, Role.HBASE_MASTER, RoleCommand.START, @@ -774,7 +776,7 @@ public class TestActionDBAccessorImpl { private void
[25/50] [abbrv] ambari git commit: AMBARI-21033 Log Search use POJOs for input configuration (mgergely)
http://git-wip-us.apache.org/repos/asf/ambari/blob/fd4a7a46/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/common/LSServerInputFile.java -- diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/common/LSServerInputFile.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/common/LSServerInputFile.java new file mode 100644 index 000..5c547ad --- /dev/null +++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/common/LSServerInputFile.java @@ -0,0 +1,31 @@ +/* + * 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.logsearch.model.common; + +import org.apache.ambari.logsearch.config.api.model.inputconfig.InputDescriptor; + +import io.swagger.annotations.ApiModel; + +@ApiModel +public class LSServerInputFile extends LSServerInputFileBase { + public LSServerInputFile(InputDescriptor inputDescriptor) { +super(inputDescriptor); + } +} http://git-wip-us.apache.org/repos/asf/ambari/blob/fd4a7a46/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/common/LSServerInputFileBase.java -- diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/common/LSServerInputFileBase.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/common/LSServerInputFileBase.java new file mode 100644 index 000..df21d0d --- /dev/null +++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/common/LSServerInputFileBase.java @@ -0,0 +1,72 @@ +/* + * 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.logsearch.model.common; + +import org.apache.ambari.logsearch.config.api.model.inputconfig.InputDescriptor; +import org.apache.ambari.logsearch.config.api.model.inputconfig.InputFileBaseDescriptor; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import io.swagger.annotations.ApiModel; + +@ApiModel +public abstract class LSServerInputFileBase extends LSServerInput { + @JsonProperty("checkpoint_interval_ms") + private Integer checkpointIntervalMs; + + @JsonProperty("process_file") + private Boolean processFile; + + @JsonProperty("copy_file") + private Boolean copyFile; + + public LSServerInputFileBase(InputDescriptor inputDescriptor) { +super(inputDescriptor); + +InputFileBaseDescriptor inputFileBaseDescriptor = (InputFileBaseDescriptor)inputDescriptor; +this.checkpointIntervalMs = inputFileBaseDescriptor.getCheckpointIntervalMs(); +this.processFile = inputFileBaseDescriptor.getProcessFile(); +this.copyFile = inputFileBaseDescriptor.getCopyFile(); + } + + public Integer getCheckpointIntervalMs() { +return checkpointIntervalMs; + } + + public void setCheckpointIntervalMs(Integer checkpointIntervalMs) { +this.checkpointIntervalMs = checkpointIntervalMs; + } + + public Boolean getProcessFile() { +return processFile; + } + + public void setProcessFile(Boolean processFile) { +this.processFile = processFile; + } + + public Boolean getCopyFile() { +return copyFile; + } + + public void setCopyFile(Boolean copyFile) { +
[03/50] [abbrv] ambari git commit: Revert "AMBARI-21046. UI: Upgrades should be started using repo_version_ids instead of version strings (alexantonenko)"
Revert "AMBARI-21046. UI: Upgrades should be started using repo_version_ids instead of version strings (alexantonenko)" This reverts commit 1568f800764a6b20f2f09330f112070ebc0f7f86. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0e5f2470 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0e5f2470 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0e5f2470 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: 0e5f24700afad30b5f0ac0512442019dedf392cb Parents: 9cb8701 Author: Alex AntonenkoAuthored: Thu May 18 19:40:31 2017 +0300 Committer: Alex Antonenko Committed: Thu May 18 19:41:47 2017 +0300 -- .../controllers/main/admin/stack_and_upgrade_controller.js| 7 ++- ambari-web/app/utils/ajax/ajax.js | 4 ++-- .../main/admin/stack_and_upgrade_controller_test.js | 6 -- 3 files changed, 4 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0e5f2470/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 d444b2d..0f2efb0 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 @@ -414,8 +414,7 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage, if (currentVersion) { this.set('currentVersion', { repository_version: currentVersion.get('repositoryVersion.repositoryVersion'), -repository_name: currentVersion.get('repositoryVersion.displayName'), -id: currentVersion.get('repositoryVersion.id') +repository_name: currentVersion.get('repositoryVersion.displayName') }); } }, @@ -737,7 +736,6 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage, from: App.RepositoryVersion.find().findProperty('displayName', this.get('upgradeVersion')).get('repositoryVersion'), value: currentVersion.repository_version, label: currentVersion.repository_name, -id: currentVersion.id, isDowngrade: true, upgradeType: this.get('upgradeType') }, @@ -1381,8 +1379,7 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage, label: version.get('displayName'), type: version.get('upgradeType'), skipComponentFailures: version.get('skipComponentFailures') ? 'true' : 'false', - skipSCFailures: version.get('skipSCFailures') ? 'true' : 'false', - id: version.get('id') + skipSCFailures: version.get('skipSCFailures') ? 'true' : 'false' }; if (App.get('supports.preUpgradeCheck')) { this.set('requestInProgress', true); http://git-wip-us.apache.org/repos/asf/ambari/blob/0e5f2470/ambari-web/app/utils/ajax/ajax.js -- diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js index 4dc04f4..f7d0914 100644 --- a/ambari-web/app/utils/ajax/ajax.js +++ b/ambari-web/app/utils/ajax/ajax.js @@ -1712,7 +1712,7 @@ var urls = { timeout : 60, data: JSON.stringify({ "Upgrade": { -"repository_version_id": data.id, +"repository_version": data.value, "upgrade_type": data.type, "skip_failures": data.skipComponentFailures, "skip_service_check_failures": data.skipSCFailures, @@ -1731,7 +1731,7 @@ var urls = { data: JSON.stringify({ "Upgrade": { "from_version": data.from, -"repository_version_id": data.id, +"repository_version": data.value, "upgrade_type": data.upgradeType, "direction": "DOWNGRADE" } http://git-wip-us.apache.org/repos/asf/ambari/blob/0e5f2470/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 fa0a0b9..e696bb1 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 @@ -128,7 +128,6 @@ describe('App.MainAdminStackAndUpgradeController', function() { sinon.stub(App.StackVersion, 'find').returns([Em.Object.create({ state: 'CURRENT',
[07/50] [abbrv] ambari git commit: AMBARI-21048. HDP 3.0 TP - create service definition for Storm with configs, kerberos, widgets, etc.(vbrodetsky)
AMBARI-21048. HDP 3.0 TP - create service definition for Storm with configs, kerberos, widgets, etc.(vbrodetsky) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6ab4d28a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6ab4d28a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6ab4d28a Branch: refs/heads/branch-feature-AMBARI-12556 Commit: 6ab4d28a6973cec9a2d04592bfa6fcdfcf081988 Parents: 0e5f247 Author: Vitaly BrodetskyiAuthored: Thu May 18 20:33:04 2017 +0300 Committer: Vitaly Brodetskyi Committed: Thu May 18 20:33:43 2017 +0300 -- .../common-services/STORM/1.0.1.3.0/alerts.json | 145 +++ .../configuration/ranger-storm-audit.xml| 133 ++ .../ranger-storm-plugin-properties.xml | 121 ++ .../ranger-storm-policymgr-ssl.xml | 70 + .../configuration/ranger-storm-security.xml | 67 + .../storm-atlas-application.properties.xml | 31 + .../configuration/storm-cluster-log4j.xml | 133 ++ .../STORM/1.0.1.3.0/configuration/storm-env.xml | 165 +++ .../1.0.1.3.0/configuration/storm-site.xml | 1002 +++ .../configuration/storm-worker-log4j.xml| 189 +++ .../STORM/1.0.1.3.0/kerberos.json | 134 ++ .../STORM/1.0.1.3.0/metainfo.xml| 179 +++ .../STORM/1.0.1.3.0/metrics.json| 1202 ++ .../alerts/check_supervisor_process_win.py | 50 + .../STORM/1.0.1.3.0/package/files/wordCount.jar | Bin 0 -> 690588 bytes .../1.0.1.3.0/package/scripts/drpc_server.py| 91 ++ .../STORM/1.0.1.3.0/package/scripts/nimbus.py | 116 ++ .../1.0.1.3.0/package/scripts/nimbus_prod.py| 81 ++ .../1.0.1.3.0/package/scripts/pacemaker.py | 90 ++ .../STORM/1.0.1.3.0/package/scripts/params.py | 28 + .../1.0.1.3.0/package/scripts/params_linux.py | 424 ++ .../1.0.1.3.0/package/scripts/params_windows.py | 60 + .../STORM/1.0.1.3.0/package/scripts/rest_api.py | 85 ++ .../STORM/1.0.1.3.0/package/scripts/service.py | 95 ++ .../1.0.1.3.0/package/scripts/service_check.py | 79 ++ .../package/scripts/setup_ranger_storm.py | 133 ++ .../1.0.1.3.0/package/scripts/status_params.py | 83 ++ .../STORM/1.0.1.3.0/package/scripts/storm.py| 182 +++ .../1.0.1.3.0/package/scripts/storm_upgrade.py | 177 +++ .../package/scripts/storm_yaml_utils.py | 53 + .../1.0.1.3.0/package/scripts/supervisor.py | 117 ++ .../package/scripts/supervisor_prod.py | 84 ++ .../package/scripts/supervisord_service.py | 33 + .../1.0.1.3.0/package/scripts/ui_server.py | 137 ++ .../package/templates/client_jaas.conf.j2 | 33 + .../1.0.1.3.0/package/templates/config.yaml.j2 | 75 ++ .../templates/input.config-storm.json.j2| 78 ++ .../templates/storm-metrics2.properties.j2 | 34 + .../1.0.1.3.0/package/templates/storm.conf.j2 | 35 + .../package/templates/storm_jaas.conf.j2| 65 + .../package/templates/worker-launcher.cfg.j2| 19 + .../STORM/1.0.1.3.0/quicklinks/quicklinks.json | 45 + .../STORM/1.0.1.3.0/role_command_order.json | 13 + .../STORM/1.0.1.3.0/widgets.json| 127 ++ .../stacks/HDP/3.0/services/STORM/metainfo.xml | 27 + 45 files changed, 6320 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6ab4d28a/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/alerts.json -- diff --git a/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/alerts.json b/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/alerts.json new file mode 100644 index 000..acd9d85 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/alerts.json @@ -0,0 +1,145 @@ +{ + "STORM": { +"service": [ + { +"name": "storm_supervisor_process_percent", +"label": "Percent Supervisors Available", +"interval": 1, +"scope": "SERVICE", +"enabled": true, +"source": { + "type": "AGGREGATE", + "alert_name": "storm_supervisor_process", + "reporting": { +"ok": { + "text": "affected: [{1}], total: [{0}]" +}, +"warning": { + "text": "affected: [{1}], total: [{0}]", + "value": 10 +}, +"critical": { + "text": "affected: [{1}], total: [{0}]", + "value": 30 +}, +"units" : "%", +"type": "PERCENT" + } +} + } +], +"STORM_UI_SERVER": [ + { +"name": "storm_webui", +"label": "Storm
[35/50] [abbrv] ambari git commit: AMBARI-21082 - Ambari 3.0: Outstanding wizard issues (rzang)
AMBARI-21082 - Ambari 3.0: Outstanding wizard issues (rzang) Change-Id: Ia6e54d7dbd529cce59d3e2cdcc8fd6ed6a04ce1b Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9415478d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9415478d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9415478d Branch: refs/heads/branch-feature-AMBARI-12556 Commit: 9415478dca03caf7f55ba21e8f00d954dc117757 Parents: 0626b78 Author: Richard ZangAuthored: Mon May 22 19:29:03 2017 -0700 Committer: Richard Zang Committed: Mon May 22 19:29:03 2017 -0700 -- ambari-web/app/styles/application.less| 11 ++- ambari-web/app/templates/wizard/step4.hbs | 16 ambari-web/app/views/wizard/step4_view.js | 7 ++- 3 files changed, 24 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9415478d/ambari-web/app/styles/application.less -- diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less index 2fc1cf2..95990b8 100644 --- a/ambari-web/app/styles/application.less +++ b/ambari-web/app/styles/application.less @@ -2671,4 +2671,13 @@ a.abort-icon:hover { &.overlay-visible { display: block; } -} \ No newline at end of file +} + +.step-marker { + .step-index { +display: block; +margin-top: -1px; +margin-left: 0.3px; + } +} + http://git-wip-us.apache.org/repos/asf/ambari/blob/9415478d/ambari-web/app/templates/wizard/step4.hbs -- diff --git a/ambari-web/app/templates/wizard/step4.hbs b/ambari-web/app/templates/wizard/step4.hbs index 9f1d7df..5a08250 100644 --- a/ambari-web/app/templates/wizard/step4.hbs +++ b/ambari-web/app/templates/wizard/step4.hbs @@ -34,17 +34,17 @@ -{{#each controller}} +{{#each service in controller}} {{#unless isHiddenOnSelectServicePage}} - - {{displayNameOnSelectServicePage}} - {{serviceVersionDisplay}} - {{{comments}}} + + {{service.displayNameOnSelectServicePage}} + {{service.serviceVersionDisplay}} + {{{service.comments}}} - {{view App.CheckboxView checkboxClassNamesBinding="serviceName" data-qa="toggle-service" - disabledBinding="isDisabled" - checkedBinding="isSelected" + {{view App.CheckboxView checkboxClassNamesBinding="service.serviceName" data-qa="toggle-service" + disabledBinding="service.isDisabled" + checkedBinding="service.isSelected" }} http://git-wip-us.apache.org/repos/asf/ambari/blob/9415478d/ambari-web/app/views/wizard/step4_view.js -- diff --git a/ambari-web/app/views/wizard/step4_view.js b/ambari-web/app/views/wizard/step4_view.js index 137b9f5..928d46c 100644 --- a/ambari-web/app/views/wizard/step4_view.js +++ b/ambari-web/app/views/wizard/step4_view.js @@ -21,6 +21,11 @@ var App = require('app'); App.WizardStep4View = Em.View.extend({ - templateName: require('templates/wizard/step4') + templateName: require('templates/wizard/step4'), + toggleCheckBox: function(event) { +if (event.context.get('isDisabled')) { return; } +var isSelected = event.context.get('isSelected'); +event.context.set('isSelected', !isSelected); + } });
[23/50] [abbrv] ambari git commit: Revert "ADDENDUM. AMBARI-21011. Upgrade Code. Append PATH to YARN config 'yarn.nodemanager.admin-env' for HDP 2.6."
Revert "ADDENDUM. AMBARI-21011. Upgrade Code. Append PATH to YARN config 'yarn.nodemanager.admin-env' for HDP 2.6." This reverts commit d0a5cd4a6b22f0c8e02bb7ceb2d5de11314f542a. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1603cd68 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1603cd68 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1603cd68 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: 1603cd6840852b69567523f74a4b708aa4bd6d73 Parents: ccd6b25 Author: Swapan ShridharAuthored: Mon May 22 01:26:16 2017 -0700 Committer: Swapan Shridhar Committed: Mon May 22 01:26:22 2017 -0700 -- .../resources/stacks/HDP/2.3/upgrades/config-upgrade.xml | 8 .../stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml | 6 -- .../main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml | 1 - .../resources/stacks/HDP/2.4/upgrades/config-upgrade.xml | 6 +- .../stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml | 6 -- .../main/resources/stacks/HDP/2.4/upgrades/upgrade-2.6.xml | 1 - .../resources/stacks/HDP/2.5/upgrades/config-upgrade.xml | 8 .../stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml | 6 -- .../main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml | 4 .../resources/stacks/HDP/2.6/upgrades/config-upgrade.xml | 4 .../stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml | 7 --- .../main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml | 1 - 12 files changed, 1 insertion(+), 57 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1603cd68/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml index 98bb056..8b5c07d 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml @@ -546,14 +546,6 @@ - - - -yarn-site - - - - http://git-wip-us.apache.org/repos/asf/ambari/blob/1603cd68/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml index 4d2b3ec..5aa08c5 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml @@ -353,12 +353,6 @@ - - - Updating YARN NodeManager admin env config - - - http://git-wip-us.apache.org/repos/asf/ambari/blob/1603cd68/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml index f1dd943..d98bb53 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml @@ -789,7 +789,6 @@ - http://git-wip-us.apache.org/repos/asf/ambari/blob/1603cd68/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml index b448a2d..b3d19d4 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml @@ -332,11 +332,7 @@ - -yarn-site - - - + http://git-wip-us.apache.org/repos/asf/ambari/blob/1603cd68/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml
[08/50] [abbrv] ambari git commit: AMBARI-21051. HDP 3.0 TP - create Service Advisor for Storm.(vbrodetsky)
AMBARI-21051. HDP 3.0 TP - create Service Advisor for Storm.(vbrodetsky) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7dc2ddc7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7dc2ddc7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7dc2ddc7 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: 7dc2ddc72bce3dc944191c7797d2672c1f3b4fcb Parents: 6ab4d28 Author: Vitaly BrodetskyiAuthored: Thu May 18 20:39:00 2017 +0300 Committer: Vitaly Brodetskyi Committed: Thu May 18 20:39:00 2017 +0300 -- .../STORM/1.0.1.3.0/service_advisor.py | 387 +++ 1 file changed, 387 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7dc2ddc7/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/service_advisor.py -- diff --git a/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/service_advisor.py b/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/service_advisor.py new file mode 100644 index 000..1d6bbe0 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/service_advisor.py @@ -0,0 +1,387 @@ +#!/usr/bin/env ambari-python-wrap +""" +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. +""" + +# Python imports +import imp +import os +import traceback +import re +import socket +import fnmatch + + +from resource_management.core.logger import Logger +from resource_management.libraries.functions.get_bare_principal import get_bare_principal + +SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) +STACKS_DIR = os.path.join(SCRIPT_DIR, '../../../stacks/') +PARENT_FILE = os.path.join(STACKS_DIR, 'service_advisor.py') + +try: + with open(PARENT_FILE, 'rb') as fp: +service_advisor = imp.load_module('service_advisor', fp, PARENT_FILE, ('.py', 'rb', imp.PY_SOURCE)) +except Exception as e: + traceback.print_exc() + print "Failed to load parent" + +class StormServiceAdvisor(service_advisor.ServiceAdvisor): + + def __init__(self, *args, **kwargs): +self.as_super = super(StormServiceAdvisor, self) +self.as_super.__init__(*args, **kwargs) + +# Always call these methods +self.modifyMastersWithMultipleInstances() +self.modifyCardinalitiesDict() +self.modifyHeapSizeProperties() +self.modifyNotValuableComponents() +self.modifyComponentsNotPreferableOnServer() +self.modifyComponentLayoutSchemes() + + def modifyMastersWithMultipleInstances(self): +""" +Modify the set of masters with multiple instances. +Must be overriden in child class. +""" +# Nothing to do +pass + + def modifyCardinalitiesDict(self): +""" +Modify the dictionary of cardinalities. +Must be overriden in child class. +""" +# Nothing to do +pass + + def modifyHeapSizeProperties(self): +""" +Modify the dictionary of heap size properties. +Must be overriden in child class. +""" +pass + + def modifyNotValuableComponents(self): +""" +Modify the set of components whose host assignment is based on other services. +Must be overriden in child class. +""" +# Nothing to do +pass + + def modifyComponentsNotPreferableOnServer(self): +""" +Modify the set of components that are not preferable on the server. +Must be overriden in child class. +""" +# Nothing to do +pass + + def modifyComponentLayoutSchemes(self): +""" +Modify layout scheme dictionaries for components. +The scheme dictionary basically maps the number of hosts to +host index where component should exist. +Must be overriden in child class. +""" +# Nothing to do +pass + + def getServiceComponentLayoutValidations(self, services, hosts): +""" +Get a list of errors. +Must be overriden in child class. +""" + +return [] + + def getServiceConfigurationRecommendations(self, configurations, clusterData, services, hosts): +""" +Entry
[19/50] [abbrv] ambari git commit: Revert "AMBARI-21011. Append PATH to YARN config 'yarn.nodemanager.admin-env' for HDP 2.6."
Revert "AMBARI-21011. Append PATH to YARN config 'yarn.nodemanager.admin-env' for HDP 2.6." This reverts commit 6e4331e92f6b42fab3d36ea64df42019ae73e715 Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/55af3363 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/55af3363 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/55af3363 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: 55af3363582162487eef3363f5ae5c4a16872652 Parents: 0a61f98 Author: Swapan ShridharAuthored: Sat May 20 00:34:11 2017 -0700 Committer: Swapan Shridhar Committed: Sat May 20 00:34:37 2017 -0700 -- .../HDP/2.6/services/YARN/configuration/yarn-site.xml | 9 - 1 file changed, 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/55af3363/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml index 754a2c2..cab0e65 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml @@ -102,15 +102,6 @@ -yarn.nodemanager.admin-env - MALLOC_ARENA_MAX=$MALLOC_ARENA_MAX,PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:$PATH - - Environment variables that should be forwarded from the NodeManager's - environment to the container's. - - - - yarn.nodemanager.kill-escape.launch-command-line slider-agent,LLAP
[14/50] [abbrv] ambari git commit: AMBARI-21074 - Storm XML File has Invalid Characters Causing Exceptions on Server Startup (jonathanhurley)
AMBARI-21074 - Storm XML File has Invalid Characters Causing Exceptions on Server Startup (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f952c9ee Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f952c9ee Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f952c9ee Branch: refs/heads/branch-feature-AMBARI-12556 Commit: f952c9eecdc8cba07117ecb39265f05e6ef47341 Parents: f2bbe47 Author: Jonathan HurleyAuthored: Fri May 19 10:19:49 2017 -0400 Committer: Jonathan Hurley Committed: Fri May 19 10:19:49 2017 -0400 -- .../common-services/STORM/0.9.1/configuration/storm-env.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f952c9ee/ambari-server/src/main/resources/common-services/STORM/0.9.1/configuration/storm-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1/configuration/storm-env.xml b/ambari-server/src/main/resources/common-services/STORM/0.9.1/configuration/storm-env.xml index cfa33e2..3d4edad 100644 --- a/ambari-server/src/main/resources/common-services/STORM/0.9.1/configuration/storm-env.xml +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1/configuration/storm-env.xml @@ -128,11 +128,11 @@ export STORM_HOME={{storm_component_home_dir}} #set storm-auto creds # check if storm_jaas.conf in config , only enable storm_auto_creds in secure mode. -STORM_HOME="$(dirname $(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ))" +STORM_HOME="$(dirname $(cd "$( dirname "${BASH_SOURCE[0]}" )" pwd ))" STORM_JAAS_CONF=$STORM_HOME/config/storm_jaas.conf STORM_AUTOCREDS_LIB_DIR=/usr/hdp/current/storm-client/external/storm-autocreds -if [ -f $STORM_JAAS_CONF ] && [ -d $STORM_AUTOCREDS_LIB_DIR ]; then +if [ -f $STORM_JAAS_CONF ] [ -d $STORM_AUTOCREDS_LIB_DIR ]; then export STORM_EXT_CLASSPATH=$STORM_AUTOCREDS_LIB_DIR fi
[24/50] [abbrv] ambari git commit: AMBARI-21057. Change Storage of Data on Request/Stage/Task To Reduce Redundency (dgrinenko via aonishuk)
AMBARI-21057. Change Storage of Data on Request/Stage/Task To Reduce Redundency (dgrinenko via aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cbb1e905 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cbb1e905 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cbb1e905 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: cbb1e9059669b2af7d63323321980d8cc0f9203f Parents: 1603cd6 Author: Andrew OnishukAuthored: Mon May 22 12:03:00 2017 +0300 Committer: Andrew Onishuk Committed: Mon May 22 12:03:00 2017 +0300 -- .../org/apache/ambari/server/checks/RangerSSLConfigCheck.java| 1 - .../ambari/server/controller/internal/StageResourceProvider.java | 1 - .../ambari/server/metrics/system/impl/AmbariMetricSinkImpl.java | 1 - .../java/org/apache/ambari/server/upgrade/UpgradeCatalog251.java | 4 ++-- .../ambari/server/checks/ServiceCheckValidityCheckTest.java | 1 - .../server/controller/internal/RequestStageContainerTest.java| 1 - .../controller/logging/LogSearchDataRetrievalServiceTest.java| 1 - .../apache/ambari/server/credentialapi/CredentialUtilTest.java | 1 - .../authorization/AmbariPamAuthenticationProviderTest.java | 1 - .../org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java | 1 - 10 files changed, 2 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/cbb1e905/ambari-server/src/main/java/org/apache/ambari/server/checks/RangerSSLConfigCheck.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/checks/RangerSSLConfigCheck.java b/ambari-server/src/main/java/org/apache/ambari/server/checks/RangerSSLConfigCheck.java index 02f6559..47a0ea0 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/checks/RangerSSLConfigCheck.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/checks/RangerSSLConfigCheck.java @@ -24,7 +24,6 @@ import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.controller.PrereqCheckRequest; import org.apache.ambari.server.state.stack.PrereqCheckStatus; import org.apache.ambari.server.state.stack.PrerequisiteCheck; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; http://git-wip-us.apache.org/repos/asf/ambari/blob/cbb1e905/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StageResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StageResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StageResourceProvider.java index 06aa68b..77757c6 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StageResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StageResourceProvider.java @@ -47,7 +47,6 @@ import org.apache.ambari.server.controller.spi.UnsupportedPropertyException; import org.apache.ambari.server.controller.utilities.PredicateHelper; import org.apache.ambari.server.orm.dao.HostRoleCommandDAO; import org.apache.ambari.server.orm.dao.HostRoleCommandStatusSummaryDTO; -import org.apache.ambari.server.orm.dao.RequestDAO; import org.apache.ambari.server.orm.dao.StageDAO; import org.apache.ambari.server.orm.entities.StageEntity; import org.apache.ambari.server.state.Cluster; http://git-wip-us.apache.org/repos/asf/ambari/blob/cbb1e905/ambari-server/src/main/java/org/apache/ambari/server/metrics/system/impl/AmbariMetricSinkImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/metrics/system/impl/AmbariMetricSinkImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/metrics/system/impl/AmbariMetricSinkImpl.java index a0765bf..83e422c 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/metrics/system/impl/AmbariMetricSinkImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/metrics/system/impl/AmbariMetricSinkImpl.java @@ -54,7 +54,6 @@ import org.apache.commons.lang.StringUtils; import org.apache.hadoop.metrics2.sink.timeline.AbstractTimelineMetricsSink; import org.apache.hadoop.metrics2.sink.timeline.TimelineMetric; import org.apache.hadoop.metrics2.sink.timeline.TimelineMetrics; - import org.apache.hadoop.metrics2.sink.timeline.cache.TimelineMetricsCache; import org.springframework.security.core.context.SecurityContextHolder;
[18/50] [abbrv] ambari git commit: Revert "ADDENDUM. AMBARI-21011. Upgrade Code. Append PATH to YARN config 'yarn.nodemanager.admin-env' for HDP 2.6."
Revert "ADDENDUM. AMBARI-21011. Upgrade Code. Append PATH to YARN config 'yarn.nodemanager.admin-env' for HDP 2.6." This reverts commit d0a5cd4a6b22f0c8e02bb7ceb2d5de11314f542a. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0a61f985 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0a61f985 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0a61f985 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: 0a61f9857ec95162801fc2c8aae05fef67fbbd52 Parents: d740384 Author: Swapan ShridharAuthored: Sat May 20 00:28:27 2017 -0700 Committer: Swapan Shridhar Committed: Sat May 20 00:29:40 2017 -0700 -- .../stacks/HDP/2.3/upgrades/config-upgrade.xml | 8 .../stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml | 6 -- .../resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml | 1 - .../stacks/HDP/2.4/upgrades/config-upgrade.xml | 6 +- .../stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml | 6 -- .../resources/stacks/HDP/2.4/upgrades/upgrade-2.6.xml | 1 - .../stacks/HDP/2.5/upgrades/config-upgrade.xml | 8 .../stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml | 6 -- .../resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml | 4 .../stacks/HDP/2.6/upgrades/config-upgrade.xml | 13 - .../stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml | 7 --- .../resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml | 1 - 12 files changed, 1 insertion(+), 66 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0a61f985/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml index 98bb056..8b5c07d 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml @@ -546,14 +546,6 @@ - - - -yarn-site - - - - http://git-wip-us.apache.org/repos/asf/ambari/blob/0a61f985/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml index 4d2b3ec..5aa08c5 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml @@ -353,12 +353,6 @@ - - - Updating YARN NodeManager admin env config - - - http://git-wip-us.apache.org/repos/asf/ambari/blob/0a61f985/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml index f1dd943..d98bb53 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml @@ -789,7 +789,6 @@ - http://git-wip-us.apache.org/repos/asf/ambari/blob/0a61f985/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml index b448a2d..b3d19d4 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml @@ -332,11 +332,7 @@ - -yarn-site - - - + http://git-wip-us.apache.org/repos/asf/ambari/blob/0a61f985/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml
[11/50] [abbrv] ambari git commit: AMBARI-21065. Update some YARN settings for HDP 2.6 stack (Siddharth Seth via smohanty)
AMBARI-21065. Update some YARN settings for HDP 2.6 stack (Siddharth Seth via smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f7a1d4e7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f7a1d4e7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f7a1d4e7 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: f7a1d4e7e7445eb49cfefabaf92ec518fc44d8ba Parents: 71ed281 Author: Sumit MohantyAuthored: Thu May 18 21:46:15 2017 -0700 Committer: Sumit Mohanty Committed: Thu May 18 22:32:31 2017 -0700 -- .../HDP/2.6/services/YARN/configuration/yarn-site.xml | 10 ++ .../resources/stacks/HDP/2.6/upgrades/config-upgrade.xml | 5 + .../stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml| 7 +++ .../resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml | 1 + 4 files changed, 23 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f7a1d4e7/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml index 6aa0bae..754a2c2 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml @@ -110,4 +110,14 @@ + +yarn.nodemanager.kill-escape.launch-command-line +slider-agent,LLAP + + + +yarn.nodemanager.kill-escape.user +hive + + http://git-wip-us.apache.org/repos/asf/ambari/blob/f7a1d4e7/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml index 628c119..a8ac1bc 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml @@ -123,6 +123,11 @@ yarn-site + +yarn-site + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/f7a1d4e7/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml index f844f98..ae7ffc5 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml @@ -334,6 +334,13 @@ + + + + Updating YARN NodeManager config for LLAP + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/f7a1d4e7/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml index ceb5b84..c2ae825 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml @@ -697,6 +697,7 @@ +
ambari git commit: AMBARI-21064. HDP 3.0 TP - create Service Advisor for Oozie.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/trunk a2eefe849 -> 1c19200cd AMBARI-21064. HDP 3.0 TP - create Service Advisor for Oozie.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1c19200c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1c19200c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1c19200c Branch: refs/heads/trunk Commit: 1c19200cd446159fba94395867184d2d144c48c7 Parents: a2eefe8 Author: Vitaly BrodetskyiAuthored: Wed May 24 01:10:29 2017 +0300 Committer: Vitaly Brodetskyi Committed: Wed May 24 01:10:29 2017 +0300 -- .../OOZIE/4.2.0.3.0/service_advisor.py | 314 +++ 1 file changed, 314 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1c19200c/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.3.0/service_advisor.py -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.3.0/service_advisor.py b/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.3.0/service_advisor.py new file mode 100644 index 000..d1e2b77 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.3.0/service_advisor.py @@ -0,0 +1,314 @@ +#!/usr/bin/env ambari-python-wrap +""" +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. +""" + +# Python imports +import imp +import os +import traceback +import re +import socket +import fnmatch + + +from resource_management.core.logger import Logger + +SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) +STACKS_DIR = os.path.join(SCRIPT_DIR, '../../../stacks/') +PARENT_FILE = os.path.join(STACKS_DIR, 'service_advisor.py') + +try: + with open(PARENT_FILE, 'rb') as fp: +service_advisor = imp.load_module('service_advisor', fp, PARENT_FILE, ('.py', 'rb', imp.PY_SOURCE)) +except Exception as e: + traceback.print_exc() + print "Failed to load parent" + +class OozieServiceAdvisor(service_advisor.ServiceAdvisor): + + def __init__(self, *args, **kwargs): +self.as_super = super(OozieServiceAdvisor, self) +self.as_super.__init__(*args, **kwargs) + +# Always call these methods +self.modifyMastersWithMultipleInstances() +self.modifyCardinalitiesDict() +self.modifyHeapSizeProperties() +self.modifyNotValuableComponents() +self.modifyComponentsNotPreferableOnServer() +self.modifyComponentLayoutSchemes() + + def modifyMastersWithMultipleInstances(self): +""" +Modify the set of masters with multiple instances. +Must be overriden in child class. +""" +# Nothing to do +pass + + def modifyCardinalitiesDict(self): +""" +Modify the dictionary of cardinalities. +Must be overriden in child class. +""" +# Nothing to do +pass + + def modifyHeapSizeProperties(self): +""" +Modify the dictionary of heap size properties. +Must be overriden in child class. +""" +pass + + def modifyNotValuableComponents(self): +""" +Modify the set of components whose host assignment is based on other services. +Must be overriden in child class. +""" +# Nothing to do +pass + + def modifyComponentsNotPreferableOnServer(self): +""" +Modify the set of components that are not preferable on the server. +Must be overriden in child class. +""" +# Nothing to do +pass + + def modifyComponentLayoutSchemes(self): +""" +Modify layout scheme dictionaries for components. +The scheme dictionary basically maps the number of hosts to +host index where component should exist. +Must be overriden in child class. +""" +self.componentLayoutSchemes.update({ + 'OOZIE_SERVER': {6: 1, 31: 2, "else": 3}, + }) + + def getServiceComponentLayoutValidations(self, services, hosts): +""" +Get a list of errors. +Must be overriden in child class. +""" + +return [] + + def getServiceConfigurationRecommendations(self, configurations, clusterData,
[3/3] ambari git commit: AMBARI-21078 - Merging Configurations On Service/Patch Upgrades Should Create New Configurations Only For Included Services (jonathanhurley)
AMBARI-21078 - Merging Configurations On Service/Patch Upgrades Should Create New Configurations Only For Included Services (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c4148d80 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c4148d80 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c4148d80 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: c4148d805c4145d545712bbce6127e7518a7b7ce Parents: a45f542 Author: Jonathan HurleyAuthored: Fri May 19 15:14:15 2017 -0400 Committer: Jonathan Hurley Committed: Tue May 23 17:35:11 2017 -0400 -- .../controller/AmbariManagementController.java | 2 +- .../AmbariManagementControllerImpl.java | 4 +- .../internal/ConfigGroupResourceProvider.java | 4 +- .../internal/UpgradeResourceProvider.java | 287 +-- .../ambari/server/orm/dao/ServiceConfigDAO.java | 18 +- .../apache/ambari/server/orm/dao/StackDAO.java | 14 + .../orm/entities/ServiceConfigEntity.java | 24 +- .../upgrades/ComponentVersionCheckAction.java | 5 +- .../upgrades/FinalizeUpgradeAction.java | 18 +- .../upgrades/UpdateDesiredStackAction.java | 7 +- .../ambari/server/stack/MasterHostResolver.java | 16 +- .../org/apache/ambari/server/state/Cluster.java | 16 +- .../ambari/server/state/ConfigFactory.java | 1 + .../ambari/server/state/ConfigHelper.java | 56 ++-- .../apache/ambari/server/state/ConfigImpl.java | 13 +- .../ambari/server/state/UpgradeContext.java | 68 - .../ambari/server/state/UpgradeHelper.java | 286 -- .../server/state/cluster/ClusterImpl.java | 108 --- .../server/state/configgroup/ConfigGroup.java | 2 +- .../state/configgroup/ConfigGroupFactory.java | 5 +- .../state/configgroup/ConfigGroupImpl.java | 35 ++- .../state/stack/upgrade/UpgradeScope.java | 9 - .../RequiredConfigPropertiesValidator.java | 3 +- .../server/upgrade/AbstractUpgradeCatalog.java | 3 +- .../TestActionSchedulerThreading.java | 35 ++- .../ambari/server/agent/AgentResourceTest.java | 2 + .../AmbariManagementControllerTest.java | 16 +- .../ConfigGroupResourceProviderTest.java| 5 +- .../StackUpgradeConfigurationMergeTest.java | 12 +- .../internal/UpgradeResourceProviderTest.java | 115 ++-- .../server/orm/dao/ServiceConfigDAOTest.java| 11 +- .../ComponentVersionCheckActionTest.java| 107 --- .../upgrades/UpgradeActionTest.java | 230 +++ .../ambari/server/state/ConfigGroupTest.java| 2 +- .../ambari/server/state/ConfigHelperTest.java | 2 +- .../ambari/server/state/UpgradeHelperTest.java | 107 +++ .../server/state/cluster/ClusterTest.java | 142 ++--- .../svccomphost/ServiceComponentHostTest.java | 6 +- .../upgrade/AbstractUpgradeCatalogTest.java | 6 +- .../server/upgrade/UpgradeCatalog210Test.java | 4 +- .../server/upgrade/UpgradeCatalog211Test.java | 2 +- .../server/upgrade/UpgradeCatalog220Test.java | 4 +- .../server/upgrade/UpgradeCatalog221Test.java | 4 +- .../server/upgrade/UpgradeCatalog222Test.java | 4 +- .../server/upgrade/UpgradeCatalog240Test.java | 36 +-- .../server/upgrade/UpgradeCatalog250Test.java | 34 +-- .../server/upgrade/UpgradeCatalog300Test.java | 6 +- 47 files changed, 1030 insertions(+), 866 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c4148d80/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java index fe01a0d..807bded 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java @@ -115,7 +115,7 @@ public interface AmbariManagementController { * TODO move this method to Cluster? doesn't seem to be on its place * @return config created */ - Config createConfig(StackId stackId, Cluster cluster, String type, Map properties, + Config createConfig(Cluster cluster, StackId stackId, String type, Map properties, String versionTag, Map > propertiesAttributes); /**
[1/3] ambari git commit: AMBARI-21078 - Merging Configurations On Service/Patch Upgrades Should Create New Configurations Only For Included Services (jonathanhurley)
Repository: ambari Updated Branches: refs/heads/branch-feature-AMBARI-12556 a45f5427b -> c4148d805 http://git-wip-us.apache.org/repos/asf/ambari/blob/c4148d80/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java index 98f5228..24c529d 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java @@ -42,6 +42,7 @@ import org.apache.ambari.annotations.Experimental; import org.apache.ambari.annotations.ExperimentalFeature; import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.H2DatabaseCleaner; +import org.apache.ambari.server.actionmanager.HostRoleCommandFactory; import org.apache.ambari.server.api.services.AmbariMetaInfo; import org.apache.ambari.server.controller.AmbariManagementController; import org.apache.ambari.server.controller.ClusterRequest; @@ -55,6 +56,7 @@ import org.apache.ambari.server.security.authorization.AuthorizationException; import org.apache.ambari.server.stack.HostsType; import org.apache.ambari.server.stack.MasterHostResolver; import org.apache.ambari.server.stack.StackManagerMock; +import org.apache.ambari.server.stageplanner.RoleGraphFactory; import org.apache.ambari.server.state.UpgradeHelper.UpgradeGroupHolder; import org.apache.ambari.server.state.stack.ConfigUpgradePack; import org.apache.ambari.server.state.stack.UpgradePack; @@ -100,6 +102,7 @@ import com.google.inject.util.Modules; */ public class UpgradeHelperTest { + private static final StackId STACK_ID_HDP_211 = new StackId("HDP-2.1.1"); private static final StackId STACK_ID_HDP_220 = new StackId("HDP-2.2.0"); private static final String UPGRADE_VERSION = "2.2.1.0-1234"; private static final String DOWNGRADE_VERSION = "2.2.0.0-1234"; @@ -113,8 +116,8 @@ public class UpgradeHelperTest { private ConfigHelper m_configHelper; private AmbariManagementController m_managementController; private Gson m_gson = new Gson(); - private UpgradeContextFactory m_upgradeContextFactory; + private RepositoryVersionEntity repositoryVersion2110; private RepositoryVersionEntity repositoryVersion2200; private RepositoryVersionEntity repositoryVersion2210; @@ -160,8 +163,8 @@ public class UpgradeHelperTest { m_upgradeHelper = injector.getInstance(UpgradeHelper.class); m_masterHostResolver = EasyMock.createMock(MasterHostResolver.class); m_managementController = injector.getInstance(AmbariManagementController.class); -m_upgradeContextFactory = injector.getInstance(UpgradeContextFactory.class); +repositoryVersion2110 = helper.getOrCreateRepositoryVersion(STACK_ID_HDP_211, "2.1.1.0-1234"); repositoryVersion2200 = helper.getOrCreateRepositoryVersion(STACK_ID_HDP_220, DOWNGRADE_VERSION); repositoryVersion2210 = helper.getOrCreateRepositoryVersion(STACK_ID_HDP_220, UPGRADE_VERSION); @@ -294,14 +297,9 @@ public class UpgradeHelperTest { Cluster cluster = makeCluster(); Set services = Collections.singleton("ZOOKEEPER"); -UpgradeContext context = EasyMock.createNiceMock(UpgradeContext.class); -EasyMock.expect(context.getCluster()).andReturn(cluster).anyTimes(); - EasyMock.expect(context.getType()).andReturn(UpgradeType.ROLLING).anyTimes(); - EasyMock.expect(context.getDirection()).andReturn(Direction.UPGRADE).anyTimes(); - EasyMock.expect(context.getRepositoryVersion()).andReturn(repositoryVersion2210).anyTimes(); - EasyMock.expect(context.getSupportedServices()).andReturn(services).anyTimes(); - EasyMock.expect(context.getRepositoryType()).andReturn(RepositoryType.PATCH).anyTimes(); -EasyMock.replay(context); + +UpgradeContext context = getMockUpgradeContext(cluster, Direction.UPGRADE, UpgradeType.ROLLING, +repositoryVersion2210, RepositoryType.PATCH, services); List groupings = upgrade.getGroups(Direction.UPGRADE); assertEquals(8, groupings.size()); @@ -460,7 +458,7 @@ public class UpgradeHelperTest { UpgradeType.ROLLING, repositoryVersion2210); // use a "real" master host resolver here so that we can actually test MM -MasterHostResolver masterHostResolver = new MasterHostResolver(null, context); +MasterHostResolver masterHostResolver = new MasterHostResolver(cluster, null, context); EasyMock.expect(context.getResolver()).andReturn(masterHostResolver).anyTimes(); replay(context); @@ -1525,14 +1523,10 @@ public class UpgradeHelperTest { String clusterName = "c1"; -String version = "2.1.1.0-1234"; StackId stackId = new StackId("HDP-2.1.1"); clusters.addCluster(clusterName, stackId); Cluster c =
ambari git commit: AMBARI-21052: Regex pattern for version number in Register Version UI should depend on stack's version dir (sangeetar)
Repository: ambari Updated Branches: refs/heads/trunk cd769e2e7 -> b5fdb57c5 AMBARI-21052: Regex pattern for version number in Register Version UI should depend on stack's version dir (sangeetar) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b5fdb57c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b5fdb57c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b5fdb57c Branch: refs/heads/trunk Commit: b5fdb57c5173cbf241782e9daa6dee4f4dc63c3c Parents: cd769e2 Author: Sangeeta RavindranAuthored: Tue May 23 14:02:10 2017 -0700 Committer: Sangeeta Ravindran Committed: Tue May 23 14:02:10 2017 -0700 -- .../stackVersions/StackVersionsCreateCtrl.js| 1 - .../ui/admin-web/app/scripts/i18n.config.js | 2 +- .../ui/admin-web/app/scripts/services/Stack.js | 32 +++- .../views/stackVersions/stackVersionPage.html | 4 +-- .../StackVersionsCreateCtrl_test.js | 6 ++-- 5 files changed, 37 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b5fdb57c/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js index 69c35c0..70f6658 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js @@ -34,7 +34,6 @@ angular.module('ambariAdminConsole') $scope.useRedhatSatellite = false; $scope.clusterName = $routeParams.clusterName; - $scope.subversionPattern = /^\d+\.\d+(-\d+)?$/; $scope.upgradeStack = { stack_name: '', stack_version: '', http://git-wip-us.apache.org/repos/asf/ambari/blob/b5fdb57c/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js index fd2c6e5..43b32da 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js @@ -374,7 +374,7 @@ angular.module('ambariAdminConsole') 'versions.deregister': 'Deregister Version', 'versions.deregisterConfirmation': 'Are you sure you want to deregister version {{versionName}} ?', -'versions.placeholder': 'Version Number (0.0)', +'versions.placeholder': 'Version Number {{pattern}}', 'versions.repos': 'Repositories', 'versions.os': 'OS', 'versions.baseURL': 'Base URL', http://git-wip-us.apache.org/repos/asf/ambari/blob/b5fdb57c/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js -- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js index b496987..a203b5c 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js @@ -88,6 +88,7 @@ angular.module('ambariAdminConsole') }, allPublicStackVersions: function() { + var self = this; var url = '/version_definitions?fields=VersionDefinition/stack_default,VersionDefinition/stack_repo_update_link_exists,operating_systems/repositories/Repositories/*,VersionDefinition/stack_services,VersionDefinition/repository_version' + '/show_available=true'; var deferred = $q.defer(); @@ -104,7 +105,6 @@ angular.module('ambariAdminConsole') stackNameVersion: version.VersionDefinition.stack_name + '-' + version.VersionDefinition.stack_version, displayName: version.VersionDefinition.stack_name + '-' + version.VersionDefinition.repository_version.split('-')[0], //HDP-2.3.4.0 displayNameFull: version.VersionDefinition.stack_name + '-' + version.VersionDefinition.repository_version, //HDP-2.3.4.0-23 - editableDisplayName: version.VersionDefinition.repository_version.substring(4), isNonXMLdata: true, repositoryVersion: version.VersionDefinition.repository_version, stackNameRepositoryVersion:
[ambari] Git Push Summary
Repository: ambari Updated Branches: refs/heads/branch-3.0-ams [created] cd769e2e7
[4/6] ambari git commit: AMBARI-21059. Reduce Dependency on Cluster Desired Stack ID (ncole)
http://git-wip-us.apache.org/repos/asf/ambari/blob/a45f5427/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog2121.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog2121.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog2121.java index 0487cd7..ab41b99 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog2121.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog2121.java @@ -31,6 +31,7 @@ import org.apache.ambari.server.state.Cluster; import org.apache.ambari.server.state.Clusters; import org.apache.ambari.server.state.Config; import org.apache.ambari.server.state.DesiredConfig; +import org.apache.ambari.server.state.Service; import org.apache.ambari.server.state.StackId; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; @@ -135,36 +136,47 @@ public class UpgradeCatalog2121 extends AbstractUpgradeCatalog { MapclusterMap = clusters.getClusters(); if ((clusterMap != null) && !clusterMap.isEmpty()) { // Iterate through the clusters and perform any configuration updates +Set stackIds = new HashSet<>(); + for (final Cluster cluster : clusterMap.values()) { - StackId currentStackVersion = cluster.getCurrentStackVersion(); - String currentStackName = currentStackVersion != null? currentStackVersion.getStackName() : null; - if (currentStackName != null && currentStackName.equalsIgnoreCase("PHD")) { -// Update configs only if PHD stack is deployed -Map desiredConfigs = cluster.getDesiredConfigs(); -if(desiredConfigs != null && !desiredConfigs.isEmpty()) { - for (Map.Entry dc : desiredConfigs.entrySet()) { -String configType = dc.getKey(); -DesiredConfig desiredConfig = dc.getValue(); -String configTag = desiredConfig.getTag(); -Config config = cluster.getConfig(configType, configTag); - -Map properties = config.getProperties(); -if(properties != null && !properties.isEmpty()) { - Map updates = new HashMap<>(); - for (Map.Entry property : properties.entrySet()) { -String propertyKey = property.getKey(); -String propertyValue = property.getValue(); -String modifiedPropertyValue = propertyValue; -for (String regex : replacements.keySet()) { - modifiedPropertyValue = modifiedPropertyValue.replaceAll(regex, replacements.get(regex)); + for (Service service : cluster.getServices().values()) { +StackId currentStackVersion = service.getDesiredStackId(); + +if (stackIds.contains(currentStackVersion)) { + continue; +} else { + stackIds.add(currentStackVersion); +} + +String currentStackName = currentStackVersion != null? currentStackVersion.getStackName() : null; +if (currentStackName != null && currentStackName.equalsIgnoreCase("PHD")) { + // Update configs only if PHD stack is deployed + Map desiredConfigs = cluster.getDesiredConfigs(); + if(desiredConfigs != null && !desiredConfigs.isEmpty()) { +for (Map.Entry dc : desiredConfigs.entrySet()) { + String configType = dc.getKey(); + DesiredConfig desiredConfig = dc.getValue(); + String configTag = desiredConfig.getTag(); + Config config = cluster.getConfig(configType, configTag); + + Map properties = config.getProperties(); + if(properties != null && !properties.isEmpty()) { +Map updates = new HashMap<>(); +for (Map.Entry property : properties.entrySet()) { + String propertyKey = property.getKey(); + String propertyValue = property.getValue(); + String modifiedPropertyValue = propertyValue; + for (String regex : replacements.keySet()) { +modifiedPropertyValue = modifiedPropertyValue.replaceAll(regex, replacements.get(regex)); + } + if (!modifiedPropertyValue.equals(propertyValue)) { +updates.put(propertyKey, modifiedPropertyValue); + } } -if (!modifiedPropertyValue.equals(propertyValue)) { -
[2/6] ambari git commit: AMBARI-21059. Reduce Dependency on Cluster Desired Stack ID (ncole)
http://git-wip-us.apache.org/repos/asf/ambari/blob/a45f5427/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterImplTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterImplTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterImplTest.java index ec5eef0..1a26ca6 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterImplTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterImplTest.java @@ -213,8 +213,10 @@ public class ClusterImplTest { String stackVersion = "HDP-2.1.1"; String repoVersion = "2.1.1-1234"; +StackId stackId = new StackId(stackVersion); +ormTestHelper.createStack(stackId); -clusters.addCluster(clusterName, new StackId(stackVersion)); +clusters.addCluster(clusterName, stackId); Cluster cluster = clusters.getCluster(clusterName); RepositoryVersionEntity repositoryVersion = ormTestHelper.getOrCreateRepositoryVersion( @@ -268,13 +270,13 @@ public class ClusterImplTest { @Test public void testDeleteHost() throws Exception { // Given - - String clusterName = "TEST_DELETE_HOST"; String hostName1 = "HOSTNAME1", hostName2 = "HOSTNAME2"; String hostToDelete = hostName2; +StackId stackId = new StackId("HDP-2.1.1"); -clusters.addCluster(clusterName, new StackId("HDP-2.1.1")); +ormTestHelper.createStack(stackId); +clusters.addCluster(clusterName, stackId); Cluster cluster = clusters.getCluster(clusterName); @@ -305,8 +307,6 @@ public class ClusterImplTest { catch(HostNotFoundException e){ } - - } @Test @@ -314,7 +314,9 @@ public class ClusterImplTest { // Given String clusterName = "TEST_CLUSTER_SIZE"; String hostName1 = "host1", hostName2 = "host2"; -clusters.addCluster(clusterName, new StackId("HDP-2.1.1")); +StackId stackId = new StackId("HDP", "2.1.1"); +ormTestHelper.createStack(stackId); +clusters.addCluster(clusterName, stackId); Cluster cluster = clusters.getCluster(clusterName); clusters.addHost(hostName1); http://git-wip-us.apache.org/repos/asf/ambari/blob/a45f5427/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersDeadlockTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersDeadlockTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersDeadlockTest.java index 022cf1f..f45bfa9 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersDeadlockTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersDeadlockTest.java @@ -107,6 +107,8 @@ public class ClustersDeadlockTest { injector.injectMembers(this); StackId stackId = new StackId("HDP-0.1"); +helper.createStack(stackId); + clusters.addCluster(CLUSTER_NAME, stackId); cluster = clusters.getCluster(CLUSTER_NAME); http://git-wip-us.apache.org/repos/asf/ambari/blob/a45f5427/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java index d59d1d5..1cae4df 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java @@ -50,12 +50,10 @@ import org.apache.ambari.server.orm.GuiceJpaInitializer; import org.apache.ambari.server.orm.InMemoryDefaultTestModule; import org.apache.ambari.server.orm.OrmTestHelper; import org.apache.ambari.server.orm.dao.ClusterServiceDAO; -import org.apache.ambari.server.orm.dao.ClusterStateDAO; import org.apache.ambari.server.orm.dao.HostComponentDesiredStateDAO; import org.apache.ambari.server.orm.dao.HostComponentStateDAO; import org.apache.ambari.server.orm.dao.HostDAO; import org.apache.ambari.server.orm.dao.TopologyRequestDAO; -import org.apache.ambari.server.orm.entities.ClusterStateEntity; import org.apache.ambari.server.orm.entities.HostEntity; import org.apache.ambari.server.orm.entities.RepositoryVersionEntity; import org.apache.ambari.server.state.AgentVersion; @@ -142,9 +140,10 @@ public class ClustersTest { @Test public void testAddAndGetCluster() throws AmbariException { - StackId stackId = new StackId("HDP-2.1.1"); +helper.createStack(stackId); + String c1 = "foo"; String c2 = "foo"; clusters.addCluster(c1, stackId); @@ -197,6 +196,8 @@ public class ClustersTest { public void
[5/6] ambari git commit: AMBARI-21059. Reduce Dependency on Cluster Desired Stack ID (ncole)
http://git-wip-us.apache.org/repos/asf/ambari/blob/a45f5427/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java index 664ba42..e6c50fb 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java @@ -29,6 +29,8 @@ import java.util.List; import java.util.Map; import java.util.Set; +import org.apache.ambari.annotations.Experimental; +import org.apache.ambari.annotations.ExperimentalFeature; import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.ClusterNotFoundException; import org.apache.ambari.server.DuplicateResourceException; @@ -420,29 +422,14 @@ public class ServiceResourceProvider extends AbstractControllerResourceProvider for (ServiceRequest request : requests) { Cluster cluster = clusters.getCluster(request.getClusterName()); - String desiredStack = request.getDesiredStack(); - String desiredRepositoryVersion = request.getDesiredRepositoryVersion(); - RepositoryVersionEntity repositoryVersion = null; - if (StringUtils.isNotBlank(desiredStack) && StringUtils.isNotBlank(desiredRepositoryVersion)){ -repositoryVersion = repositoryVersionDAO.findByStackAndVersion(new StackId(desiredStack), -desiredRepositoryVersion); - } - - if (null == desiredStack) { -desiredStack = cluster.getDesiredStackVersion().toString(); - } - if (null == repositoryVersion) { -List allVersions = repositoryVersionDAO.findByStack(new StackId(desiredStack)); - -if (CollectionUtils.isNotEmpty(allVersions)) { - repositoryVersion = allVersions.get(0); -} - } + RepositoryVersionEntity repositoryVersion = request.getResolvedRepository(); if (null == repositoryVersion) { throw new AmbariException(String.format("Could not find any repositories defined by %s", desiredStack)); + } else { +desiredStack = repositoryVersion.getStackId().toString(); } Service s = cluster.addService(request.getServiceName(), repositoryVersion); @@ -451,7 +438,7 @@ public class ServiceResourceProvider extends AbstractControllerResourceProvider * Get the credential_store_supported field only from the stack definition. * Not possible to update the value through a request. */ - StackId stackId = cluster.getDesiredStackVersion(); + StackId stackId = repositoryVersion.getStackId(); AmbariMetaInfo ambariMetaInfo = getManagementController().getAmbariMetaInfo(); ServiceInfo serviceInfo = ambariMetaInfo.getService(stackId.getStackName(), stackId.getStackVersion(), request.getServiceName()); @@ -621,6 +608,7 @@ public class ServiceResourceProvider extends AbstractControllerResourceProvider if (!serviceNames.containsKey(request.getClusterName())) { serviceNames.put(request.getClusterName(), new HashSet()); } + if (serviceNames.get(request.getClusterName()) .contains(request.getServiceName())) { // TODO throw single exception @@ -746,6 +734,7 @@ public class ServiceResourceProvider extends AbstractControllerResourceProvider } } } + for (Service service : depServices) { updateServiceComponents(requestStages, changedComps, changedScHosts, ignoredScHosts, reqOpLvl, service, State.STARTED); @@ -767,6 +756,7 @@ public class ServiceResourceProvider extends AbstractControllerResourceProvider service.setCredentialStoreEnabled(credentialStoreEnabled); } + Cluster cluster = clusters.getCluster(clusterNames.iterator().next()); return controller.addStages(requestStages, cluster, requestProperties, @@ -877,7 +867,7 @@ public class ServiceResourceProvider extends AbstractControllerResourceProvider + ", hostname=" + sch.getHostName() + ", currentState=" + oldSchState + ", newDesiredState=" + newState; - StackId sid = cluster.getDesiredStackVersion(); + StackId sid = service.getDesiredStackId(); if ( ambariMetaInfo.getComponent( sid.getStackName(), sid.getStackVersion(), sc.getServiceName(), @@ -1050,6 +1040,7 @@ public class ServiceResourceProvider extends AbstractControllerResourceProvider AmbariMetaInfo ambariMetaInfo = getManagementController().getAmbariMetaInfo(); MapserviceNames = new HashMap<>(); Set duplicates = new HashSet<>(); + for (ServiceRequest
[1/6] ambari git commit: AMBARI-21059. Reduce Dependency on Cluster Desired Stack ID (ncole)
Repository: ambari Updated Branches: refs/heads/branch-feature-AMBARI-12556 a436eb2f6 -> a45f5427b http://git-wip-us.apache.org/repos/asf/ambari/blob/a45f5427/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java b/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java index eda232b..8342158 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java @@ -104,6 +104,7 @@ import org.easymock.IAnswer; import org.junit.After; import org.junit.Assert; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.springframework.security.core.context.SecurityContextHolder; @@ -255,7 +256,8 @@ public class ViewRegistryTest { testReadViewArchives(true, false, false); } - @Test + + @Ignore("this will get refactored when divorced from the stack") public void testReadViewArchives_viewAutoInstanceCreation() throws Exception { testReadViewArchives(false, false, true); } @@ -1888,26 +1890,27 @@ public class ViewRegistryTest { ViewInstanceEntity viewInstanceEntity = createNiceMock(ViewInstanceEntity.class); Cluster cluster = createNiceMock(Cluster.class); Service service = createNiceMock(Service.class); +StackId stackId = new StackId("HDP-2.0"); -MapserviceMap = new HashMap<>(); +Map serviceMap = new HashMap<>(); for (String serviceName : serviceNames) { serviceMap.put(serviceName, service); + expect(cluster.getService(serviceName)).andReturn(service); } -StackId stackId = new StackId("HDP-2.0"); - expect(clusters.getClusterById(99L)).andReturn(cluster); expect(cluster.getClusterName()).andReturn("c1").anyTimes(); expect(cluster.getCurrentStackVersion()).andReturn(stackId).anyTimes(); expect(cluster.getServices()).andReturn(serviceMap).anyTimes(); +expect(service.getDesiredStackId()).andReturn(stackId).anyTimes(); Capture viewInstanceCapture = EasyMock.newCapture(); expect(viewInstanceDAO.merge(capture(viewInstanceCapture))).andReturn(viewInstanceEntity).anyTimes(); expect(viewInstanceDAO.findByName("MY_VIEW{1.0.0}", "AUTO-INSTANCE")).andReturn(viewInstanceEntity).anyTimes(); -replay(securityHelper, configuration, viewInstanceDAO, clusters, cluster, viewInstanceEntity); +replay(securityHelper, configuration, viewInstanceDAO, clusters, cluster, service, viewInstanceEntity); ServiceInstalledEvent event = new ServiceInstalledEvent(99L, "HDP", "2.0", "HIVE"); http://git-wip-us.apache.org/repos/asf/ambari/blob/a45f5427/ambari-web/app/controllers/wizard/step8_controller.js -- diff --git a/ambari-web/app/controllers/wizard/step8_controller.js b/ambari-web/app/controllers/wizard/step8_controller.js index 7e318e0..4155269 100644 --- a/ambari-web/app/controllers/wizard/step8_controller.js +++ b/ambari-web/app/controllers/wizard/step8_controller.js @@ -1011,8 +1011,19 @@ App.WizardStep8Controller = Em.Controller.extend(App.AddSecurityConfigs, App.wiz * @method createSelectedServicesData */ createSelectedServicesData: function () { + +var isInstaller = this.get('isInstaller') +var selectedStack; +if (this.get('isInstaller')) { + selectedStack = App.Stack.find().findProperty('isSelected', true); +} + return this.get('selectedServices').map(function (_service) { - return {"ServiceInfo": { "service_name": _service.get('serviceName') }}; + if (selectedStack) { +return {"ServiceInfo": { "service_name": _service.get('serviceName'), "desired_repository_version": selectedStack.get('repositoryVersion') }}; + } else { +return {"ServiceInfo": { "service_name": _service.get('serviceName') }}; + } }); },
[6/6] ambari git commit: AMBARI-21059. Reduce Dependency on Cluster Desired Stack ID (ncole)
AMBARI-21059. Reduce Dependency on Cluster Desired Stack ID (ncole) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a45f5427 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a45f5427 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a45f5427 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: a45f5427b08fc354e8b54481e7da3d6083112345 Parents: a436eb2 Author: Nate ColeAuthored: Thu May 18 08:57:45 2017 -0400 Committer: Nate Cole Committed: Tue May 23 15:38:59 2017 -0400 -- .../ambari/annotations/ExperimentalFeature.java | 7 +- .../ambari/server/actionmanager/Stage.java | 4 +- .../ambari/server/agent/HeartBeatHandler.java | 40 +-- .../ambari/server/agent/HeartbeatMonitor.java | 4 +- .../ambari/server/agent/HeartbeatProcessor.java | 4 +- .../server/api/services/AmbariMetaInfo.java | 56 +++- .../server/checks/AbstractCheckDescriptor.java | 28 +- .../checks/ComponentsInstallationCheck.java | 3 - .../checks/HostsMasterMaintenanceCheck.java | 2 +- .../checks/HostsRepositoryVersionCheck.java | 4 +- .../server/checks/RangerPasswordCheck.java | 8 +- .../checks/ServiceCheckValidityCheck.java | 2 +- .../ambari/server/checks/ServicesUpCheck.java | 3 +- .../YarnTimelineServerStatePreservingCheck.java | 4 +- .../controller/AmbariActionExecutionHelper.java | 34 ++- .../AmbariCustomCommandExecutionHelper.java | 51 +++- .../controller/AmbariManagementController.java | 3 +- .../AmbariManagementControllerImpl.java | 263 +++ .../server/controller/KerberosHelperImpl.java | 93 --- .../server/controller/ServiceRequest.java | 17 +- .../internal/ClientConfigResourceProvider.java | 8 +- .../ClusterStackVersionResourceProvider.java| 20 +- .../internal/ComponentResourceProvider.java | 16 +- .../internal/ServiceResourceProvider.java | 64 +++-- .../internal/StackDefinedPropertyProvider.java | 18 +- .../internal/UpgradeResourceProvider.java | 2 +- .../logging/LoggingSearchPropertyProvider.java | 12 +- .../metrics/timeline/AMSPropertyProvider.java | 9 +- .../state/DefaultServiceCalculatedState.java| 5 +- .../state/HBaseServiceCalculatedState.java | 4 +- .../state/HDFSServiceCalculatedState.java | 4 +- .../state/HiveServiceCalculatedState.java | 5 +- .../state/OozieServiceCalculatedState.java | 5 +- .../state/YARNServiceCalculatedState.java | 5 +- .../server/metadata/RoleCommandOrder.java | 34 ++- .../ambari/server/orm/dao/ClusterDAO.java | 2 +- .../server/orm/dao/RepositoryVersionDAO.java| 14 + .../orm/entities/RepositoryVersionEntity.java | 2 + .../upgrades/AutoSkipFailedSummaryAction.java | 10 +- .../org/apache/ambari/server/state/Cluster.java | 36 +-- .../apache/ambari/server/state/Clusters.java| 9 - .../ambari/server/state/ConfigFactory.java | 18 ++ .../ambari/server/state/ConfigHelper.java | 175 .../apache/ambari/server/state/ConfigImpl.java | 13 +- .../server/state/ServiceComponentHost.java | 7 + .../server/state/ServiceComponentImpl.java | 14 +- .../apache/ambari/server/state/ServiceImpl.java | 25 +- .../server/state/cluster/ClusterImpl.java | 19 +- .../server/state/cluster/ClustersImpl.java | 45 +--- .../state/configgroup/ConfigGroupImpl.java | 2 +- .../stack/upgrade/ServiceCheckGrouping.java | 3 +- .../svccomphost/ServiceComponentHostImpl.java | 9 + .../server/upgrade/AbstractUpgradeCatalog.java | 27 +- .../server/upgrade/FinalUpgradeCatalog.java | 28 +- .../server/upgrade/UpgradeCatalog200.java | 11 +- .../server/upgrade/UpgradeCatalog210.java | 20 +- .../server/upgrade/UpgradeCatalog212.java | 10 +- .../server/upgrade/UpgradeCatalog2121.java | 64 +++-- .../server/upgrade/UpgradeCatalog220.java | 174 ++-- .../server/upgrade/UpgradeCatalog221.java | 11 +- .../server/upgrade/UpgradeCatalog222.java | 146 ++ .../server/upgrade/UpgradeCatalog240.java | 42 ++- .../apache/ambari/server/view/ViewRegistry.java | 27 +- .../ExecutionCommandWrapperTest.java| 11 +- .../server/agent/TestHeartbeatHandler.java | 34 +-- .../checks/HostsMasterMaintenanceCheckTest.java | 8 +- .../server/checks/RangerPasswordCheckTest.java | 15 +- .../checks/ServiceCheckValidityCheckTest.java | 3 +- .../server/checks/ServicesUpCheckTest.java | 5 + .../AmbariManagementControllerImplTest.java | 156 +-- .../AmbariManagementControllerTest.java | 58 ++-- .../server/controller/KerberosHelperTest.java | 226 +++- .../ClientConfigResourceProviderTest.java
[3/6] ambari git commit: AMBARI-21059. Reduce Dependency on Cluster Desired Stack ID (ncole)
http://git-wip-us.apache.org/repos/asf/ambari/blob/a45f5427/ambari-server/src/test/java/org/apache/ambari/server/controller/KerberosHelperTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/KerberosHelperTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/KerberosHelperTest.java index 8cfe258..4045ad3 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/KerberosHelperTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/KerberosHelperTest.java @@ -341,11 +341,6 @@ public class KerberosHelperTest extends EasyMockSupport { } @Test - public void testEnableKerberos_UpgradeFromAmbari170KerberizedCluster() throws Exception { -testEnableKerberos_UpgradeFromAmbari170KerberizedCluster(new PrincipalKeyCredential("principal", "password"), "mit-kdc", "true"); - } - - @Test public void testEnableKerberos_ManageIdentitiesFalseKdcNone() throws Exception { testEnableKerberos(new PrincipalKeyCredential("principal", "password"), "none", "false"); } @@ -957,197 +952,12 @@ public class KerberosHelperTest extends EasyMockSupport { } } - - private void testEnableKerberos_UpgradeFromAmbari170KerberizedCluster(final PrincipalKeyCredential PrincipalKeyCredential, -String kdcType, -String manageIdentities) throws Exception { - -KerberosHelper kerberosHelper = injector.getInstance(KerberosHelper.class); -boolean identitiesManaged = (manageIdentities == null) || !"false".equalsIgnoreCase(manageIdentities); - -final ServiceComponentHost schKerberosClient = createMock(ServiceComponentHost.class); - expect(schKerberosClient.getServiceName()).andReturn(Service.Type.KERBEROS.name()).anyTimes(); - expect(schKerberosClient.getServiceComponentName()).andReturn(Role.KERBEROS_CLIENT.name()).anyTimes(); - expect(schKerberosClient.getSecurityState()).andReturn(SecurityState.UNSECURED).anyTimes(); - expect(schKerberosClient.getDesiredSecurityState()).andReturn(SecurityState.UNSECURED).anyTimes(); -expect(schKerberosClient.getHostName()).andReturn("host1").anyTimes(); -expect(schKerberosClient.getState()).andReturn(State.INSTALLED).anyTimes(); - -final ServiceComponentHost sch1 = createMock(ServiceComponentHost.class); -expect(sch1.getServiceName()).andReturn("SERVICE1").anyTimes(); -expect(sch1.getServiceComponentName()).andReturn("COMPONENT1").anyTimes(); - expect(sch1.getSecurityState()).andReturn(SecurityState.SECURED_KERBEROS).anyTimes(); - expect(sch1.getDesiredSecurityState()).andReturn(SecurityState.SECURED_KERBEROS).anyTimes(); -expect(sch1.getHostName()).andReturn("host1").anyTimes(); -expect(sch1.getState()).andReturn(State.INSTALLED).anyTimes(); - -sch1.setDesiredSecurityState(SecurityState.SECURED_KERBEROS); -expect(expectLastCall()).once(); -sch1.setSecurityState(SecurityState.SECURING); -expect(expectLastCall()).once(); - -final ServiceComponentHost sch2 = createMock(ServiceComponentHost.class); -expect(sch2.getServiceName()).andReturn("SERVICE2").anyTimes(); -expect(sch2.getServiceComponentName()).andReturn("COMPONENT2").anyTimes(); - expect(sch2.getSecurityState()).andReturn(SecurityState.SECURED_KERBEROS).anyTimes(); - expect(sch2.getDesiredSecurityState()).andReturn(SecurityState.SECURED_KERBEROS).anyTimes(); -expect(sch2.getHostName()).andReturn("host1").anyTimes(); -expect(sch2.getState()).andReturn(State.INSTALLED).anyTimes(); - -sch2.setDesiredSecurityState(SecurityState.SECURED_KERBEROS); -expect(expectLastCall()).once(); -sch2.setSecurityState(SecurityState.SECURING); -expect(expectLastCall()).once(); - -final Host host = createMockHost("host1"); - -final ServiceComponent serviceComponentKerberosClient = createNiceMock(ServiceComponent.class); - expect(serviceComponentKerberosClient.getName()).andReturn(Role.KERBEROS_CLIENT.name()).anyTimes(); - expect(serviceComponentKerberosClient.getServiceComponentHosts()).andReturn(Collections.singletonMap("host1", schKerberosClient)).anyTimes(); - -final Service serviceKerberos = createStrictMock(Service.class); - expect(serviceKerberos.getName()).andReturn(Service.Type.KERBEROS.name()).anyTimes(); -expect(serviceKerberos.getServiceComponents()) -.andReturn(Collections.singletonMap(Role.KERBEROS_CLIENT.name(), serviceComponentKerberosClient)) -.times(1); -serviceKerberos.setSecurityState(SecurityState.SECURED_KERBEROS); -expectLastCall().once(); - -final Service service1 = createStrictMock(Service.class); -expect(service1.getName()).andReturn("SERVICE1").anyTimes(); -expect(service1.getServiceComponents()) -
ambari git commit: AMBARI-20984 Be able to include stack repos in blueprint (dili)
Repository: ambari Updated Branches: refs/heads/trunk 4fcdaae4c -> cd769e2e7 AMBARI-20984 Be able to include stack repos in blueprint (dili) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cd769e2e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cd769e2e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cd769e2e Branch: refs/heads/trunk Commit: cd769e2e79de11519b333aa86c4c54e68be40996 Parents: 4fcdaae Author: Di LiAuthored: Tue May 23 12:03:53 2017 -0400 Committer: Di Li Committed: Tue May 23 12:03:53 2017 -0400 -- .../server/api/services/AmbariMetaInfo.java | 21 .../ambari/server/topology/Blueprint.java | 3 + .../ambari/server/topology/BlueprintImpl.java | 33 +- .../server/topology/RepositorySetting.java | 116 +++ .../apache/ambari/server/topology/Setting.java | 2 + .../ambari/server/topology/TopologyManager.java | 49 +++- .../ClusterDeployWithStartOnlyTest.java | 5 +- ...InstallWithoutStartOnComponentLevelTest.java | 5 +- .../ClusterInstallWithoutStartTest.java | 7 +- .../ambari/server/topology/SettingTest.java | 18 +++ .../server/topology/TopologyManagerTest.java| 5 +- 11 files changed, 250 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/cd769e2e/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java index c655c62..b509e97 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java @@ -934,6 +934,27 @@ public class AmbariMetaInfo { } } + public void createRepo(String stackName, String stackVersion, String osType, String repoId, String baseUrl, String mirrorsList) throws AmbariException { +if (!stackRoot.exists()) { + throw new StackAccessException("Create repo - Stack root does not exist."); +} + +if (null != baseUrl) { + createRepoInMetaInfo(stackName, stackVersion, osType, repoId, baseUrl, REPOSITORY_XML_PROPERTY_BASEURL); +} else if (null != mirrorsList) { + createRepoInMetaInfo(stackName, stackVersion, osType, repoId, mirrorsList, REPOSITORY_XML_PROPERTY_MIRRORSLIST); +} + } + + private void createRepoInMetaInfo(String stackName, String stackVersion, String osType, String repoId, String value, String repositoryXmlProperty) { +String metaKey = generateRepoMetaKey(stackName, stackVersion, osType, +repoId, repositoryXmlProperty); +MetainfoEntity entity = new MetainfoEntity(); +entity.setMetainfoName(metaKey); +entity.setMetainfoValue(value); +metaInfoDAO.create(entity); + } + public File getStackRoot() { return stackRoot; } http://git-wip-us.apache.org/repos/asf/ambari/blob/cd769e2e/ambari-server/src/main/java/org/apache/ambari/server/topology/Blueprint.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/topology/Blueprint.java b/ambari-server/src/main/java/org/apache/ambari/server/topology/Blueprint.java index 139a1ee..99e1c75 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/topology/Blueprint.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/topology/Blueprint.java @@ -19,6 +19,7 @@ package org.apache.ambari.server.topology; import java.util.Collection; +import java.util.List; import java.util.Map; import org.apache.ambari.server.controller.internal.Stack; @@ -167,4 +168,6 @@ public interface Blueprint { * @return entity representation of the blueprint */ BlueprintEntity toEntity(); + + List getRepositorySettings(); } http://git-wip-us.apache.org/repos/asf/ambari/blob/cd769e2e/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintImpl.java index 826e4e5..415efd8 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintImpl.java @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; +import
ambari git commit: AMBARI-21103. Creating a Downgrade From the Web Client Is Passing an Unsupported Property (alexantonenko)
Repository: ambari Updated Branches: refs/heads/branch-feature-AMBARI-12556 11325b7c9 -> a436eb2f6 AMBARI-21103. Creating a Downgrade From the Web Client Is Passing an Unsupported Property (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a436eb2f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a436eb2f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a436eb2f Branch: refs/heads/branch-feature-AMBARI-12556 Commit: a436eb2f6f5b7c36d370bcc24de6edafd35ab72a Parents: 11325b7 Author: Alex AntonenkoAuthored: Tue May 23 17:08:03 2017 +0300 Committer: Alex Antonenko Committed: Tue May 23 17:08:03 2017 +0300 -- .../app/controllers/main/admin/stack_and_upgrade_controller.js | 1 - ambari-web/app/utils/ajax/ajax.js | 2 -- .../controllers/main/admin/stack_and_upgrade_controller_test.js| 1 - 3 files changed, 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a436eb2f/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 8c97d7b..a676f7429 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 @@ -734,7 +734,6 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage, name: 'admin.downgrade.start', sender: this, data: { -from: App.RepositoryVersion.find().findProperty('displayName', this.get('upgradeVersion')).get('repositoryVersion'), value: currentVersion.repository_version, label: currentVersion.repository_name, id: currentVersion.id, http://git-wip-us.apache.org/repos/asf/ambari/blob/a436eb2f/ambari-web/app/utils/ajax/ajax.js -- diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js index 888dee3..929214c 100644 --- a/ambari-web/app/utils/ajax/ajax.js +++ b/ambari-web/app/utils/ajax/ajax.js @@ -1730,8 +1730,6 @@ var urls = { return { data: JSON.stringify({ "Upgrade": { -"from_version": data.from, -"repository_version_id": data.id, "upgrade_type": data.upgradeType, "direction": "DOWNGRADE" } http://git-wip-us.apache.org/repos/asf/ambari/blob/a436eb2f/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 698331e..4585991 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 @@ -1143,7 +1143,6 @@ describe('App.MainAdminStackAndUpgradeController', function() { it('request-data is valid', function () { expect(this.callArgs.data).to.eql({ -from: '2.3', id: '1', value: '2.2', label: 'HDP-2.2',
ambari git commit: AMBARI-21087. Infra manger: Add static data folder servlet endpoint (oleewere)
Repository: ambari Updated Branches: refs/heads/trunk 0d688106a -> 4fcdaae4c AMBARI-21087. Infra manger: Add static data folder servlet endpoint (oleewere) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4fcdaae4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4fcdaae4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4fcdaae4 Branch: refs/heads/trunk Commit: 4fcdaae4ce7788620d9b6146dfaef10ad1e7c60e Parents: 0d68810 Author: oleewereAuthored: Mon May 22 13:54:06 2017 +0200 Committer: oleewere Committed: Tue May 23 12:49:25 2017 +0200 -- .../org/apache/ambari/infra/InfraManager.java | 29 ++-- .../infra/common/InfraManagerConstants.java | 2 ++ 2 files changed, 28 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4fcdaae4/ambari-infra/ambari-infra-manager/src/main/java/org/apache/ambari/infra/InfraManager.java -- diff --git a/ambari-infra/ambari-infra-manager/src/main/java/org/apache/ambari/infra/InfraManager.java b/ambari-infra/ambari-infra-manager/src/main/java/org/apache/ambari/infra/InfraManager.java index 227bab4..186f98c 100644 --- a/ambari-infra/ambari-infra-manager/src/main/java/org/apache/ambari/infra/InfraManager.java +++ b/ambari-infra/ambari-infra-manager/src/main/java/org/apache/ambari/infra/InfraManager.java @@ -32,6 +32,7 @@ import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.server.handler.HandlerList; import org.eclipse.jetty.server.handler.ResourceHandler; +import org.eclipse.jetty.servlet.DefaultServlet; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; import org.eclipse.jetty.util.resource.Resource; @@ -48,6 +49,8 @@ import java.net.URI; import java.net.URISyntaxException; import java.net.URL; +import static org.apache.ambari.infra.common.InfraManagerConstants.DATA_FOLDER_LOCATION_PARAM; +import static org.apache.ambari.infra.common.InfraManagerConstants.DEFAULT_DATA_FOLDER_LOCATION; import static org.apache.ambari.infra.common.InfraManagerConstants.DEFAULT_PORT; import static org.apache.ambari.infra.common.InfraManagerConstants.DEFAULT_PROTOCOL; import static org.apache.ambari.infra.common.InfraManagerConstants.INFRA_MANAGER_SESSION_ID; @@ -78,6 +81,13 @@ public class InfraManager { .argName("port_number") .build(); +final Option dataFolderOption = Option.builder("df") + .longOpt("data-folder") + .desc("Infra Manager data folder location") + .numberOfArgs(1) + .argName("data_folder") + .build(); + final Option protocolOption = Option.builder("t") .longOpt("tls-enabled") .desc("TLS enabled for Infra Manager") @@ -86,17 +96,21 @@ public class InfraManager { options.addOption(helpOption); options.addOption(portOption); options.addOption(protocolOption); +options.addOption(dataFolderOption); try { CommandLineParser cmdLineParser = new DefaultParser(); CommandLine cli = cmdLineParser.parse(options, args); int port = cli.hasOption('p') ? Integer.parseInt(cli.getOptionValue('p')) : DEFAULT_PORT; String protocol = cli.hasOption("t") ? PROTOCOL_SSL : DEFAULT_PROTOCOL; + String dataFolder = cli.hasOption("df") ? cli.getOptionValue("df"): DEFAULT_DATA_FOLDER_LOCATION; + + System.setProperty(DATA_FOLDER_LOCATION_PARAM, dataFolder); // be able to access it from jobs Server server = buildServer(port, protocol); HandlerList handlers = new HandlerList(); handlers.addHandler(createSwaggerContext()); - handlers.addHandler(createBaseWebappContext()); + handlers.addHandler(createBaseWebappContext(dataFolder)); server.setHandler(handlers); server.start(); @@ -124,13 +138,22 @@ public class InfraManager { return server; } - private static WebAppContext createBaseWebappContext() throws MalformedURLException { + private static WebAppContext createBaseWebappContext(String dataFolder) throws MalformedURLException { URI webResourceBase = findWebResourceBase(); WebAppContext context = new WebAppContext(); -context.setBaseResource(Resource.newResource(webResourceBase)); +ResourceCollection resources = new ResourceCollection(Resource.newResource(webResourceBase)); +context.setBaseResource(resources); context.setContextPath(ROOT_CONTEXT); context.setParentLoaderPriority(true); +// Data folder servlet +ServletHolder dataServlet = new ServletHolder("static-data", DefaultServlet.class); +dataServlet.setInitParameter("dirAllowed","true"); +
[29/49] ambari git commit: Merge trunk to ambari-rest-api-explorer branch. (jaimin)
http://git-wip-us.apache.org/repos/asf/ambari/blob/3acd2e6d/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/MemberService.java -- diff --cc ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/MemberService.java index 0ccc472,000..f03b47f mode 100644,00..100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/MemberService.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/MemberService.java @@@ -1,200 -1,0 +1,200 @@@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.ambari.server.api.services.groups; + +import java.util.HashMap; +import java.util.Map; + +import javax.ws.rs.DELETE; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.HttpHeaders; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.UriInfo; + +import org.apache.ambari.server.api.resources.ResourceInstance; +import org.apache.ambari.server.api.services.BaseService; +import org.apache.ambari.server.api.services.Request; +import org.apache.ambari.server.controller.MemberResponse; +import org.apache.ambari.server.controller.spi.Resource; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import io.swagger.annotations.ApiResponse; +import io.swagger.annotations.ApiResponses; + +/** + * Service responsible for user membership requests. + */ +@Path("/groups/{groupName}/members") +@Api(value = "Groups", description = "Endpoint for group specific operations") +public class MemberService extends BaseService { + /** + * Creates new members. + * Handles: POST /groups/{groupname}/members requests. + * + * @param headers http headers + * @param ui uri info + * @param groupNamegroup name + * @return information regarding the created member + */ + @POST + @Produces("text/plain") + public Response createMember(String body, @Context HttpHeaders headers, @Context UriInfo ui, @PathParam("groupName") String groupName) { +return handleRequest(headers, body, ui, Request.Type.POST, createMemberResource(groupName, null)); + } + + /** + * Creates a new member. + * Handles: POST /groups/{groupname}/members/{username} requests. + * + * @param headers http headers + * @param ui uri info + * @param groupNamegroup name + * @param userName the user name + * @return information regarding the created member + */ + @POST + @Path("{userName}") + @Produces("text/plain") + public Response createMember(String body, @Context HttpHeaders headers, @Context UriInfo ui, @PathParam("groupName") String groupName, + @PathParam("userName") String userName) { +return handleRequest(headers, body, ui, Request.Type.POST, createMemberResource(groupName, userName)); + } + + /** +* Deletes a member. +* Handles: DELETE /groups/{groupname}/members/{username} requests. +* +* @param headers http headers +* @param ui uri info +* @param groupNamegroup name +* @param userName the user name +* @return information regarding the deleted group +*/ + @DELETE + @Path("{userName}") + @Produces("text/plain") + @ApiOperation(value = "Delete group member", nickname = "MemberService#deleteMember", notes = "Delete member resource.") + @ApiResponses(value = { + @ApiResponse(code = 200, message = "Successful operation"), + @ApiResponse(code = 500, message = "Server Error")} + ) + public Response deleteMember(@Context HttpHeaders headers, @Context UriInfo ui, @ApiParam(value = "group name", required = true) @PathParam("groupName") String groupName, +
[30/49] ambari git commit: Merge trunk to ambari-rest-api-explorer branch. (jaimin)
Merge trunk to ambari-rest-api-explorer branch. (jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3acd2e6d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3acd2e6d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3acd2e6d Branch: refs/heads/trunk Commit: 3acd2e6da46494c175250e4f3a9ec074456b12b9 Parents: 3cb45e8 69c5593 Author: Jaimin JetlyAuthored: Tue Apr 11 11:20:34 2017 -0700 Committer: Jaimin Jetly Committed: Tue Apr 11 11:20:34 2017 -0700 -- .../main/resources/ui/admin-web/app/index.html |4 +- ambari-agent/pom.xml| 10 +- .../ambari_agent/StatusCommandsExecutor.py | 209 +-- .../src/main/python/ambari_agent/main.py|5 +- .../python/resource_management/TestUtils.py | 39 + .../src/main/python/ambari_commons/network.py |2 + .../ambari_commons/resources/os_family.json |1 + .../python/resource_management/core/sudo.py | 58 +- .../python/resource_management/core/utils.py| 56 +- .../libraries/functions/copy_tarball.py | 24 +- .../functions/setup_ranger_plugin_xml.py| 16 +- .../libraries/functions/solr_cloud_util.py |7 +- .../libraries/functions/stack_select.py | 16 +- .../libraries/script/script.py |8 +- ambari-infra/ambari-infra-solr-client/pom.xml |5 + .../ambari/infra/solr/AmbariSolrCloudCLI.java | 17 +- .../infra/solr/AmbariSolrCloudClient.java |9 + .../solr/commands/UnsecureZNodeZkCommand.java | 44 + .../FieldAuditLogRequestQueryConverter.java |1 - .../TopFieldAuditLogRequestQueryConverter.java | 54 + .../logsearch/manager/AuditLogsManager.java |3 +- .../request/impl/FieldAuditLogRequest.java | 17 +- .../request/impl/TopFieldAuditLogRequest.java | 40 + .../logsearch/rest/AuditLogsResource.java |4 +- .../logsearch/rest/UserConfigResource.java |2 +- .../FieldAuditLogRequestQueryConverterTest.java |3 +- ...pFieldAuditLogRequestQueryConverterTest.java | 61 + .../ambari-logsearch-web/package.json | 17 +- .../main/webapp/scripts/views/common/Header.js |6 +- .../conf/unix/ambari-metrics-collector |3 +- .../server/KdcServerConnectionVerification.java | 31 +- .../java/org/apache/ambari/server/Role.java |2 +- .../server/actionmanager/ActionDBAccessor.java | 16 +- .../actionmanager/ActionDBAccessorImpl.java | 27 +- .../server/actionmanager/ActionManager.java |2 +- .../server/actionmanager/ActionScheduler.java | 178 +- .../server/actionmanager/HostRoleCommand.java | 26 + .../ambari/server/actionmanager/Request.java| 10 +- .../ambari/server/actionmanager/Stage.java | 44 +- .../apache/ambari/server/agent/ActionQueue.java | 12 +- .../ambari/server/agent/AgentRequests.java |2 +- .../ambari/server/agent/ExecutionCommand.java | 10 +- .../apache/ambari/server/agent/HeartBeat.java |6 +- .../ambari/server/agent/HeartBeatHandler.java | 14 +- .../ambari/server/agent/HeartBeatResponse.java | 10 +- .../ambari/server/agent/HeartbeatMonitor.java |6 +- .../ambari/server/agent/HeartbeatProcessor.java |2 +- .../apache/ambari/server/agent/HostInfo.java|2 +- .../ambari/server/agent/RecoveryReport.java |2 +- .../server/agent/RegistrationResponse.java |2 +- .../ambari/server/agent/StatusCommand.java |4 +- .../alerts/AmbariPerformanceRunnable.java |2 +- .../server/alerts/StaleAlertRunnable.java |2 +- .../server/api/AmbariCsrfProtectionFilter.java |2 +- .../ambari/server/api/AmbariErrorHandler.java |2 +- .../server/api/handlers/QueryCreateHandler.java |6 +- .../ambari/server/api/predicate/QueryLexer.java | 24 +- .../server/api/predicate/QueryParser.java |8 +- .../expressions/AbstractExpression.java |2 +- .../expressions/NotLogicalExpression.java |2 +- .../api/predicate/operators/EqualsOperator.java |2 +- .../operators/GreaterEqualsOperator.java|2 +- .../predicate/operators/GreaterOperator.java|2 +- .../api/predicate/operators/InOperator.java |2 +- .../predicate/operators/LessEqualsOperator.java |2 +- .../api/predicate/operators/LessOperator.java |2 +- .../predicate/operators/NotEqualsOperator.java |2 +- .../query/ExtendedResourcePredicateVisitor.java |2 +- .../server/api/query/JpaPredicateVisitor.java |4 +- .../ambari/server/api/query/JpaSortBuilder.java |2 +- .../api/query/ProcessingPredicateVisitor.java |6 +- .../ambari/server/api/query/QueryImpl.java | 60 +- .../ambari/server/api/query/QueryInfo.java |2 +-
[35/49] ambari git commit: AMBARI-20970. Integrate StackService resource with swagger (Balazs Bence Sari via adoroszlai)
AMBARI-20970. Integrate StackService resource with swagger (Balazs Bence Sari via adoroszlai) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/54983ee3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/54983ee3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/54983ee3 Branch: refs/heads/trunk Commit: 54983ee3b8980e3f1e35a7859d4e759eb17fac87 Parents: 0e13b01 Author: Balazs Bence SariAuthored: Wed May 10 17:14:08 2017 +0200 Committer: Attila Doroszlai Committed: Wed May 10 17:14:08 2017 +0200 -- .../ambari/server/api/services/BaseService.java | 25 +- .../ambari/server/api/services/HostService.java | 96 +-- .../server/api/services/StacksService.java | 730 --- .../server/api/services/users/UserService.java | 2 +- .../api/services/views/ViewInstanceService.java | 2 +- .../controller/ComponentDependencyResponse.java | 64 ++ .../controller/ExtensionLinkResponse.java | 137 ++-- .../server/controller/QuickLinksResponse.java | 56 ++ .../controller/StackArtifactResponse.java | 52 ++ .../StackConfigurationDependencyResponse.java | 17 + .../controller/StackConfigurationResponse.java | 26 +- .../ambari/server/controller/StackResponse.java | 12 + .../StackServiceArtifactResponse.java | 53 ++ .../StackServiceComponentResponse.java | 27 + .../server/controller/StackServiceResponse.java | 31 +- .../server/controller/StackVersionResponse.java | 59 +- .../ambari/server/controller/ThemeResponse.java | 56 ++ .../server/controller/ViewInstanceResponse.java | 2 +- .../state/QuickLinksConfigurationInfo.java | 8 +- .../apache/ambari/server/state/StackInfo.java | 2 +- .../server/state/ValueAttributesInfo.java | 87 ++- .../ambari/server/state/ValueEntryInfo.java | 8 +- .../server/state/theme/ConfigCondition.java | 13 +- .../server/state/theme/ConfigPlacement.java | 25 +- .../ambari/server/state/theme/Layout.java | 5 + .../ambari/server/state/theme/Section.java | 22 +- .../ambari/server/state/theme/Subsection.java | 13 +- .../apache/ambari/server/state/theme/Tab.java | 12 +- .../ambari/server/state/theme/TabLayout.java| 8 +- .../apache/ambari/server/state/theme/Theme.java | 9 +- .../server/state/theme/ThemeConfiguration.java | 10 +- .../apache/ambari/server/state/theme/Unit.java | 7 +- .../ambari/server/state/theme/Widget.java | 12 +- .../ambari/server/state/theme/WidgetEntry.java | 9 +- 34 files changed, 1397 insertions(+), 300 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java index 76d2b70..0b2afd1 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java @@ -49,14 +49,15 @@ import org.slf4j.LoggerFactory; public abstract class BaseService { public final static MediaType MEDIA_TYPE_TEXT_CSV_TYPE = new MediaType("text", "csv"); - static final String SUCCESSFUL_OPERATION = "Successful operation"; - static final String REQUEST_ACCEPTED = "Request is accepted, but not completely processed yet"; - static final String INVALID_ARGUMENTS = "Invalid arguments"; - static final String CLUSTER_NOT_FOUND = "Cluster not found"; - static final String CLUSTER_OR_HOST_NOT_FOUND = "Cluster or host not found"; - static final String NOT_AUTHENTICATED = "Not authenticated"; - static final String PERMISSION_DENIED = "Not permitted to perform the operation"; - static final String SERVER_ERROR = "Internal server error"; + static final String MSG_SUCCESSFUL_OPERATION = "Successful operation"; + static final String MSG_REQUEST_ACCEPTED = "Request is accepted, but not completely processed yet"; + static final String MSG_INVALID_ARGUMENTS = "Invalid arguments"; + static final String MSG_CLUSTER_NOT_FOUND = "Cluster not found"; + static final String MSG_CLUSTER_OR_HOST_NOT_FOUND = "Cluster or host not found"; + static final String MSG_NOT_AUTHENTICATED = "Not authenticated"; + static final String MSG_PERMISSION_DENIED = "Not permitted to perform the operation"; + static final String MSG_SERVER_ERROR = "Internal server error"; + static final String MSG_RESOURCE_NOT_FOUND = "The requested resource doesn't exist."; static final String QUERY_FIELDS = "fields"; static final String
[08/49] ambari git commit: AMBARI-20436. Create a prototype of ambari-server swagger integration. (jaimin)
http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/lib/handlebars-2.0.0.js -- diff --git a/ambari-web/api-docs/lib/handlebars-2.0.0.js b/ambari-web/api-docs/lib/handlebars-2.0.0.js new file mode 100644 index 000..53cf921 --- /dev/null +++ b/ambari-web/api-docs/lib/handlebars-2.0.0.js @@ -0,0 +1,28 @@ +/*! + + handlebars v2.0.0 + +Copyright (C) 2011-2014 by Yehuda Katz + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +@license +*/ +!function(a,b){"function"==typeof define&?define([],b):"object"==typeof exports?module.exports=b():a.Handlebars=a.Handlebars||b()}(this,function(){var a=function(){"use strict";function a(a){this.string=a}var b;return a.prototype.toString=function(){return""+this.string},b=a}(),b=function(a){"use strict";function b(a){return i[a]}function c(a){for(var b=1;b":"",'"':"","'":"","`":""},j=/[&<>"'`]/g,k=/[&<>"'`]/;g.extend=c;var l=Object.prototype.toString;g.toString=l;var m=function(a){return"function"==typeof a};m(/x/)&&(m=function(a){return"function"==typeof a&&"[object Function]"===l.c all(a)});var m;g.isFunction=m;var n=Array.isArray||function(a){return a&&"object"==typeof a?"[object Array]"===l.call(a):!1};return g.isArray=n,g.escapeExpression=d,g.isEmpty=e,g.appendContextPath=f,g}(a),c=function(){"use strict";function a(a,b){var d;b&&&(d=b.firstLine,a+=" - "+d+":"+b.firstColumn);for(var e=Error.prototype.constructor.call(this,a),f=0;f 0?(c.id s&&(c.ids=[c.name]),a.helpers.each(b,c)):d(this);if(c.data&){var g=q(c.data);g.contextPath=f.appendContextPath(c.data.contextPath,c.name),c={data:g}}return e(b,c)}),a.registerHelper("each",function(a,b){if(!b)throw new g("Must pass iterator to #each");var c,d,e=b.fn,h=b.inverse,i=0,j="";if(b.data&&&(d=f.appendContextPath(b.data.contextPath,b.ids[0])+"."),l(a)&&(a=a.call(this)),b.data&&(c=q(b.data)),a&&"object"==typeof a)if(k(a))for(var m=a.length;m>i;i++)c&&(c.index=i,c.first=0===i,c.last=i===a.length-1,d&&(c.contextPath=d+i)),j+=e(a[i],{data:c});else for(var n in a)a.hasOwnProperty(n)&&(c&&(c.key=n,c.index=i,c.first=0===i,d&&(c.contextPath=d+n)),j+=e(a[n],{data:c}),i++);return 0===i&&(j=h(this)),j}),a.registerHelper("if",function(a,b){return l(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||f.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})}),a.registerHelper("with", function(a,b){l(a)&&(a=a.call(this));var c=b.fn;if(f.isEmpty(a))return b.inverse(this);if(b.data&){var d=q(b.data);d.contextPath=f.appendContextPath(b.data.contextPath,b.ids[0]),b={data:d}}return c(a,b)}),a.registerHelper("log",function(b,c){var d=c.data&!=c.data.level?parseInt(c.data.level,10):1;a.log(d,b)}),a.registerHelper("lookup",function(a,b){return a&[b]})}var e={},f=a,g=b,h="2.0.0";e.VERSION=h;var i=6;e.COMPILER_REVISION=i;var j={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"==
[21/49] ambari git commit: AMBARI-20498. Ambari logo and title should not get hidden when user scrolls down the page. (Oleg via Jaimin)
AMBARI-20498. Ambari logo and title should not get hidden when user scrolls down the page. (Oleg via Jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/76eabf2d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/76eabf2d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/76eabf2d Branch: refs/heads/trunk Commit: 76eabf2ddc4548cde07696e850ba45a9a5df739b Parents: 0a4e416 Author: Jaimin JetlyAuthored: Mon Mar 20 17:54:50 2017 -0700 Committer: Jaimin Jetly Committed: Mon Mar 20 17:54:50 2017 -0700 -- ambari-web/api-docs/css/api-explorer.css | 7 ++- ambari-web/api-docs/css/index.css| 1 - ambari-web/api-docs/css/standalone.css | 1 - ambari-web/api-docs/index.html | 4 ++-- ambari-web/api-docs/swagger-ui.js| 2 +- 5 files changed, 5 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/76eabf2d/ambari-web/api-docs/css/api-explorer.css -- diff --git a/ambari-web/api-docs/css/api-explorer.css b/ambari-web/api-docs/css/api-explorer.css index ef3abd4..65c51db 100644 --- a/ambari-web/api-docs/css/api-explorer.css +++ b/ambari-web/api-docs/css/api-explorer.css @@ -67,6 +67,7 @@ } .swagger-section .operation { +padding-top: 55px; margin: 0 } @@ -1078,7 +1079,7 @@ .swagger-section .sticky-nav.fixed { position: fixed; -top: 0; +top: 55px; left: 0; width: 100%; z-index: 600 @@ -1497,10 +1498,6 @@ body { padding: 0 20px } -.swagger-section .endpoint { -margin: 0 0 100px -} - @media (min-width: 992px) { .swagger-section .endpoint + .endpoint, .swagger-section .endpoint:first-child { border-top: 1px solid rgba(0, 0, 0, .08) http://git-wip-us.apache.org/repos/asf/ambari/blob/76eabf2d/ambari-web/api-docs/css/index.css -- diff --git a/ambari-web/api-docs/css/index.css b/ambari-web/api-docs/css/index.css index 1de91e3..8ec3bbc 100644 --- a/ambari-web/api-docs/css/index.css +++ b/ambari-web/api-docs/css/index.css @@ -15445,7 +15445,6 @@ header.site-header.site-header .navbar-header { } } header.site-header.site-header nav { -background: none; border: 0; margin: 0; } http://git-wip-us.apache.org/repos/asf/ambari/blob/76eabf2d/ambari-web/api-docs/css/standalone.css -- diff --git a/ambari-web/api-docs/css/standalone.css b/ambari-web/api-docs/css/standalone.css index 1e5cd69..89d0d61 100644 --- a/ambari-web/api-docs/css/standalone.css +++ b/ambari-web/api-docs/css/standalone.css @@ -17,7 +17,6 @@ header.site-header li * { -webkit-backface-visibility: hidden !important; } header.site-header nav { -background: none; border: 0; margin: 0; } http://git-wip-us.apache.org/repos/asf/ambari/blob/76eabf2d/ambari-web/api-docs/index.html -- diff --git a/ambari-web/api-docs/index.html b/ambari-web/api-docs/index.html index 90728cd..baa3381 100644 --- a/ambari-web/api-docs/index.html +++ b/ambari-web/api-docs/index.html @@ -139,7 +139,7 @@ function i(n) { n.hasClass("fixed") || (navOffset = n.offset().top); e(); - $(window).scrollTop() > navOffset ? $(".modal.in").length || n.addClass("fixed") : n.removeClass("fixed") + //$(window).scrollTop() > navOffset ? $(".modal.in").length || n.addClass("fixed") : n.removeClass("fixed") } function r(e) { @@ -209,7 +209,7 @@ - + http://git-wip-us.apache.org/repos/asf/ambari/blob/76eabf2d/ambari-web/api-docs/swagger-ui.js -- diff --git a/ambari-web/api-docs/swagger-ui.js b/ambari-web/api-docs/swagger-ui.js index c644c64..5fbc844 100644 --- a/ambari-web/api-docs/swagger-ui.js +++ b/ambari-web/api-docs/swagger-ui.js @@ -176,7 +176,7 @@ this["Handlebars"]["templates"]["main"] = Handlebars.template({"1":function(dept + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.version : stack1), depth0)) + "\n"; },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "\n\n\n \nAPI Reference: \n\n\n \n\nUrl\nhttp://example.com/api\;>\n\n\nToken\n\n
[48/49] ambari git commit: Merge remote-tracking branch 'origin/trunk' into ambari-rest-api-explorer
Merge remote-tracking branch 'origin/trunk' into ambari-rest-api-explorer Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/651bdcbd Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/651bdcbd Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/651bdcbd Branch: refs/heads/trunk Commit: 651bdcbdf86c8addace33b1f9bac066633296106 Parents: 51fc3cf 7c92953 Author: Attila DoroszlaiAuthored: Tue May 23 11:52:00 2017 +0200 Committer: Attila Doroszlai Committed: Tue May 23 11:52:00 2017 +0200 -- .../clusters/ClustersManageAccessCtrl.js|2 +- .../stackVersions/StackVersionsCreateCtrl.js| 19 + .../stackVersions/StackVersionsEditCtrl.js | 102 +- .../ui/admin-web/app/scripts/i18n.config.js |2 +- .../ui/admin-web/app/scripts/services/Stack.js |3 +- .../resources/ui/admin-web/app/views/main.html | 50 +- .../views/stackVersions/stackVersionPage.html |3 +- .../ui/admin-web/app/views/users/create.html|2 +- ambari-agent/conf/unix/install-helper.sh|3 +- ambari-agent/pom.xml|1 + .../src/main/python/ambari_agent/ActionQueue.py |9 +- .../main/python/ambari_agent/AmbariConfig.py| 83 +- .../src/main/python/ambari_agent/Controller.py | 18 +- .../ambari_agent/CustomServiceOrchestrator.py | 38 +- .../src/main/python/ambari_agent/Hardware.py|2 + .../src/main/python/ambari_agent/HostInfo.py| 15 +- .../src/main/python/ambari_agent/NetUtil.py |5 +- .../ambari_agent/StatusCommandsExecutor.py | 279 +- .../python/ambari_agent/alerts/web_alert.py |5 +- .../src/main/python/ambari_agent/hostname.py|8 + ambari-agent/src/packages/tarball/all.xml | 11 +- .../test/python/ambari_agent/TestActionQueue.py | 13 +- .../test/python/ambari_agent/TestController.py | 14 + .../TestCustomServiceOrchestrator.py| 51 - .../test/python/ambari_agent/TestHardware.py|4 +- .../src/test/python/ambari_agent/TestShell.py |2 +- .../python/resource_management/TestScript.py| 56 +- .../main/python/ambari_commons/inet_utils.py| 43 +- .../src/main/python/ambari_commons/network.py | 20 +- .../libraries/functions/conf_select.py | 13 +- .../libraries/functions/curl_krb_request.py | 17 +- .../libraries/functions/decorator.py| 23 +- .../libraries/functions/jmx.py |7 +- .../libraries/functions/namenode_ha_utils.py|6 +- .../functions/setup_ranger_plugin_xml.py| 26 +- .../libraries/functions/version_select_util.py | 40 + .../libraries/script/script.py | 171 +- .../HIVE/package/scripts/mysql_service.py |5 + ambari-infra/.gitignore |6 + ambari-infra/ambari-infra-assembly/pom.xml | 91 + .../src/main/package/deb/manager/control| 22 + .../src/main/package/deb/manager/postinst | 15 + .../src/main/package/deb/manager/postrm | 15 + .../src/main/package/deb/manager/preinst| 15 + .../src/main/package/deb/manager/prerm | 15 + ambari-infra/ambari-infra-manager/README.md | 31 + ambari-infra/ambari-infra-manager/build.xml | 54 + .../ambari-infra-manager/docker/Dockerfile | 52 + .../ambari-infra-manager/docker/bin/start.sh| 21 + .../docker/infra-manager-docker.sh | 85 + ambari-infra/ambari-infra-manager/pom.xml | 431 ++ .../org/apache/ambari/infra/InfraManager.java | 186 + .../infra/common/InfraManagerConstants.java | 29 + .../infra/conf/InfraManagerApiDocConfig.java| 54 + .../ambari/infra/conf/InfraManagerConfig.java | 36 + .../conf/batch/InfraManagerBatchConfig.java | 282 + .../infra/job/dummy/DummyItemProcessor.java | 36 + .../ambari/infra/job/dummy/DummyItemWriter.java | 36 + .../ambari/infra/job/dummy/DummyObject.java | 40 + .../apache/ambari/infra/manager/JobManager.java | 274 + .../infra/model/ExecutionContextResponse.java | 40 + .../ambari/infra/model/JobDetailsResponse.java | 53 + .../model/JobExecutionDetailsResponse.java | 49 + .../infra/model/JobExecutionInfoResponse.java | 141 + .../ambari/infra/model/JobExecutionRequest.java | 46 + .../infra/model/JobExecutionRestartRequest.java | 52 + .../infra/model/JobExecutionStopRequest.java| 50 + .../infra/model/JobInstanceDetailsResponse.java | 54 + .../infra/model/JobInstanceStartRequest.java| 49 + .../ambari/infra/model/JobOperationParams.java | 31 + .../apache/ambari/infra/model/JobRequest.java | 37 + .../apache/ambari/infra/model/PageRequest.java | 49 + .../model/StepExecutionContextResponse.java | 58 +
[34/49] ambari git commit: AMBARI-20970. Integrate StackService resource with swagger (Balazs Bence Sari via adoroszlai)
http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/controller/ExtensionLinkResponse.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ExtensionLinkResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ExtensionLinkResponse.java index 99c9ce9..c4f3941 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/ExtensionLinkResponse.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ExtensionLinkResponse.java @@ -24,80 +24,32 @@ import java.util.Set; import org.apache.ambari.server.stack.Validable; +import io.swagger.annotations.ApiModelProperty; + /** * An extension version is like a stack version but it contains custom services. Linking an extension * version to the current stack version allows the cluster to install the custom services contained in * the extension version. */ -public class ExtensionLinkResponse implements Validable { - - private String linkId; - - private String stackName; - - private String stackVersion; - - private String extensionName; - - private String extensionVersion; +public class ExtensionLinkResponse implements Validable, ApiModel { + private ExtensionLinkResponseInfo extensionLinkResponseInfo; private boolean valid; - private Set errorSet = new HashSet<>(); public ExtensionLinkResponse(String linkId, String stackName, String stackVersion, String extensionName, - String extensionVersion, boolean valid, Collection errorSet) { - -setLinkId(linkId); -setStackName(stackName); -setStackVersion(stackVersion); -setExtensionName(extensionName); -setExtensionVersion(extensionVersion); -setValid(valid); -addErrors(errorSet); - } - - public String getLinkId() { -return linkId; - } - - public void setLinkId(String linkId) { -this.linkId = linkId; - } - - public String getStackName() { -return stackName; - } - - public void setStackName(String stackName) { -this.stackName = stackName; - } - - public String getStackVersion() { -return stackVersion; - } - - public void setStackVersion(String stackVersion) { -this.stackVersion = stackVersion; - } - - public String getExtensionName() { -return extensionName; + String extensionVersion, boolean valid, Collection errorSet) { +extensionLinkResponseInfo = new ExtensionLinkResponseInfo(linkId, stackName, stackVersion, extensionName, +extensionVersion, valid, errorSet); } - public void setExtensionName(String extensionName) { -this.extensionName = extensionName; - } - - public String getExtensionVersion() { -return extensionVersion; - } - - public void setExtensionVersion(String extensionVersion) { -this.extensionVersion = extensionVersion; + @ApiModelProperty(name = "ExtensionLink") + public ExtensionLinkResponseInfo getExtensionLinkResponseInfo() { +return extensionLinkResponseInfo; } @Override + @ApiModelProperty(hidden = true) public boolean isValid() { return valid; } @@ -113,6 +65,7 @@ public class ExtensionLinkResponse implements Validable { } @Override + @ApiModelProperty(hidden = true) public Collection getErrors() { return errorSet; } @@ -121,4 +74,70 @@ public class ExtensionLinkResponse implements Validable { public void addErrors(Collection errors) { this.errorSet.addAll(errors); } + + public class ExtensionLinkResponseInfo { +public ExtensionLinkResponseInfo(String linkId, String stackName, String stackVersion, String extensionName, + String extensionVersion, boolean valid, Collection errorSet) { + + setLinkId(linkId); + setStackName(stackName); + setStackVersion(stackVersion); + setExtensionName(extensionName); + setExtensionVersion(extensionVersion); + setValid(valid); + addErrors(errorSet); +} + +private String linkId; +private String stackName; +private String stackVersion; +private String extensionName; +private String extensionVersion; + +@ApiModelProperty(name = "link_id") +public String getLinkId() { + return linkId; +} + +public void setLinkId(String linkId) { + this.linkId = linkId; +} + +@ApiModelProperty(name = "stack_name") +public String getStackName() { + return stackName; +} + +public void setStackName(String stackName) { + this.stackName = stackName; +} + +@ApiModelProperty(name = "stack_version") +public String getStackVersion() { + return stackVersion; +} + +public void setStackVersion(String stackVersion) { + this.stackVersion = stackVersion; +} + +@ApiModelProperty(name = "extension_name") +public String getExtensionName() { +
[06/49] ambari git commit: AMBARI-20436. Create a prototype of ambari-server swagger integration. (jaimin)
http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/lib/jquery.ba-bbq.min.js -- diff --git a/ambari-web/api-docs/lib/jquery.ba-bbq.min.js b/ambari-web/api-docs/lib/jquery.ba-bbq.min.js new file mode 100644 index 000..bcbf248 --- /dev/null +++ b/ambari-web/api-docs/lib/jquery.ba-bbq.min.js @@ -0,0 +1,18 @@ +/* + * jQuery BBQ: Back Button & Query Library - v1.2.1 - 2/17/2010 + * http://benalman.com/projects/jquery-bbq-plugin/ + * + * Copyright (c) 2010 "Cowboy" Ben Alman + * Dual licensed under the MIT and GPL licenses. + * http://benalman.com/about/license/ + */ +(function($,p){var i,m=Array.prototype.slice,r=decodeURIComponent,a=$.param,c,l,v,b=$.bbq=$.bbq||{},q,u,j,e=$.event.special,d="hashchange",A="querystring",D="fragment",y="elemUrlAttr",g="location",k="href",t="src",x=/^.*\?|#.*$/g,w=/^.*\#/,h,C={};function E(F){return typeof F==="string"}function B(G){var F=m.call(arguments,1);return function(){return G.apply(this,F.concat(m.call(arguments)))}}function n(F){return F.replace(/^[^#]*#?(.*)$/,"$1")}function o(F){return F.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function f(H,M,F,I,G){var O,L,K,N,J;if(I!==i){K=F.match(H?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/);J=K[3]||"";if(G===2&(I)){L=I.replace(H?w:x,"")}else{N=l(K[2]);I=E(I)?l[H?D:A](I):I;L=G===2?I:G===1?$.extend({},I,N):$.extend({},N,I);L=a(L);if(H){L=L.replace(h,r)}}O=K[1]+(H?"#":L||!K[1]?"?":"")+L+J}else{O=M(F!==i?F:p[g][k])}return O}a[A]=B(f,0,o);a[D]=c=B(f,1,n);c.noEscape=function(G){G=G||"";var F=$.map(G.split(""),encodeURIComponent);h=new RegExp(F.join("|"),"g")};c.no Escape(",/");$.deparam=l=function(I,F){var H={},G={"true":!0,"false":!1,"null":null};$.each(I.replace(/\+/g," ").split("&"),function(L,Q){var K=Q.split("="),P=r(K[0]),J,O=H,M=0,R=P.split("]["),N=R.length-1;if(/\[/.test(R[0])&&/\]$/.test(R[N])){R[N]=R[N].replace(/\]$/,"");R=R.shift().split("[").concat(R);N=R.length-1}else{N=0}if(K.length===2){J=r(K[1]);if(F){J=J&&!isNaN(J)?+J:J==="undefined"?i:G[J]!==i?G[J]:J}if(N){for(;M<=N;M++){P=R[M]===""?O.length:R[M];O=O[P]=M
[31/49] ambari git commit: AMBARI-20735. Checkstyle rule to ensure that all API endpoints are documented
AMBARI-20735. Checkstyle rule to ensure that all API endpoints are documented Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4ede6715 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4ede6715 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4ede6715 Branch: refs/heads/trunk Commit: 4ede671514563a3cc116bc2059d6d8b878a5a784 Parents: 3acd2e6 Author: Attila DoroszlaiAuthored: Tue Apr 11 17:24:36 2017 +0200 Committer: Attila Doroszlai Committed: Thu Apr 20 09:55:17 2017 +0200 -- ambari-server/checkstyle.xml| 1 + ambari-server/pom.xml | 2 +- ambari-server/src/main/assemblies/server.xml| 2 +- utility/checkstyle.xml | 38 + utility/pom.xml | 5 +- .../apache/ambari/annotations/ApiIgnore.java| 29 .../UndocumentedRestApiOperationCheck.java | 76 ++ ...dTransactionalOnPrivateMethodsCheckTest.java | 4 +- .../UndocumentedRestApiOperationCheckTest.java | 53 +++ .../checkstyle/InputRestApiOperation.java | 138 +++ 10 files changed, 343 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4ede6715/ambari-server/checkstyle.xml -- diff --git a/ambari-server/checkstyle.xml b/ambari-server/checkstyle.xml index bf7698d..6b4824a 100644 --- a/ambari-server/checkstyle.xml +++ b/ambari-server/checkstyle.xml @@ -13,6 +13,7 @@ + http://git-wip-us.apache.org/repos/asf/ambari/blob/4ede6715/ambari-server/pom.xml -- diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml index fbc2b9f..ba97f88 100644 --- a/ambari-server/pom.xml +++ b/ambari-server/pom.xml @@ -1631,7 +1631,7 @@ utility utility 1.0.0.0-SNAPSHOT - test + provided org.kohsuke http://git-wip-us.apache.org/repos/asf/ambari/blob/4ede6715/ambari-server/src/main/assemblies/server.xml -- diff --git a/ambari-server/src/main/assemblies/server.xml b/ambari-server/src/main/assemblies/server.xml index 2783526..43053fb 100644 --- a/ambari-server/src/main/assemblies/server.xml +++ b/ambari-server/src/main/assemblies/server.xml @@ -418,7 +418,7 @@ 644 /usr/lib/ambari-server false - compile + runtime http://git-wip-us.apache.org/repos/asf/ambari/blob/4ede6715/utility/checkstyle.xml -- diff --git a/utility/checkstyle.xml b/utility/checkstyle.xml new file mode 100644 index 000..2e7d6f0 --- /dev/null +++ b/utility/checkstyle.xml @@ -0,0 +1,38 @@ + + +http://www.puppycrawl.com/dtds/configuration_1_3.dtd;> + + + + + + + + + + + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/4ede6715/utility/pom.xml -- diff --git a/utility/pom.xml b/utility/pom.xml index 6f60206..7d5eb93 100644 --- a/utility/pom.xml +++ b/utility/pom.xml @@ -52,7 +52,6 @@ com.google.guava guava 19.0 - test @@ -96,6 +95,10 @@ + +org.apache.maven.plugins +maven-checkstyle-plugin + http://git-wip-us.apache.org/repos/asf/ambari/blob/4ede6715/utility/src/main/java/org/apache/ambari/annotations/ApiIgnore.java -- diff --git a/utility/src/main/java/org/apache/ambari/annotations/ApiIgnore.java b/utility/src/main/java/org/apache/ambari/annotations/ApiIgnore.java new file mode 100644 index 000..d50c2fd --- /dev/null +++ b/utility/src/main/java/org/apache/ambari/annotations/ApiIgnore.java @@ -0,0 +1,29 @@ +/* + * 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
[04/49] ambari git commit: AMBARI-20436. Create a prototype of ambari-server swagger integration. (jaimin)
http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/lib/marked.js -- diff --git a/ambari-web/api-docs/lib/marked.js b/ambari-web/api-docs/lib/marked.js new file mode 100644 index 000..c2a678d --- /dev/null +++ b/ambari-web/api-docs/lib/marked.js @@ -0,0 +1,1272 @@ +/** + * marked - a markdown parser + * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed) + * https://github.com/chjj/marked + */ + +;(function() { + +/** + * Block-Level Grammar + */ + +var block = { + newline: /^\n+/, + code: /^( {4}[^\n]+\n*)+/, + fences: noop, + hr: /^( *[-*_]){3,} *(?:\n+|$)/, + heading: /^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/, + nptable: noop, + lheading: /^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/, + blockquote: /^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/, + list: /^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/, + html: /^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/, + def: /^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/, + table: noop, + paragraph: /^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/, + text: /^[^\n]+/ +}; + +block.bullet = /(?:[*+-]|\d+\.)/; +block.item = /^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/; +block.item = replace(block.item, 'gm') + (/bull/g, block.bullet) + (); + +block.list = replace(block.list) + (/bull/g, block.bullet) + ('hr', '\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))') + ('def', '\\n+(?=' + block.def.source + ')') + (); + +block.blockquote = replace(block.blockquote) + ('def', block.def) + (); + +block._tag = '(?!(?:' + + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code' + + '|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo' + + '|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b'; + +block.html = replace(block.html) + ('comment', //) + ('closed', /<(tag)[\s\S]+?<\/\1>/) + ('closing', /])*?>/) + (/tag/g, block._tag) + (); + +block.paragraph = replace(block.paragraph) + ('hr', block.hr) + ('heading', block.heading) + ('lheading', block.lheading) + ('blockquote', block.blockquote) + ('tag', '<' + block._tag) + ('def', block.def) + (); + +/** + * Normal Block Grammar + */ + +block.normal = merge({}, block); + +/** + * GFM Block Grammar + */ + +block.gfm = merge({}, block.normal, { + fences: /^ *(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/, + paragraph: /^/ +}); + +block.gfm.paragraph = replace(block.paragraph) + ('(?!', '(?!' ++ block.gfm.fences.source.replace('\\1', '\\2') + '|' ++ block.list.source.replace('\\1', '\\3') + '|') + (); + +/** + * GFM + Tables Block Grammar + */ + +block.tables = merge({}, block.gfm, { + nptable: /^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/, + table: /^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/ +}); + +/** + * Block Lexer + */ + +function Lexer(options) { + this.tokens = []; + this.tokens.links = {}; + this.options = options || marked.defaults; + this.rules = block.normal; + + if (this.options.gfm) { +if (this.options.tables) { + this.rules = block.tables; +} else { + this.rules = block.gfm; +} + } +} + +/** + * Expose Block Rules + */ + +Lexer.rules = block; + +/** + * Static Lex Method + */ + +Lexer.lex = function(src, options) { + var lexer = new Lexer(options); + return lexer.lex(src); +}; + +/** + * Preprocessing + */ + +Lexer.prototype.lex = function(src) { + src = src +.replace(/\r\n|\r/g, '\n') +.replace(/\t/g, '') +.replace(/\u00a0/g, ' ') +.replace(/\u2424/g, '\n'); + + return this.token(src, true); +}; + +/** + * Lexing + */ + +Lexer.prototype.token = function(src, top, bq) { + var src = src.replace(/^ +$/gm, '') +, next +, loose +, cap +, bull +, b +, item +, space +, i +, l; + + while (src) { +// newline +if (cap = this.rules.newline.exec(src)) { + src = src.substring(cap[0].length); + if (cap[0].length > 1) { +this.tokens.push({ + type: 'space' +}); + } +} + +// code +if (cap = this.rules.code.exec(src)) { + src = src.substring(cap[0].length); + cap = cap[0].replace(/^ {4}/gm, ''); + this.tokens.push({ +type: 'code', +text: !this.options.pedantic + ? cap.replace(/\n+$/, '') + : cap + }); + continue; +} + +// fences (gfm) +if (cap = this.rules.fences.exec(src)) { + src = src.substring(cap[0].length); + this.tokens.push({ +type: 'code', +lang: cap[2], +text: cap[3] + }); + continue; +} + +// heading +if (cap = this.rules.heading.exec(src)) { + src = src.substring(cap[0].length); + this.tokens.push({ +type: 'heading', +depth: cap[1].length, +text: cap[2] + }); + continue; +} + +// table no leading pipe (gfm) +if (top && (cap =
[12/49] ambari git commit: AMBARI-20436. Create a prototype of ambari-server swagger integration. (jaimin)
http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/css/print.css -- diff --git a/ambari-web/api-docs/css/print.css b/ambari-web/api-docs/css/print.css new file mode 100644 index 000..77073f1 --- /dev/null +++ b/ambari-web/api-docs/css/print.css @@ -0,0 +1,1167 @@ +/* Original style from softwaremaniacs.org (c) Ivan Sagalaev*/ +.swagger-section pre code { + display: block; + padding: 0.5em; + background: #F0F0F0; +} +.swagger-section pre code, +.swagger-section pre .subst, +.swagger-section pre .tag .title, +.swagger-section pre .lisp .title, +.swagger-section pre .clojure .built_in, +.swagger-section pre .nginx .title { + color: black; +} +.swagger-section pre .string, +.swagger-section pre .title, +.swagger-section pre .constant, +.swagger-section pre .parent, +.swagger-section pre .tag .value, +.swagger-section pre .rules .value, +.swagger-section pre .rules .value .number, +.swagger-section pre .preprocessor, +.swagger-section pre .ruby .symbol, +.swagger-section pre .ruby .symbol .string, +.swagger-section pre .aggregate, +.swagger-section pre .template_tag, +.swagger-section pre .django .variable, +.swagger-section pre .smalltalk .class, +.swagger-section pre .addition, +.swagger-section pre .flow, +.swagger-section pre .stream, +.swagger-section pre .bash .variable, +.swagger-section pre .apache .tag, +.swagger-section pre .apache .cbracket, +.swagger-section pre .tex .command, +.swagger-section pre .tex .special, +.swagger-section pre .erlang_repl .function_or_atom, +.swagger-section pre .markdown .header { + color: #800; +} +.swagger-section pre .comment, +.swagger-section pre .annotation, +.swagger-section pre .template_comment, +.swagger-section pre .diff .header, +.swagger-section pre .chunk, +.swagger-section pre .markdown .blockquote { + color: #888; +} +.swagger-section pre .number, +.swagger-section pre .date, +.swagger-section pre .regexp, +.swagger-section pre .literal, +.swagger-section pre .smalltalk .symbol, +.swagger-section pre .smalltalk .char, +.swagger-section pre .go .constant, +.swagger-section pre .change, +.swagger-section pre .markdown .bullet, +.swagger-section pre .markdown .link_url { + color: #080; +} +.swagger-section pre .label, +.swagger-section pre .javadoc, +.swagger-section pre .ruby .string, +.swagger-section pre .decorator, +.swagger-section pre .filter .argument, +.swagger-section pre .localvars, +.swagger-section pre .array, +.swagger-section pre .attr_selector, +.swagger-section pre .important, +.swagger-section pre .pseudo, +.swagger-section pre .pi, +.swagger-section pre .doctype, +.swagger-section pre .deletion, +.swagger-section pre .envvar, +.swagger-section pre .shebang, +.swagger-section pre .apache .sqbracket, +.swagger-section pre .nginx .built_in, +.swagger-section pre .tex .formula, +.swagger-section pre .erlang_repl .reserved, +.swagger-section pre .prompt, +.swagger-section pre .markdown .link_label, +.swagger-section pre .vhdl .attribute, +.swagger-section pre .clojure .attribute, +.swagger-section pre .coffeescript .property { + color: #ff; +} +.swagger-section pre .keyword, +.swagger-section pre .id, +.swagger-section pre .phpdoc, +.swagger-section pre .title, +.swagger-section pre .built_in, +.swagger-section pre .aggregate, +.swagger-section pre .css .tag, +.swagger-section pre .javadoctag, +.swagger-section pre .phpdoc, +.swagger-section pre .yardoctag, +.swagger-section pre .smalltalk .class, +.swagger-section pre .winutils, +.swagger-section pre .bash .variable, +.swagger-section pre .apache .tag, +.swagger-section pre .go .typename, +.swagger-section pre .tex .command, +.swagger-section pre .markdown .strong, +.swagger-section pre .request, +.swagger-section pre .status { + font-weight: bold; +} +.swagger-section pre .markdown .emphasis { + font-style: italic; +} +.swagger-section pre .nginx .built_in { + font-weight: normal; +} +.swagger-section pre .coffeescript .javascript, +.swagger-section pre .javascript .xml, +.swagger-section pre .tex .formula, +.swagger-section pre .xml .javascript, +.swagger-section pre .xml .vbscript, +.swagger-section pre .xml .css, +.swagger-section pre .xml .cdata { + opacity: 0.5; +} +.swagger-section .swagger-ui-wrap { + line-height: 1; + font-family: "Droid Sans", sans-serif; + max-width: 960px; + margin-left: auto; + margin-right: auto; + /* JSONEditor specific styling */ +} +.swagger-section .swagger-ui-wrap b, +.swagger-section .swagger-ui-wrap strong { + font-family: "Droid Sans", sans-serif; + font-weight: bold; +} +.swagger-section .swagger-ui-wrap q, +.swagger-section .swagger-ui-wrap blockquote { + quotes: none; +} +.swagger-section .swagger-ui-wrap p { + line-height: 1.4em; + padding: 0 0 10px; + color: #33; +} +.swagger-section .swagger-ui-wrap q:before, +.swagger-section .swagger-ui-wrap q:after, +.swagger-section .swagger-ui-wrap
[18/49] ambari git commit: AMBARI-20436. Create a prototype of ambari-server swagger integration. (jaimin)
http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewDataMigrationService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewDataMigrationService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewDataMigrationService.java deleted file mode 100644 index 2a9aa64..000 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewDataMigrationService.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.ambari.server.api.services; - -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.Response; - -import org.apache.ambari.server.orm.entities.ViewInstanceEntity; -import org.apache.ambari.server.view.ViewDataMigrationUtility; -import org.apache.ambari.server.view.ViewRegistry; -import org.apache.ambari.view.migration.ViewDataMigrationException; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -/** - * Service responsible for data migration between view instances. - */ -public class ViewDataMigrationService extends BaseService { - /** - * Logger. - */ - private static final Log LOG = LogFactory.getLog(ViewDataMigrationService.class); - - /** - * The current view name. - */ - private final String viewName; - - /** - * The current view version. - */ - private final String viewVersion; - - /** - * The current view instance name. - */ - private final String instanceName; - - /** - * The singleton view registry. - */ - ViewRegistry viewRegistry; - - /** - * The view data migration utility. - */ - private ViewDataMigrationUtility viewDataMigrationUtility; - - /** - * Constructor. - * - * @param viewName the current view name - * @param viewVersionthe current view version - * @param instanceName the current view instance name - */ - public ViewDataMigrationService(String viewName, String viewVersion, String instanceName) { -this.viewName = viewName; -this.viewVersion = viewVersion; -this.instanceName = instanceName; -this.viewRegistry = ViewRegistry.getInstance(); - } - - /** - * Migrates view instance persistence data from origin view instance - * specified in the path params. - * - * @param originViewVersion the origin view version - * @param originInstanceName the origin view instance name - */ - @PUT - @Path("{originVersion}/{originInstanceName}") - public Response migrateData(@PathParam("originVersion") String originViewVersion, - @PathParam("originInstanceName") String originInstanceName) - throws ViewDataMigrationException { - -if (!viewRegistry.checkAdmin()) { - throw new WebApplicationException(Response.Status.FORBIDDEN); -} - -LOG.info("Data Migration to view instance " + viewName + "/" + viewVersion + "/" + instanceName + -" from " + viewName + "/" + originViewVersion + "/" + originInstanceName); - -ViewInstanceEntity instanceDefinition = viewRegistry.getInstanceDefinition( -viewName, viewVersion, instanceName); -ViewInstanceEntity originInstanceDefinition = viewRegistry.getInstanceDefinition( -viewName, originViewVersion, originInstanceName); - -getViewDataMigrationUtility().migrateData(instanceDefinition, originInstanceDefinition, false); - -Response.ResponseBuilder builder = Response.status(Response.Status.OK); -return builder.build(); - } - - protected ViewDataMigrationUtility getViewDataMigrationUtility() { -if (viewDataMigrationUtility == null) { - viewDataMigrationUtility = new ViewDataMigrationUtility(viewRegistry); -} -return viewDataMigrationUtility; - } - - protected void setViewDataMigrationUtility(ViewDataMigrationUtility viewDataMigrationUtility) { -this.viewDataMigrationUtility = viewDataMigrationUtility; - } -}
[02/49] ambari git commit: AMBARI-20436. Create a prototype of ambari-server swagger integration. (jaimin)
http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/swagger-ui.min.js -- diff --git a/ambari-web/api-docs/swagger-ui.min.js b/ambari-web/api-docs/swagger-ui.min.js new file mode 100644 index 000..0ec399e --- /dev/null +++ b/ambari-web/api-docs/swagger-ui.min.js @@ -0,0 +1,12 @@ +(function(){function e(){e.history=e.history||[],e.history.push(arguments),this.console&(Array.prototype.slice.call(arguments)[0])}function t(e){if(e instanceof Object)for(var n in e)e.hasOwnProperty("type")&&"object"==e.type&&(e.defaultProperties=e.required?e.required:[]),t(e[n])}this.Handlebars=this.Handlebars||{},this.Handlebars.templates=this.Handlebars.templates||{},this.Handlebars.templates.apikey_button_view=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return"\n\n\n\n \n"+s((i=null!=(i=t.keyName||(null!=e?e.keyName:e))?i:o,typeof i===a?i.call(e,{name:"keyName",hash:{},data:r}):i))+'\n\napply\n \n\n\n'},useData:!0}),this.Handlebars.templates.basic_auth_button_view=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){return'\n\n \nUsername\n\nPassword\n\n apply\n \n\n\n'},useData:!0}),this.Han dlebars.templates.content_type=Handlebars.template({1:function(e,t,n,r){var i,a="";return i=t.each.call(e,null!=e?e.produces:e,{name:"each",hash:{},fn:this.program(2,r),inverse:this.noop,data:r}),null!=i&&(a+=i),a},2:function(e,t,n,r){var i,a=this.lambda,o=' ',i=a(e,e),null!=i&&(o+=i),o+"\n"},4:function(e,t,n,r){return' application/json\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a='\n\n';return i=t["if"].call(e,null!=e?e.produces:e,{name:"if",hash:{},fn:this.program(1,r),inverse:this.program(4,r),data:r}),null!=i&&(a+=i),a+"\n"},useData:!0}),$(function(){$.fn.vAlign=function(){return this.each(function(){var e=$(this).height(),t=$(this).parent().height(),n=(t-e)/2;$(this).css("margin-top",n)})},$.fn.stretchFormtasticInputWidthToParent=function(){return this.each(function(){var e=$(this).cl osest("form").innerWidth(),t=parseInt($(this).closest("form").css("padding-left"),10)+parseInt($(this).closest("form").css("padding-right"),10),n=parseInt($(this).css("padding-left"),10)+parseInt($(this).css("padding-right"),10);$(this).css("width",e-t-n)})},$("form.formtastic li.string input, form.formtastic textarea").stretchFormtasticInputWidthToParent(),$("ul.downplayed li div.content p").vAlign(),$("form.sandbox").submit(function(){var e=!0;return $(this).find("input.required").each(function(){$(this).removeClass("error"),""===$(this).val()&&($(this).addClass("error"),$(this).wiggle(),e=!1)}),e})}),Function.prototype.bind&&&"object"==typeof console.log&&["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(e){console[e]=this.bind(console[e],console)},Function.prototype.call),window.Docs={shebang:function(){var e=$.param.fragment().split("/");switch(e.shift(),e.length){case 1:break;case 2:var t="#resources_nav [data-resource] [data- endpoint="+e[0]+"_"+e[1]+"]",n=$("#swagger_sidebar").find(t),r=n.attr("data-selected");"undefined"==typeof r&("click")}}},Handlebars.registerHelper("sanitize",function(e){return e=e.replace(/