[ambari] branch AMBARI-24798 deleted (was 5fcb0ca)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch AMBARI-24798 in repository https://gitbox.apache.org/repos/asf/ambari.git. was 5fcb0ca [AMBARI-24798] Add "maintainer" field to StackService API (mradhakrishnan) The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[ambari] branch trunk updated (18f6d37 -> 5b99d0c)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch trunk in repository https://gitbox.apache.org/repos/asf/ambari.git. from 18f6d37 AMBARI-24811. Remove unused files from ambari-agent (aonishuk) add 5fcb0ca [AMBARI-24798] Add "maintainer" field to StackService API (mradhakrishnan) add 5b99d0c Merge pull request #2490 from apache/AMBARI-24798 No new revisions were added by this update. Summary of changes: .../ambari/server/controller/StackServiceResponse.java | 7 +++ .../controller/internal/StackServiceResourceProvider.java | 7 +++ .../java/org/apache/ambari/server/stack/ServiceModule.java | 4 .../java/org/apache/ambari/server/state/ServiceInfo.java| 13 + 4 files changed, 31 insertions(+)
[ambari] branch AMBARI-24798 created (now 5fcb0ca)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch AMBARI-24798 in repository https://gitbox.apache.org/repos/asf/ambari.git. at 5fcb0ca [AMBARI-24798] Add "maintainer" field to StackService API (mradhakrishnan) This branch includes the following new commits: new 5fcb0ca [AMBARI-24798] Add "maintainer" field to StackService API (mradhakrishnan) The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[ambari] 01/01: [AMBARI-24798] Add "maintainer" field to StackService API (mradhakrishnan)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch AMBARI-24798 in repository https://gitbox.apache.org/repos/asf/ambari.git commit 5fcb0cab0247159ebc42dc30e7ebdbbe1b1af3f2 Author: Madhuvanthi Radhakrishnan AuthorDate: Thu Oct 18 15:39:18 2018 -0700 [AMBARI-24798] Add "maintainer" field to StackService API (mradhakrishnan) --- .../ambari/server/controller/StackServiceResponse.java | 7 +++ .../controller/internal/StackServiceResourceProvider.java | 7 +++ .../java/org/apache/ambari/server/stack/ServiceModule.java | 4 .../java/org/apache/ambari/server/state/ServiceInfo.java| 13 + 4 files changed, 31 insertions(+) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/StackServiceResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/StackServiceResponse.java index fda087a..6b579c6 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/StackServiceResponse.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/StackServiceResponse.java @@ -41,6 +41,7 @@ public class StackServiceResponse { private String comments; private String serviceVersion; private ServiceInfo.Selection selection; + private String maintainer; private boolean serviceCheckSupported; private List customCommands; @@ -100,6 +101,7 @@ public class StackServiceResponse { requiredServices = service.getRequiredServices(); serviceCheckSupported = null != service.getCommandScript(); selection = service.getSelection(); +maintainer = service.getMaintainer(); // the custom command names defined at the service (not component) level List definitions = service.getCustomCommands(); @@ -130,6 +132,11 @@ public class StackServiceResponse { this.selection = selection; } + @ApiModelProperty(name = "maintainer") + public String getMaintainer(){ +return maintainer; + } + @ApiModelProperty(name = "stack_name") public String getStackName() { return stackName; diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackServiceResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackServiceResourceProvider.java index 7e07861..9395276 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackServiceResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackServiceResourceProvider.java @@ -72,6 +72,9 @@ public class StackServiceResourceProvider extends ReadOnlyResourceProvider { private static final String SELECTION_PROPERTY_ID = PropertyHelper.getPropertyId( "StackServices", "selection"); + private static final String MAINTAINER_PROPERTY_ID = PropertyHelper.getPropertyId( + "StackServices", "maintainer"); + private static final String VERSION_PROPERTY_ID = PropertyHelper.getPropertyId( "StackServices", "service_version"); @@ -129,6 +132,7 @@ public class StackServiceResourceProvider extends ReadOnlyResourceProvider { USER_NAME_PROPERTY_ID, COMMENTS_PROPERTY_ID, SELECTION_PROPERTY_ID, + MAINTAINER_PROPERTY_ID, VERSION_PROPERTY_ID, CONFIG_TYPES, REQUIRED_SERVICES_ID, @@ -220,6 +224,9 @@ public class StackServiceResourceProvider extends ReadOnlyResourceProvider { setResourceProperty(resource, SELECTION_PROPERTY_ID, response.getSelection(), requestedIds); +setResourceProperty(resource, MAINTAINER_PROPERTY_ID, +response.getMaintainer(), requestedIds); + setResourceProperty(resource, CONFIG_TYPES, response.getConfigTypes(), requestedIds); diff --git a/ambari-server/src/main/java/org/apache/ambari/server/stack/ServiceModule.java b/ambari-server/src/main/java/org/apache/ambari/server/stack/ServiceModule.java index b3d4b17..e9997b7 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/stack/ServiceModule.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/stack/ServiceModule.java @@ -300,6 +300,10 @@ public class ServiceModule extends BaseModule implem serviceInfo.setSelection(parent.getSelection()); } +if (serviceInfo.isMaintainerEmpty()) { + serviceInfo.setMaintainer(parent.getMaintainer()); +} + if(null == serviceInfo.getSupportDeleteViaUIField()){ serviceInfo.setSupportDeleteViaUI(parent.isSupportDeleteViaUI()); } diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceInfo.java b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceInfo.java index 59cee41..b8e1e94 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceInfo.java +++ b/ambari-server/src/main/java/org/apache/ambari/ser
[ambari] branch trunk updated (cf74bb1 -> 6adc889)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch trunk in repository https://gitbox.apache.org/repos/asf/ambari.git. from cf74bb1 AMBARI-24742. Implementing a new service to be used in case we want to encrypt/decrypt sensitive information using custom/environment master key (also injected into Guice) (#2430) add d3e45e9 AMBARI-21150: Mpack API and DB Schema changes (mradhakrishnan) add cf2b52a AMBARI-21231: Download and extract mpacks. Add unit tests (mradhakrishnan) add 9106dcc AMBARI-21231: Mpack to Stack Linkage and Parsing mpacks at bootstrap (mradhakrishnan) add f9d7051 AMBARI-21077: Fix build issues after reverting patch for AMBARI-21077 and merging latest trunk (jluniya) add ab5721c AMBARI-21523: DELETE Api for Mpacks (mradhakrishnan) add 32023fb AMBARI-21796 : Clear versionDefinition map during new mpack registration and mpack deletion (mradhakrishnan) add 4ae9222 AMBARI-21849 : Clean up repo_version table during mpack delete, add create validation for mpacks (mradhakrishnan) add 4cfd7a9 AMBARI-21849 : Addendum to fix checkstyle issues and null check (mradhakrishnan) add a82e169 AMBARI-22082: Create missing parent directory when expanding mpack tarball (jluniya) add 3959182 AMBARI-22283 : Add stack name and version to mpack API (mradhakrishnan) add aaa56f2 AMBARI-22283 : Add stack name and version to mpack API (mradhakrishnan) add 562e52b AMBARI-22283 : Add stack name and version to mpack API (mradhakrishnan) add 10bf7ba [AMBARI-22904] Revised mpack APIs (#252) add 29aa64d AMBARI-22971: Remove current_mpack_id to mpack_id in stacks table (jluniya) add 27f19ad [AMBARI-22992] Update error handling during mpack installation (#363) add a77b2f9 AMBARI-22979: Update software registry API to support new mpack schema (jluniya) (#433) add ffe161f [AMBARI-23223] Stack Mpack link broken in stacks api add 9360b63 [AMBARI-23254] Mpack should have both displayName and description add fab74c2 [AMBARI-23223] Review comments add a6536f3 Modifications to choose only necessary changes from Ambari3.0 to Ambari2.8 (mradhakrishnan) add 2b89b14 Merge branch 'trunk' into AMBARI-24711 add a019793 Fix unit tests due to mpack backport (mradhakrishnan) new 6adc889 Merge pull request #2401 from apache/AMBARI-24711 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: ambari-server/conf/unix/ambari.properties |1 + ambari-server/conf/windows/ambari.properties |1 + ambari-server/src/main/assemblies/server.xml |8 + .../api/resources/MpackResourceDefinition.java | 112 ++ .../api/resources/ResourceInstanceFactoryImpl.java |4 + .../resources/StackVersionResourceDefinition.java | 56 +- .../ambari/server/api/services/AmbariMetaInfo.java | 107 +- .../server/api/services/MpackRequestSwagger.java | 30 + .../ambari/server/api/services/MpacksService.java | 186 .../ambari/server/configuration/Configuration.java | 17 + .../controller/AmbariManagementController.java | 58 + .../controller/AmbariManagementControllerImpl.java | 69 +- .../ambari/server/controller/ControllerModule.java |2 + .../ambari/server/controller/MpackRequest.java | 142 +++ .../ambari/server/controller/MpackResponse.java| 149 +++ .../AbstractControllerResourceProvider.java|4 + .../internal/AbstractResourceProvider.java |4 +- .../controller/internal/DefaultProviderModule.java |8 +- .../controller/internal/MpackResourceProvider.java | 363 +++ .../internal/StackVersionResourceProvider.java | 134 ++- .../ambari/server/controller/spi/Resource.java |2 + .../metrics/system/impl/AmbariMetricSinkImpl.java |2 - .../apache/ambari/server/mpack/MpackManager.java | 588 ++ .../ambari/server/mpack/MpackManagerFactory.java | 39 + .../org/apache/ambari/server/orm/dao/MpackDAO.java | 104 ++ .../server/orm/dao/RepositoryVersionDAO.java | 15 +- .../org/apache/ambari/server/orm/dao/StackDAO.java | 25 + .../ambari/server/orm/entities/MpackEntity.java| 162 +++ .../ambari/server/orm/entities/StackEntity.java| 14 + .../apache/ambari/server/stack/StackDirectory.java | 12 +- .../apache/ambari/server/stack/StackManager.java |7 +- .../org/apache/ambari/server/state/Module.java | 188 .../ambari/server/state/ModuleComponent.java | 120 +++ .../ambari/server/state/ModuleDependency.java | 88 ++ .../java/org/apache/ambari/server/state/Mpack.java | 276 + .../server/state/stack/StackMetainfoXml.java | 23 +-
[ambari] 01/01: Merge pull request #2401 from apache/AMBARI-24711
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ambari.git commit 6adc889221b5919aa96e415e4c60a803c95aa3f8 Merge: cf74bb1 a019793 Author: mradha25 AuthorDate: Wed Oct 10 13:28:01 2018 -0700 Merge pull request #2401 from apache/AMBARI-24711 Ambari 24711 : backport mpack rest apis to trunk ambari-server/conf/unix/ambari.properties |1 + ambari-server/conf/windows/ambari.properties |1 + ambari-server/src/main/assemblies/server.xml |8 + .../api/resources/MpackResourceDefinition.java | 112 ++ .../api/resources/ResourceInstanceFactoryImpl.java |4 + .../resources/StackVersionResourceDefinition.java | 56 +- .../ambari/server/api/services/AmbariMetaInfo.java | 107 +- .../server/api/services/MpackRequestSwagger.java | 30 + .../ambari/server/api/services/MpacksService.java | 186 .../ambari/server/configuration/Configuration.java | 17 + .../controller/AmbariManagementController.java | 58 + .../controller/AmbariManagementControllerImpl.java | 69 +- .../ambari/server/controller/ControllerModule.java |2 + .../ambari/server/controller/MpackRequest.java | 142 +++ .../ambari/server/controller/MpackResponse.java| 149 +++ .../AbstractControllerResourceProvider.java|4 + .../internal/AbstractResourceProvider.java |4 +- .../controller/internal/DefaultProviderModule.java |8 +- .../controller/internal/MpackResourceProvider.java | 363 +++ .../internal/StackVersionResourceProvider.java | 134 ++- .../ambari/server/controller/spi/Resource.java |2 + .../metrics/system/impl/AmbariMetricSinkImpl.java |2 - .../apache/ambari/server/mpack/MpackManager.java | 588 ++ .../ambari/server/mpack/MpackManagerFactory.java | 39 + .../org/apache/ambari/server/orm/dao/MpackDAO.java | 104 ++ .../server/orm/dao/RepositoryVersionDAO.java | 15 +- .../org/apache/ambari/server/orm/dao/StackDAO.java | 25 + .../ambari/server/orm/entities/MpackEntity.java| 162 +++ .../ambari/server/orm/entities/StackEntity.java| 14 + .../apache/ambari/server/stack/StackDirectory.java | 12 +- .../apache/ambari/server/stack/StackManager.java |7 +- .../org/apache/ambari/server/state/Module.java | 188 .../ambari/server/state/ModuleComponent.java | 120 +++ .../ambari/server/state/ModuleDependency.java | 88 ++ .../java/org/apache/ambari/server/state/Mpack.java | 276 + .../server/state/stack/StackMetainfoXml.java | 23 +- .../apache/ambari/server/utils/MpackVersion.java | 82 +- .../apache/ambari/server/utils/VersionUtils.java | 12 +- .../src/main/resources/Ambari-DDL-Derby-CREATE.sql | 21 + .../src/main/resources/Ambari-DDL-MySQL-CREATE.sql | 19 + .../main/resources/Ambari-DDL-Oracle-CREATE.sql| 20 + .../main/resources/Ambari-DDL-Postgres-CREATE.sql | 20 + .../resources/Ambari-DDL-SQLAnywhere-CREATE.sql| 20 + .../main/resources/Ambari-DDL-SQLServer-CREATE.sql | 20 + .../src/main/resources/META-INF/persistence.xml|1 + .../src/main/resources/mpacks-v2/README.txt|1 + .../ambari/server/agent/AgentResourceTest.java |2 + .../ambari/server/api/query/QueryImplTest.java |2 +- .../api/resources/MpackResourceDefinitionTest.java | 36 + .../StackVersionResourceDefinitionTest.java|2 +- .../server/api/services/AmbariMetaInfoTest.java| 11 + .../server/api/services/MpacksServiceTest.java | 92 ++ .../ambari/server/bootstrap/BootStrapTest.java |3 + .../KerberosAdminPersistedCredentialCheckTest.java |2 + .../server/configuration/ConfigurationTest.java| 10 + .../AmbariManagementControllerImplTest.java| 54 +- .../ambari/server/controller/AmbariServerTest.java |2 + .../server/controller/KerberosHelperTest.java |2 + .../ambari/server/controller/MpackRequestTest.java | 44 + .../server/controller/MpackResponseTest.java | 57 + .../internal/AbstractResourceProviderTest.java |2 +- .../internal/ClusterControllerImplTest.java|2 +- .../internal/HostResourceProviderTest.java |2 + .../internal/MpackResourceProviderTest.java| 290 + .../StackUpgradeConfigurationMergeTest.java|3 + ...erAuthenticationSourceResourceProviderTest.java |2 + .../UserAuthorizationResourceProviderTest.java |2 + .../internal/UserResourceProviderTest.java |2 + .../system/impl/TestAmbariMetricsSinkImpl.java |2 - .../ambari/server/mpack/MpackManagerMock.java | 590 ++ .../server/orm/InMemoryDefaultTestModule.java | 10 +- .../apache/ambari/server/orm/dao/MpackDAOTest.java | 80 ++ .../org/apache/ambari/server/orm/db/DDLTests.java |2 +- .../server/orm/entities/MpackEntityTest.java
[ambari] branch AMBARI-24711 updated (2b89b14 -> a019793)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch AMBARI-24711 in repository https://gitbox.apache.org/repos/asf/ambari.git. from 2b89b14 Merge branch 'trunk' into AMBARI-24711 add a019793 Fix unit tests due to mpack backport (mradhakrishnan) No new revisions were added by this update. Summary of changes: .../controller/internal/MpackResourceProvider.java | 33 +- .../internal/StackVersionResourceProvider.java |2 - .../ambari/server/mpack/MpackManagerFactory.java |3 +- .../org/apache/ambari/server/orm/dao/MpackDAO.java |1 - .../ambari/server/upgrade/UpgradeCatalog251.java |1 - .../apache/ambari/server/utils/MpackVersion.java |1 - .../apache/ambari/server/utils/VersionUtils.java |1 - .../main/resources/Ambari-DDL-SQLServer-CREATE.sql | 65 -- .../ambari/server/agent/AgentResourceTest.java |2 + .../ambari/server/api/query/QueryImplTest.java |2 +- .../StackVersionResourceDefinitionTest.java|2 +- .../server/api/services/AmbariMetaInfoTest.java| 31 +- .../server/api/services/MpacksServiceTest.java |1 - .../ambari/server/bootstrap/BootStrapTest.java |3 + .../KerberosAdminPersistedCredentialCheckTest.java |2 + .../AmbariManagementControllerImplTest.java|5 +- .../ambari/server/controller/AmbariServerTest.java |2 + .../server/controller/KerberosHelperTest.java |2 + .../ambari/server/controller/MpackRequestTest.java |2 +- .../internal/HostResourceProviderTest.java |2 + .../internal/MpackResourceProviderTest.java| 57 +- .../StackUpgradeConfigurationMergeTest.java|3 + ...erAuthenticationSourceResourceProviderTest.java |2 + .../UserAuthorizationResourceProviderTest.java |2 + .../internal/UserResourceProviderTest.java |2 + .../ambari/server/mpack/MpackManagerMock.java} | 94 +- .../server/orm/InMemoryDefaultTestModule.java | 10 +- .../org/apache/ambari/server/orm/db/DDLTests.java |2 +- .../AbstractPrepareKerberosServerActionTest.java |2 + .../UpdateKerberosConfigsServerActionTest.java |2 + .../upgrades/KerberosKeytabsActionTest.java|3 + .../upgrades/PreconfigureKerberosActionTest.java |2 + .../ambari/server/state/ConfigHelperTest.java |3 + .../server/testing/DBInconsistencyTests.java |3 + .../server/testutils/PartialNiceMockBinder.java|3 + .../ambari/server/update/HostUpdateHelperTest.java |3 + .../server/upgrade/UpgradeCatalog251Test.java |2 + .../server/upgrade/UpgradeCatalog252Test.java |2 + .../server/upgrade/UpgradeCatalog260Test.java |4 + .../server/upgrade/UpgradeCatalog270Test.java |2 + ambari-server/src/test/resources/README.txt|1 + .../src/test/resources/abc.tar.gz |0 .../src/test/resources/mpacks-v2/README.txt|1 + .../src/test/resources/mpacks-v2/abc.tar.gz|0 .../mpacks-v2/upgrade-packs/upgrade-basic.xml | 1140 .../test/resources/upgrade-packs/upgrade-basic.xml | 1140 46 files changed, 2447 insertions(+), 201 deletions(-) copy ambari-server/src/{main/java/org/apache/ambari/server/mpack/MpackManager.java => test/java/org/apache/ambari/server/mpack/MpackManagerMock.java} (89%) create mode 100644 ambari-server/src/test/resources/README.txt copy contrib/views/wfmanager/src/main/resources/ui/tests/unit/.gitkeep => ambari-server/src/test/resources/abc.tar.gz (100%) create mode 100644 ambari-server/src/test/resources/mpacks-v2/README.txt copy contrib/views/wfmanager/src/main/resources/ui/tests/unit/.gitkeep => ambari-server/src/test/resources/mpacks-v2/abc.tar.gz (100%) create mode 100644 ambari-server/src/test/resources/mpacks-v2/upgrade-packs/upgrade-basic.xml create mode 100644 ambari-server/src/test/resources/upgrade-packs/upgrade-basic.xml
[ambari] branch AMBARI-24711 updated (a6536f3 -> 2b89b14)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch AMBARI-24711 in repository https://gitbox.apache.org/repos/asf/ambari.git. from a6536f3 Modifications to choose only necessary changes from Ambari3.0 to Ambari2.8 (mradhakrishnan) add 3d782a0 AMBARI-24245. Fix FindBugs warnings (#2398) add 1f1f890 AMBARI-24700 - Slider widget: insert a space char between label value and unit-name (#2399) add 726d1d0 AMBARI-24708. Automation script for upgrade old style isilon cluster to the new mpack based structure (amagyar) (#2397) add 33a42c3 AMBARI-24715. Clean up ambari-agent.log (aonishuk) add b497744 AMBARI-24717. Ambari-agent does for save data hashes correctly (aonishuk) add 7b5fd0a AMBARI-24704. Problems with accounts page when sysprep_skip_create_users_and_groups is absent (akovalenko) add 6976220 [AMBARI-24718] STS fails after start, after stack upgrade from 3.0.1 … (#2406) add 2b89b14 Merge branch 'trunk' into AMBARI-24711 No new revisions were added by this update. Summary of changes: .../src/main/python/ambari_agent/ClusterCache.py | 12 +- .../python/ambari_agent/ClusterMetadataCache.py| 9 +- .../main/python/ambari_agent/HeartbeatThread.py| 2 +- .../main/python/ambari_agent/InitializerModule.py | 2 +- .../main/python/ambari_agent/RecoveryManager.py| 10 +- .../main/python/ambari_agent/alerts/collector.py | 5 + .../listeners/CommandsEventListener.py | 4 + .../listeners/MetadataEventListener.py | 6 - .../listeners/ServerResponsesListener.py | 2 +- ambari-agent/src/main/python/ambari_agent/main.py | 2 + .../src/main/python/ambari_agent/security.py | 2 +- ambari-server/findbugs.exclude.xml | 11 +- .../server/actionmanager/ActionDBAccessorImpl.java | 4 +- .../server/actionmanager/ActionScheduler.java | 8 - .../server/actionmanager/HostRoleStatus.java | 42 +- .../ambari/server/agent/HeartbeatMonitor.java | 3 - .../ambari/server/agent/HeartbeatProcessor.java| 1 - .../ambari/server/agent/stomp/TopologyHolder.java | 2 - .../api/query/render/ClusterBlueprintRenderer.java | 2 +- .../resources/RepositoryResourceDefinition.java| 2 +- .../api/resources/UpgradeResourceDefinition.java | 2 +- .../ambari/server/api/services/BaseRequest.java| 2 +- .../services/stackadvisor/StackAdvisorHelper.java | 4 - .../services/stackadvisor/StackAdvisorRunner.java | 2 +- ...MetricsHadoopSinkVersionCompatibilityCheck.java | 4 +- .../ambari/server/checks/CheckDescription.java | 86 ++-- .../checks/DatabaseConsistencyCheckHelper.java | 5 - .../ambari/server/checks/MpackInstallChecker.java | 2 - .../ambari/server/configuration/Configuration.java | 36 +- .../AmbariCustomCommandExecutionHelper.java| 19 +- .../controller/AmbariManagementControllerImpl.java | 9 +- .../server/controller/AmbariManagementHelper.java | 1 - .../server/controller/AuthToLocalBuilder.java | 2 +- .../server/controller/KerberosHelperImpl.java | 24 - .../internal/AbstractResourceProvider.java | 2 +- .../internal/ActionResourceProvider.java | 4 +- .../ActiveWidgetLayoutResourceProvider.java| 39 +- .../internal/AlertDefinitionResourceProvider.java | 2 +- .../internal/AlertHistoryResourceProvider.java | 2 +- .../controller/internal/AlertResourceProvider.java | 4 +- .../internal/AmbariPrivilegeResourceProvider.java | 4 +- .../internal/ArtifactResourceProvider.java | 8 +- .../internal/BlueprintConfigurationProcessor.java | 24 +- .../internal/BlueprintResourceProvider.java| 4 +- .../internal/ClientConfigResourceProvider.java | 4 +- .../internal/ClusterPrivilegeResourceProvider.java | 4 +- .../internal/ClusterResourceProvider.java | 42 +- .../ClusterStackVersionResourceProvider.java | 11 +- ...ompatibleRepositoryVersionResourceProvider.java | 8 +- .../internal/ComponentResourceProvider.java| 2 +- .../internal/ConfigGroupResourceProvider.java | 6 +- .../internal/ConfigurationResourceProvider.java| 2 +- .../internal/ExportBlueprintRequest.java | 23 - .../internal/ExtensionLinkResourceProvider.java| 6 +- .../internal/ExtensionResourceProvider.java| 4 +- .../internal/ExtensionVersionResourceProvider.java | 4 +- .../controller/internal/FeedResourceProvider.java | 4 +- .../internal/GroupPrivilegeResourceProvider.java | 23 +- .../controller/internal/GroupResourceProvider.java | 4 +- .../HostComponentProcessResourceProvider.java | 4 +- .../internal/HostComponentResourceProvider.java| 6 +- .../controller/internal/HostResourceProvider.java | 8 +- .../internal/HostStackVersionResourceProvider.java | 6 +- .../internal/InstanceResourcePro
[ambari] 12/20: AMBARI-22283 : Add stack name and version to mpack API (mradhakrishnan)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch AMBARI-24711 in repository https://gitbox.apache.org/repos/asf/ambari.git commit 562e52bde1d7a85acec5be10eb4419997fa42e76 Author: Madhuvanthi Radhakrishnan AuthorDate: Tue Oct 24 14:44:07 2017 -0700 AMBARI-22283 : Add stack name and version to mpack API (mradhakrishnan) --- .../server/api/resources/StackVersionResourceDefinition.java | 1 + .../server/controller/internal/MpackResourceProvider.java | 10 -- .../controller/internal/StackVersionResourceProvider.java | 5 + 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinition.java b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinition.java index b0786e1..d621210 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinition.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinition.java @@ -23,6 +23,7 @@ import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.ambari.server.api.services.Request; import org.apache.ambari.server.api.util.TreeNode; import org.apache.ambari.server.controller.internal.ResourceImpl; diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java index 8e1dbf5..11fe3a8 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java @@ -142,16 +142,12 @@ public class MpackResourceProvider extends AbstractControllerResourceProvider { MpackResponse response = getManagementController().registerMpack(mpackRequest); if (response != null) { notifyCreate(Resource.Type.Mpack, request); -String[] stackNameVersion = response.getStackId().split("-"); Resource resource = new ResourceImpl(Resource.Type.Mpack); resource.setProperty(MPACK_ID, response.getMpackId()); resource.setProperty(REGISTRY_ID, response.getRegistryId()); resource.setProperty(MPACK_NAME, response.getMpackName()); resource.setProperty(MPACK_VERSION, response.getMpackVersion()); resource.setProperty(MPACK_URI, response.getMpackUri()); -resource.setProperty(STACK_NAME_PROPERTY_ID, stackNameVersion[0]); -resource.setProperty(STACK_VERSION_PROPERTY_ID, stackNameVersion[1]); - associatedResources.add(resource); return getRequestStatus(null, associatedResources); } @@ -236,9 +232,6 @@ public class MpackResourceProvider extends AbstractControllerResourceProvider { resource.setProperty(MPACK_VERSION, entity.getMpackVersion()); resource.setProperty(MPACK_URI, entity.getMpackUri()); resource.setProperty(REGISTRY_ID, entity.getRegistryId()); -StackEntity stackEntity = stackDAO.findByMpack(entity.getMpackId()); -resource.setProperty(STACK_NAME_PROPERTY_ID, stackEntity.getStackName()); -resource.setProperty(STACK_VERSION_PROPERTY_ID, stackEntity.getStackVersion()); results.add(resource); } } else { @@ -277,9 +270,6 @@ public class MpackResourceProvider extends AbstractControllerResourceProvider { resource.setProperty(MPACK_VERSION, entity.getMpackVersion()); resource.setProperty(MPACK_URI, entity.getMpackUri()); resource.setProperty(REGISTRY_ID, entity.getRegistryId()); - StackEntity stackEntity = stackDAO.findByMpack(entity.getMpackId()); - resource.setProperty(STACK_NAME_PROPERTY_ID, stackEntity.getStackName()); - resource.setProperty(STACK_VERSION_PROPERTY_ID, stackEntity.getStackVersion()); List packlets = getManagementController().getPacklets(entity.getMpackId()); resource.setProperty(PACKLETS, packlets); results.add(resource); diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackVersionResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackVersionResourceProvider.java index 86a994a..d1e8a42 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackVersionResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackVersionResourceProvider.java @@ -45,9 +45,6 @@ import org.apache.ambari.server.orm.entities.StackEntity; import com.google.inject.Inject; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.Sets; - @Static
[ambari] 10/20: AMBARI-22283 : Add stack name and version to mpack API (mradhakrishnan)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch AMBARI-24711 in repository https://gitbox.apache.org/repos/asf/ambari.git commit 3959182fddd84e55ee5cb48249c583f77d21fe06 Author: Madhuvanthi Radhakrishnan AuthorDate: Sun Oct 22 14:34:34 2017 -0700 AMBARI-22283 : Add stack name and version to mpack API (mradhakrishnan) --- .../server/controller/internal/MpackResourceProvider.java | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java index 694bf3c..8e1dbf5 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java @@ -142,12 +142,15 @@ public class MpackResourceProvider extends AbstractControllerResourceProvider { MpackResponse response = getManagementController().registerMpack(mpackRequest); if (response != null) { notifyCreate(Resource.Type.Mpack, request); +String[] stackNameVersion = response.getStackId().split("-"); Resource resource = new ResourceImpl(Resource.Type.Mpack); resource.setProperty(MPACK_ID, response.getMpackId()); resource.setProperty(REGISTRY_ID, response.getRegistryId()); resource.setProperty(MPACK_NAME, response.getMpackName()); resource.setProperty(MPACK_VERSION, response.getMpackVersion()); resource.setProperty(MPACK_URI, response.getMpackUri()); +resource.setProperty(STACK_NAME_PROPERTY_ID, stackNameVersion[0]); +resource.setProperty(STACK_VERSION_PROPERTY_ID, stackNameVersion[1]); associatedResources.add(resource); return getRequestStatus(null, associatedResources); @@ -233,6 +236,9 @@ public class MpackResourceProvider extends AbstractControllerResourceProvider { resource.setProperty(MPACK_VERSION, entity.getMpackVersion()); resource.setProperty(MPACK_URI, entity.getMpackUri()); resource.setProperty(REGISTRY_ID, entity.getRegistryId()); +StackEntity stackEntity = stackDAO.findByMpack(entity.getMpackId()); +resource.setProperty(STACK_NAME_PROPERTY_ID, stackEntity.getStackName()); +resource.setProperty(STACK_VERSION_PROPERTY_ID, stackEntity.getStackVersion()); results.add(resource); } } else { @@ -271,9 +277,11 @@ public class MpackResourceProvider extends AbstractControllerResourceProvider { resource.setProperty(MPACK_VERSION, entity.getMpackVersion()); resource.setProperty(MPACK_URI, entity.getMpackUri()); resource.setProperty(REGISTRY_ID, entity.getRegistryId()); - - ArrayList packletArrayList = getManagementController().getPacklets(entity.getMpackId()); - resource.setProperty(PACKLETS, packletArrayList); + StackEntity stackEntity = stackDAO.findByMpack(entity.getMpackId()); + resource.setProperty(STACK_NAME_PROPERTY_ID, stackEntity.getStackName()); + resource.setProperty(STACK_VERSION_PROPERTY_ID, stackEntity.getStackVersion()); + List packlets = getManagementController().getPacklets(entity.getMpackId()); + resource.setProperty(PACKLETS, packlets); results.add(resource); } }
[ambari] 17/20: [AMBARI-23223] Stack Mpack link broken in stacks api
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch AMBARI-24711 in repository https://gitbox.apache.org/repos/asf/ambari.git commit ffe161fcdff875b5b6ec1828659ff77ad17c0ecf Author: Madhuvanthi Radhakrishnan AuthorDate: Thu Mar 15 12:16:42 2018 -0700 [AMBARI-23223] Stack Mpack link broken in stacks api --- .../controller/AmbariManagementControllerImpl.java | 18 +++-- .../controller/internal/MpackResourceProvider.java | 76 +++--- .../internal/StackVersionResourceProvider.java | 14 ++-- 3 files changed, 60 insertions(+), 48 deletions(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java index 29e42d9..6061640 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java @@ -4736,14 +4736,24 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle String stackName = request.getStackName(); String stackVersion = request.getStackVersion(); String propertyName = request.getPropertyName(); +Set configs; -Set properties; +//properties : cluster-env +//TODO: Remove after getting rid of cluster-env if (propertyName != null) { - properties = ambariMetaInfo.getStackPropertiesByName(stackName, stackVersion, propertyName); + configs = ambariMetaInfo.getStackPropertiesByName(stackName, stackVersion, propertyName); } else { - properties = ambariMetaInfo.getStackProperties(stackName, stackVersion); + configs = ambariMetaInfo.getStackProperties(stackName, stackVersion); } -for (PropertyInfo property: properties) { + +//settings : stackSettings +if(configs.size() == 0){ + if (propertyName != null) { +configs = ambariMetaInfo.getStackSettingsByName(stackName, stackVersion, propertyName); + } else +configs = ambariMetaInfo.getStackSettings(stackName, stackVersion); +} +for (PropertyInfo property: configs) { response.add(property.convertToResponse()); } diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java index 3169eda..57e987d 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java @@ -31,7 +31,6 @@ import java.util.Collections; import java.util.LinkedHashSet; import java.util.ArrayList; import java.util.List; - import com.google.inject.Inject; import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.StaticallyInject; @@ -247,50 +246,53 @@ public class MpackResourceProvider extends AbstractControllerResourceProvider { } else { // Fetch a particular mpack based on id Map propertyMap = new HashMap<>(PredicateHelper.getProperties(predicate)); - if (propertyMap.containsKey(STACK_NAME_PROPERTY_ID) && propertyMap.containsKey(STACK_VERSION_PROPERTY_ID)) { + if (propertyMap.containsKey(MPACK_RESOURCE_ID)) { +Object objMpackId = propertyMap.get(MPACK_RESOURCE_ID); +if (objMpackId != null) { + mpackId = Long.valueOf((String) objMpackId); +} +MpackResponse response = getManagementController().getMpack(mpackId); +Resource resource = new ResourceImpl(Resource.Type.Mpack); +if (null != response) { + resource.setProperty(MPACK_RESOURCE_ID, response.getId()); + resource.setProperty(MPACK_ID, response.getMpackId()); + resource.setProperty(MPACK_NAME, response.getMpackName()); + resource.setProperty(MPACK_VERSION, response.getMpackVersion()); + resource.setProperty(MPACK_URI, response.getMpackUri()); + resource.setProperty(MPACK_DESCRIPTION, response.getDescription()); + resource.setProperty(REGISTRY_ID, response.getRegistryId()); + List modules = getManagementController().getModules(response.getId()); + resource.setProperty(MODULES, modules); + results.add(resource); +} + } //Fetch an mpack based on a stackVersion query + else if (propertyMap.containsKey(STACK_NAME_PROPERTY_ID) + && propertyMap.containsKey(STACK_VERSION_PROPERTY_ID)) { String stackName = (String) propertyMap.get(STACK_NAME_PROPERTY_ID); String stackVersion = (String) propertyMap.get(STACK_VERSION_PROPERTY_ID); StackEntity stackEntity = stackDAO.find(stackName, stackVersion); mpackId =
[ambari] 01/20: AMBARI-21150: Mpack API and DB Schema changes (mradhakrishnan)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch AMBARI-24711 in repository https://gitbox.apache.org/repos/asf/ambari.git commit d3e45e90dc1954c214b44e7539928a2ade69a35e Author: Madhuvanthi Radhakrishnan AuthorDate: Mon Jun 5 12:25:48 2017 -0700 AMBARI-21150: Mpack API and DB Schema changes (mradhakrishnan) --- ambari-server/conf/unix/ambari.properties | 1 + ambari-server/conf/windows/ambari.properties | 1 + .../api/resources/MpackResourceDefinition.java | 50 +++ .../api/resources/ResourceInstanceFactoryImpl.java | 4 + .../api/services/AbstractVersionService.java | 362 + .../ambari/server/api/services/AmbariMetaInfo.java | 57 .../ambari/server/api/services/MpacksService.java | 102 ++ .../ambari/server/configuration/Configuration.java | 17 + .../controller/AmbariManagementController.java | 22 ++ .../controller/AmbariManagementControllerImpl.java | 14 +- .../ambari/server/controller/ControllerModule.java | 2 + .../ambari/server/controller/MpackRequest.java | 82 + .../ambari/server/controller/MpackResponse.java| 99 ++ .../controller/internal/DefaultProviderModule.java | 8 +- .../controller/internal/MpackResourceProvider.java | 209 .../ambari/server/controller/spi/Resource.java | 2 + .../metrics/system/impl/AmbariMetricSinkImpl.java | 2 - .../apache/ambari/server/mpack/MpackManager.java | 194 +++ .../ambari/server/mpack/MpackManagerFactory.java | 37 +++ .../org/apache/ambari/server/orm/dao/MpackDAO.java | 99 ++ .../ambari/server/orm/entities/MpackEntity.java| 158 + .../org/apache/ambari/server/state/Mpacks.java | 114 +++ .../org/apache/ambari/server/state/Packlet.java| 65 .../src/main/resources/Ambari-DDL-Derby-CREATE.sql | 19 ++ .../src/main/resources/Ambari-DDL-MySQL-CREATE.sql | 18 + .../main/resources/Ambari-DDL-Oracle-CREATE.sql| 18 + .../main/resources/Ambari-DDL-Postgres-CREATE.sql | 18 + .../resources/Ambari-DDL-SQLAnywhere-CREATE.sql| 18 + .../main/resources/Ambari-DDL-SQLServer-CREATE.sql | 18 + .../src/main/resources/META-INF/persistence.xml| 1 + .../system/impl/TestAmbariMetricsSinkImpl.java | 2 - 31 files changed, 1805 insertions(+), 8 deletions(-) diff --git a/ambari-server/conf/unix/ambari.properties b/ambari-server/conf/unix/ambari.properties index 4e189a4..6254f7d 100644 --- a/ambari-server/conf/unix/ambari.properties +++ b/ambari-server/conf/unix/ambari.properties @@ -129,6 +129,7 @@ views.http.pragma=no-cache views.http.charset=utf-8 mpacks.staging.path=$ROOT/var/lib/ambari-server/resources/mpacks +mpacks-v2.staging.path=$ROOT/var/lib/ambari-server/resources/mpacks-v2 # exclude some ciphers that are not supported by old versions of ssl (this fix was added for SLES12) security.server.disabled.ciphers=TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384|TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384|TLS_RSA_WITH_AES_256_CBC_SHA256|TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384|TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384|TLS_DHE_RSA_WITH_AES_256_CBC_SHA256|TLS_DHE_DSS_WITH_AES_256_CBC_SHA256|TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA|TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA|TLS_RSA_WITH_AES_256_CBC_SHA|TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA|TLS_ECDH_RSA_WITH_AES_256_CBC_SHA|TLS_DHE_RSA_WITH_AES_256_CBC_S [...] diff --git a/ambari-server/conf/windows/ambari.properties b/ambari-server/conf/windows/ambari.properties index 80d14ff..f1db315 100644 --- a/ambari-server/conf/windows/ambari.properties +++ b/ambari-server/conf/windows/ambari.properties @@ -109,6 +109,7 @@ views.http.pragma=no-cache views.http.charset=utf-8 mpacks.staging.path=resources\\mpacks +mpacks-v2.staging.path=resources\\mpacks-v2 views.skip.home-directory-check.file-system.list=wasb,adls,adl diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/MpackResourceDefinition.java b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/MpackResourceDefinition.java new file mode 100644 index 000..e33cd31 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/MpackResourceDefinition.java @@ -0,0 +1,50 @@ +/** + * 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, eithe
[ambari] 14/20: AMBARI-22971: Remove current_mpack_id to mpack_id in stacks table (jluniya)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch AMBARI-24711 in repository https://gitbox.apache.org/repos/asf/ambari.git commit 29aa64d6ea9015a395a4410cf90f445c79dd7d45 Author: Jayush Luniya AuthorDate: Mon Feb 12 18:04:08 2018 -0800 AMBARI-22971: Remove current_mpack_id to mpack_id in stacks table (jluniya) --- .../api/resources/MpackResourceDefinition.java | 4 +- .../resources/StackVersionResourceDefinition.java | 3 +- .../controller/internal/MpackResourceProvider.java | 2 +- .../apache/ambari/server/mpack/MpackManager.java | 9 ++- .../org/apache/ambari/server/orm/dao/StackDAO.java | 2 +- .../ambari/server/orm/entities/StackEntity.java| 18 +++--- .../src/main/resources/Ambari-DDL-Derby-CREATE.sql | 4 +- .../src/main/resources/Ambari-DDL-MySQL-CREATE.sql | 4 +- .../main/resources/Ambari-DDL-Oracle-CREATE.sql| 4 +- .../main/resources/Ambari-DDL-Postgres-CREATE.sql | 4 +- .../resources/Ambari-DDL-SQLAnywhere-CREATE.sql| 4 +- .../main/resources/Ambari-DDL-SQLServer-CREATE.sql | 69 +- 12 files changed, 96 insertions(+), 31 deletions(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/MpackResourceDefinition.java b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/MpackResourceDefinition.java index 167e773..c9560ab 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/MpackResourceDefinition.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/MpackResourceDefinition.java @@ -96,13 +96,13 @@ public class MpackResourceDefinition extends BaseResourceDefinition { } /*** - * Post processing to change the name of the result node to current_mpack + * Post processing to change the name of the result node to mpack */ private class MpackPostProcessor implements PostProcessor { @Override public void process(Request request, TreeNode resultNode, String href) { if (href.contains("/stacks/")) { -resultNode.setName("current_mpack"); +resultNode.setName("mpack"); } } diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinition.java b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinition.java index d621210..0e2026a 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinition.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinition.java @@ -92,14 +92,13 @@ public class StackVersionResourceDefinition extends BaseResourceDefinition { } /*** - * Post processing to change the name of the result node to current_mpack + * Post processing to change the name of the result node to stack */ private class StackVersionPostProcessor implements PostProcessor { @Override public void process(Request request, TreeNode resultNode, String href) { if (href.contains("/mpacks/")) { resultNode.setName("stack"); - } } } diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java index adae593..3771258 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java @@ -246,7 +246,7 @@ public class MpackResourceProvider extends AbstractControllerResourceProvider { String stackName = (String) propertyMap.get(STACK_NAME_PROPERTY_ID); String stackVersion = (String) propertyMap.get(STACK_VERSION_PROPERTY_ID); StackEntity stackEntity = stackDAO.find(stackName, stackVersion); -mpackId = stackEntity.getCurrentMpackId(); +mpackId = stackEntity.getMpackId(); if (mpackId != null) { MpackResponse response = getManagementController().getMpack(mpackId); Resource resource = new ResourceImpl(Resource.Type.Mpack); diff --git a/ambari-server/src/main/java/org/apache/ambari/server/mpack/MpackManager.java b/ambari-server/src/main/java/org/apache/ambari/server/mpack/MpackManager.java index 8a1604c..69495d2 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/mpack/MpackManager.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/mpack/MpackManager.java @@ -547,11 +547,14 @@ public class MpackManager { stackEntity = new StackEntity(); stackEntity.setStackName(stackName); stackEntity.setStackVersion(stackVersion); - stackEntity.setCurrentMpackId(mpacks.getMpackId()); + + stackEntity.setMpackId(mpack.getMpackId())
[ambari] 04/20: AMBARI-21077: Fix build issues after reverting patch for AMBARI-21077 and merging latest trunk (jluniya)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch AMBARI-24711 in repository https://gitbox.apache.org/repos/asf/ambari.git commit f9d70515bad9e8d5f582e99409969f4cc2839587 Author: Jayush Luniya AuthorDate: Mon Jul 10 12:53:08 2017 -0700 AMBARI-21077: Fix build issues after reverting patch for AMBARI-21077 and merging latest trunk (jluniya) --- .../server/api/services/MpackRequestSwagger.java | 30 +++ .../ambari/server/api/services/MpacksService.java | 82 +-- .../ambari/server/controller/MpackResponse.java| 10 +++ .../controller/internal/MpackResourceProvider.java | 19 +++-- .../ambari/server/upgrade/UpgradeCatalog251.java | 1 + .../server/api/services/MpacksServiceTest.java | 93 ++ 6 files changed, 219 insertions(+), 16 deletions(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/MpackRequestSwagger.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/MpackRequestSwagger.java new file mode 100644 index 000..5fe5693 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/MpackRequestSwagger.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.MpackRequest; +import org.apache.ambari.server.controller.internal.MpackResourceProvider; + +import io.swagger.annotations.ApiModelProperty; + +@SuppressWarnings("unused") // for Swagger +public interface MpackRequestSwagger extends ApiModel { + @ApiModelProperty(name = MpackResourceProvider.RESPONSE_KEY) + MpackRequest getMpackRequest(); +} diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/MpacksService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/MpacksService.java index 9912f88..32dae0f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/MpacksService.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/MpacksService.java @@ -20,7 +20,6 @@ package org.apache.ambari.server.api.services; import org.apache.ambari.server.api.resources.ResourceInstance; import org.apache.ambari.server.controller.spi.Resource; -import org.apache.ambari.server.api.util.ApiVersion; import javax.ws.rs.GET; import javax.ws.rs.POST; import javax.ws.rs.Path; @@ -28,19 +27,38 @@ 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 java.util.Collections; + +import org.apache.ambari.server.api.resources.ResourceInstance; +import org.apache.ambari.server.controller.MpackResponse.MpackResponseWrapper; +import org.apache.ambari.server.controller.internal.MpackResourceProvider; +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.ApiResponse; +import io.swagger.annotations.ApiResponses; + + /** * Service for Mpacks Management. * Endpoint for Mpack Data */ - +@Path("/mpacks/") +@Api(value = "Mpacks", description = "Endpoint for mpack-specific operations") public class MpacksService extends BaseService { - public MpacksService(ApiVersion apiVersion) { -super(apiVersion); + private static final String MPACK_REQUEST_TYPE = "org.apache.ambari.server.api.services.MpackRequestSwagger"; + + public MpacksService() { +super(); } /** @@ -53,7 +71,28 @@ public class MpacksService extends BaseService { * */ @GET - @Produces("text/plain") + @Produces(MediaType.TEXT_PLAIN) + @ApiOperation(value = "Returns all mpacks registered with this Ambari instance", +response = Mpack
[ambari] 07/20: AMBARI-21849 : Clean up repo_version table during mpack delete, add create validation for mpacks (mradhakrishnan)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch AMBARI-24711 in repository https://gitbox.apache.org/repos/asf/ambari.git commit 4ae922209f7173f492aa4a58b9e9c5c3fc34437b Author: Madhuvanthi Radhakrishnan AuthorDate: Wed Aug 30 11:37:24 2017 -0700 AMBARI-21849 : Clean up repo_version table during mpack delete, add create validation for mpacks (mradhakrishnan) --- .../ambari/server/api/services/AmbariMetaInfo.java | 4 +- .../controller/internal/MpackResourceProvider.java | 53 +- .../server/orm/dao/RepositoryVersionDAO.java | 15 - .../internal/MpackResourceProviderTest.java| 65 -- 4 files changed, 104 insertions(+), 33 deletions(-) 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 6812bf2..6ae0e1c 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 @@ -1554,7 +1554,9 @@ public class AmbariMetaInfo { * @throws IOException */ public void removeMpack(MpackEntity mpackEntity, StackEntity stackEntity) throws IOException { -versionDefinitions.clear(); +if(versionDefinitions != null) { + versionDefinitions.clear(); +} boolean stackDelete = mpackManager.removeMpack(mpackEntity, stackEntity); if(stackDelete) { diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java index 7366390..c4833d1 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java @@ -18,8 +18,12 @@ package org.apache.ambari.server.controller.internal; import java.io.IOException; + import java.util.HashSet; import java.util.Set; +import java.net.URI; +import java.net.URL; +import java.util.ArrayList; import java.util.Arrays; import java.util.Map; import java.util.HashMap; @@ -47,11 +51,16 @@ import org.apache.ambari.server.controller.MpackRequest; import org.apache.ambari.server.controller.utilities.PredicateHelper; import org.apache.ambari.server.controller.utilities.PropertyHelper; import org.apache.ambari.server.orm.dao.MpackDAO; +import org.apache.ambari.server.orm.dao.RepositoryVersionDAO; import org.apache.ambari.server.orm.dao.StackDAO; import org.apache.ambari.server.orm.entities.MpackEntity; import org.apache.ambari.server.orm.entities.StackEntity; import org.apache.ambari.server.state.Packlet; +import org.apache.ambari.server.state.StackId; +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang.Validate; + /** * ResourceProvider for Mpack instances */ @@ -88,6 +97,9 @@ public class MpackResourceProvider extends AbstractControllerResourceProvider { @Inject protected static StackDAO stackDAO; + @Inject + protected static RepositoryVersionDAO repositoryVersionDAO; + static { // properties PROPERTY_IDS.add(MPACK_ID); @@ -122,8 +134,10 @@ public class MpackResourceProvider extends AbstractControllerResourceProvider { Set associatedResources = new HashSet<>(); try { MpackRequest mpackRequest = getRequest(request); - if (mpackRequest == null) + if (mpackRequest == null) { throw new BodyParseException("Please provide " + MPACK_NAME + " ," + MPACK_VERSION + " ," + MPACK_URI); + } + validateCreateRequest(mpackRequest); MpackResponse response = getManagementController().registerMpack(mpackRequest); if (response != null) { notifyCreate(Resource.Type.Mpack, request); @@ -145,8 +159,39 @@ public class MpackResourceProvider extends AbstractControllerResourceProvider { return null; } - public MpackRequest getRequest(Request request) { -MpackRequest mpackRequest = new MpackRequest(); + /*** + * Validates the request body for the required properties in order to create an Mpack resource. + * @param mpackRequest + */ + private void validateCreateRequest(MpackRequest mpackRequest) { +final String mpackName = mpackRequest.getMpackName(); +final String mpackUrl = mpackRequest.getMpackUri(); +final Long registryId = mpackRequest.getRegistryId(); +final String mpackVersion = mpackRequest.getMpackVersion(); + +if(registryId == null) { + Validate.isTrue(mpackUrl != null); + LOG.info("Received a createMpack request" + + ", mpackUrl=" + mpackUrl); +} else { + Validate.notNull(mpackName, "MpackName should not be null"); +
[ambari] 15/20: [AMBARI-22992] Update error handling during mpack installation (#363)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch AMBARI-24711 in repository https://gitbox.apache.org/repos/asf/ambari.git commit 27f19ade679570881b6fa13e4dcaa82bcf764531 Author: mradha25 AuthorDate: Thu Feb 15 12:09:52 2018 -0800 [AMBARI-22992] Update error handling during mpack installation (#363) * [AMBARI-22992] Update error handling during mpack installation * [AMBARI-22997] cluster-settings.xml is not present in /var/lib/ambari-server/resources post ambari installation * [AMBARI-22992] Update error handling during mpack installation - review comments --- ambari-server/src/main/assemblies/server.xml | 5 ++ .../apache/ambari/server/mpack/MpackManager.java | 59 -- 2 files changed, 25 insertions(+), 39 deletions(-) diff --git a/ambari-server/src/main/assemblies/server.xml b/ambari-server/src/main/assemblies/server.xml index 21524ee..464972f 100644 --- a/ambari-server/src/main/assemblies/server.xml +++ b/ambari-server/src/main/assemblies/server.xml @@ -316,6 +316,11 @@ 755 + target/classes/cluster-settings.xml + /var/lib/ambari-server/resources + + + 755 target/classes/Ambari-DDL-Postgres-CREATE.sql /var/lib/ambari-server/resources diff --git a/ambari-server/src/main/java/org/apache/ambari/server/mpack/MpackManager.java b/ambari-server/src/main/java/org/apache/ambari/server/mpack/MpackManager.java index 69495d2..29b59b3 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/mpack/MpackManager.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/mpack/MpackManager.java @@ -213,13 +213,13 @@ public class MpackManager { if (mpackId != null) { mpackMap.put(mpackId, mpack); mpack.setMpackId(mpackId); - populateStackDB(mpack); - return new MpackResponse(mpack); -} else { - String message = "Mpack :" + mpackRequest.getMpackName() + " version: " + mpackRequest.getMpackVersion() -+ " already exists in server"; - throw new ResourceAlreadyExistsException(message); + if (populateStackDB(mpack)) +return new MpackResponse(mpack); } +String message = "Mpack :" + mpackRequest.getMpackName() + " version: " + mpackRequest.getMpackVersion() + + " already exists in server"; +throw new ResourceAlreadyExistsException(message); + } /*** @@ -318,7 +318,7 @@ public class MpackManager { generateMetainfo(metainfoFile, mpack); } -createSymLinks(); +createSymLinks(mpack); } /** @@ -426,18 +426,10 @@ public class MpackManager { * This will enable StackManager to parse the newly registered mpack as part of the stacks. * @throws IOException */ - private void createSymLinks() throws IOException { -String stackId = mpack.getStackId(); -String stackName = ""; -String stackVersion = ""; -if (stackId == null) { - stackName = mpack.getName(); - stackVersion = mpack.getVersion(); -} else { - StackId id = new StackId(stackId); - stackName = id.getStackName(); - stackVersion = id.getStackVersion(); -} + private void createSymLinks(Mpack mpack) throws IOException { + +String stackName = mpack.getName(); +String stackVersion = mpack.getVersion(); File stack = new File(stackRoot + "/" + stackName); Path stackPath = Paths.get(stackRoot + "/" + stackName + "/" + stackVersion); Path mpackPath = Paths.get(mpackStaging + "/" + mpack.getName() + "/" + mpack.getVersion()); @@ -506,7 +498,8 @@ public class MpackManager { String mpackName = mpacks.getName(); String mpackVersion = mpacks.getVersion(); List resultSet = mpackDAO.findByNameVersion(mpackName, mpackVersion); -if (resultSet.size() == 0) { +StackEntity stackEntity = stackDAO.find(mpackName, mpackVersion); +if (resultSet.size() == 0 && stackEntity == null) { LOG.info("Adding mpack {}-{} to the database", mpackName, mpackVersion); MpackEntity mpackEntity = new MpackEntity(); mpackEntity.setMpackName(mpackName); @@ -524,23 +517,12 @@ public class MpackManager { * Makes an entry or updates the entry in the stack table to establish a link between the mpack and the * associated stack * - * @param mpacks + * @param mpack * @throws IOException */ - protected void populateStackDB(Mpack mpacks) throws IOException { - -String stackId = mpack.getStackId(); -String stackName = ""; -String stackVersion = ""; -if (stackId == null) { - stackName = mpack.getName(); - stackVersion = mpack.getVersion(); -} else { - StackId id = new StackId(stackId); - stackName = id.getStackName(); - stackVersion =
[ambari] 11/20: AMBARI-22283 : Add stack name and version to mpack API (mradhakrishnan)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch AMBARI-24711 in repository https://gitbox.apache.org/repos/asf/ambari.git commit aaa56f26c351df0170d4931c21f3ac80aa37f414 Author: Madhuvanthi Radhakrishnan AuthorDate: Tue Oct 24 14:44:07 2017 -0700 AMBARI-22283 : Add stack name and version to mpack API (mradhakrishnan) --- .../api/resources/MpackResourceDefinition.java | 16 ++- .../resources/StackVersionResourceDefinition.java | 50 .../internal/AbstractResourceProvider.java | 2 +- .../internal/StackVersionResourceProvider.java | 134 + .../apache/ambari/server/mpack/MpackManager.java | 2 +- 5 files changed, 152 insertions(+), 52 deletions(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/MpackResourceDefinition.java b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/MpackResourceDefinition.java index 26972d8..167e773 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/MpackResourceDefinition.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/MpackResourceDefinition.java @@ -17,6 +17,12 @@ */ package org.apache.ambari.server.api.resources; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + import org.apache.ambari.server.api.services.Request; import org.apache.ambari.server.api.util.TreeNode; import org.apache.ambari.server.controller.internal.ResourceImpl; @@ -25,9 +31,6 @@ import org.apache.ambari.server.controller.spi.Resource.Type; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.Map; -import java.util.List; -import java.util.ArrayList; /** * Resource Definition for Mpack Resource types. @@ -56,6 +59,13 @@ public class MpackResourceDefinition extends BaseResourceDefinition { } @Override + public Set getSubResourceDefinitions() { +Set setChildren = new HashSet<>(); +setChildren.add(new SubResourceDefinition(Resource.Type.StackVersion, null, false)); +return setChildren; + } + + @Override public List getPostProcessors() { List listProcessors = new ArrayList<>(); listProcessors.add(new MpackHrefProcessor()); diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinition.java b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinition.java index 14f8b4f..b0786e1 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinition.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinition.java @@ -18,8 +18,14 @@ package org.apache.ambari.server.api.resources; +import java.util.ArrayList; import java.util.HashSet; +import java.util.List; +import java.util.Map; import java.util.Set; +import org.apache.ambari.server.api.services.Request; +import org.apache.ambari.server.api.util.TreeNode; +import org.apache.ambari.server.controller.internal.ResourceImpl; import org.apache.ambari.server.controller.spi.Resource; public class StackVersionResourceDefinition extends BaseResourceDefinition { @@ -53,4 +59,48 @@ public class StackVersionResourceDefinition extends BaseResourceDefinition { return children; } + @Override + public List getPostProcessors() { +List listProcessors = new ArrayList<>(); +listProcessors.add(new StackVersionHrefProcessor()); +listProcessors.add(new StackVersionPostProcessor()); +return listProcessors; + } + + /** + * Post Processing the mpack href when the call comes from stack endpoint to ensure that the + * href is a backreference to the mpacks end point + */ + private class StackVersionHrefProcessor extends BaseHrefPostProcessor { +@Override +public void process(Request request, TreeNode resultNode, String href) { + if (href.contains("/mpacks/")) { +ResourceImpl mpack = (ResourceImpl) resultNode.getObject(); +Map> mapInfo = mpack.getPropertiesMap(); +Map versionInfo = mapInfo.get("Versions"); + +int idx = href.indexOf("mpacks/"); +String stackName = (String)versionInfo.get("stack_name"); +String stackVersion = (String)versionInfo.get("stack_version"); +href = href.substring(0, idx) + "stacks/" + stackName + "/versions/" + stackVersion; +resultNode.setProperty("href", href); + } else { +super.process(request, resultNode, href); + } +} + } + + /*** + * Post processing to change the name of the result node to current_mpack + */ + private class StackVersionPostProcessor implements PostProcessor { +@Override +public void process(Request request, TreeNode r
[ambari] 16/20: AMBARI-22979: Update software registry API to support new mpack schema (jluniya) (#433)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch AMBARI-24711 in repository https://gitbox.apache.org/repos/asf/ambari.git commit a77b2f93bc260e1513cd247079c6bcec70ed0382 Author: jayush AuthorDate: Thu Feb 22 10:49:13 2018 -0800 AMBARI-22979: Update software registry API to support new mpack schema (jluniya) (#433) --- .../api/resources/MpackResourceDefinition.java | 2 +- .../ambari/server/api/services/MpacksService.java | 24 ++--- .../ambari/server/controller/MpackRequest.java | 24 ++--- .../ambari/server/controller/MpackResponse.java| 75 +++-- .../controller/internal/MpackResourceProvider.java | 51 + .../apache/ambari/server/mpack/MpackManager.java | 61 +-- .../org/apache/ambari/server/orm/dao/MpackDAO.java | 14 +-- .../ambari/server/orm/entities/MpackEntity.java| 20 ++-- .../java/org/apache/ambari/server/state/Mpack.java | 117 +++-- .../apache/ambari/server/utils/MpackVersion.java | 83 --- .../apache/ambari/server/utils/VersionUtils.java | 13 ++- .../AmbariManagementControllerImplTest.java| 2 +- .../ambari/server/controller/MpackRequestTest.java | 4 +- .../server/controller/MpackResponseTest.java | 8 +- .../internal/MpackResourceProviderTest.java| 20 ++-- .../apache/ambari/server/orm/dao/MpackDAOTest.java | 4 +- .../server/orm/entities/MpackEntityTest.java | 6 +- .../org/apache/ambari/server/state/MpackTest.java | 4 +- .../ambari/server/utils/TestVersionUtils.java | 32 +- 19 files changed, 309 insertions(+), 255 deletions(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/MpackResourceDefinition.java b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/MpackResourceDefinition.java index c9560ab..3875135 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/MpackResourceDefinition.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/MpackResourceDefinition.java @@ -86,7 +86,7 @@ public class MpackResourceDefinition extends BaseResourceDefinition { Map mpackInfo = mapInfo.get("MpackInfo"); int idx = href.indexOf("stacks/"); -Long mpackId = (Long)mpackInfo.get("mpack_id"); +Long mpackId = (Long)mpackInfo.get("id"); href = href.substring(0, idx) + "mpacks/" + mpackId; resultNode.setProperty("href", href); } else { diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/MpacksService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/MpacksService.java index c69ed01..4694841 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/MpacksService.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/MpacksService.java @@ -79,7 +79,7 @@ public class MpacksService extends BaseService { response = MpackResponseWrapper.class, responseContainer = RESPONSE_CONTAINER_LIST) @ApiImplicitParams({ @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, dataType = DATA_TYPE_STRING, - paramType = PARAM_TYPE_QUERY, defaultValue = MpackResourceProvider.MPACK_ID), + paramType = PARAM_TYPE_QUERY, defaultValue = MpackResourceProvider.MPACK_RESOURCE_ID), @ApiImplicitParam(name = QUERY_SORT, value = QUERY_SORT_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY), @ApiImplicitParam(name = QUERY_PAGE_SIZE, value = QUERY_PAGE_SIZE_DESCRIPTION, defaultValue = DEFAULT_PAGE_SIZE, @@ -129,13 +129,13 @@ public class MpacksService extends BaseService { } /*** - * Handles: GET /mpacks/{mpack_id} - * Return a specific mpack given an mpack_id + * Handles: GET /mpacks/{id} + * Return a specific mpack given an id * * @param */ @GET - @Path("{mpack_id}") + @Path("{id}") @Produces(MediaType.TEXT_PLAIN) @ApiOperation(value = "Returns information about a specific mpack that is registered with this Ambari instance", response = MpackResponseWrapper.class) @@ -151,14 +151,14 @@ public class MpacksService extends BaseService { @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR), }) public Response getMpack(String body, @Context HttpHeaders headers, @Context UriInfo ui, -@PathParam("mpack_id") String mpackId) { +@PathParam("id") String id) { return handleRequest(headers, body, ui, Request.Type.GET, -createMpackResource(mpackId)); +createMpackResource(id)); } @DELETE - @Path("{mpack_id}") + @Path("{id}") @Produces(MediaType.TEXT_PLAIN) @ApiOperation(value = "Deletes a selected management pack") @ApiIm
[ambari] 05/20: AMBARI-21523: DELETE Api for Mpacks (mradhakrishnan)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch AMBARI-24711 in repository https://gitbox.apache.org/repos/asf/ambari.git commit ab5721cc761c2992c8c238d20b3b48b60ae8437e Author: Madhuvanthi Radhakrishnan AuthorDate: Tue Jul 25 10:10:50 2017 -0700 AMBARI-21523: DELETE Api for Mpacks (mradhakrishnan) --- .../ambari/server/api/services/AmbariMetaInfo.java | 18 +++ .../ambari/server/api/services/MpacksService.java | 23 .../controller/AmbariManagementController.java | 10 .../controller/AmbariManagementControllerImpl.java | 18 ++- .../AbstractControllerResourceProvider.java| 2 + .../internal/AbstractResourceProvider.java | 2 +- .../controller/internal/MpackResourceProvider.java | 61 -- .../apache/ambari/server/mpack/MpackManager.java | 45 +++- .../org/apache/ambari/server/orm/dao/MpackDAO.java | 4 ++ .../org/apache/ambari/server/orm/dao/StackDAO.java | 25 + .../ambari/server/orm/entities/StackEntity.java| 1 + .../apache/ambari/server/stack/StackManager.java | 5 ++ 12 files changed, 207 insertions(+), 7 deletions(-) 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 ea0c68b..1ea5369 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 @@ -61,6 +61,9 @@ import org.apache.ambari.server.orm.dao.AlertDefinitionDAO; import org.apache.ambari.server.orm.dao.MetainfoDAO; import org.apache.ambari.server.orm.dao.StackDAO; import org.apache.ambari.server.orm.entities.AlertDefinitionEntity; +import org.apache.ambari.server.orm.entities.MpackEntity; +import org.apache.ambari.server.orm.entities.StackEntity; +import org.apache.ambari.server.stack.StackDirectory; import org.apache.ambari.server.stack.StackManager; import org.apache.ambari.server.stack.StackManagerFactory; import org.apache.ambari.server.stack.upgrade.ConfigUpgradePack; @@ -1541,4 +1544,19 @@ public class AmbariMetaInfo { return commonWidgetsDescriptorFile; } + /*** + * Remove Mpack from the mpackMap and stackMap which is used to power the Mpack and Stack APIs. + * Stack should be removed from stackMap only if it points to the mpack that is being removed. + * @param mpackEntity + * @param stackEntity + * @throws IOException + */ + public void removeMpack(MpackEntity mpackEntity, StackEntity stackEntity) throws IOException { + +boolean stackDelete = mpackManager.removeMpack(mpackEntity, stackEntity); + +if(stackDelete) { + stackManager.removeStack(stackEntity); +} + } } diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/MpacksService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/MpacksService.java index 32dae0f..c69ed01 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/MpacksService.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/MpacksService.java @@ -19,7 +19,10 @@ package org.apache.ambari.server.api.services; import org.apache.ambari.server.api.resources.ResourceInstance; + import org.apache.ambari.server.controller.spi.Resource; + +import javax.ws.rs.DELETE; import javax.ws.rs.GET; import javax.ws.rs.POST; import javax.ws.rs.Path; @@ -154,6 +157,26 @@ public class MpacksService extends BaseService { createMpackResource(mpackId)); } + @DELETE + @Path("{mpack_id}") + @Produces(MediaType.TEXT_PLAIN) + @ApiOperation(value = "Deletes a selected management pack") + @ApiImplicitParams({ +@ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, dataType = DATA_TYPE_STRING, + paramType = PARAM_TYPE_QUERY, defaultValue = MpackResourceProvider.ALL_PROPERTIES), + }) + @ApiResponses({ + @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION), + @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_CLUSTER_OR_HOST_NOT_FOUND), + @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED), + @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED), + @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR), + }) + public Response deleteMpack(String body, @Context HttpHeaders headers, @Context UriInfo ui, @PathParam("mpack_id") String mpackId) { +return handleRequest(headers, body, ui, Request.Type.DELETE, +createMpackResource(mpackId)); + } + /** * Create an mpack resource instance * @param mpackId diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/A
[ambari] 09/20: AMBARI-22082: Create missing parent directory when expanding mpack tarball (jluniya)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch AMBARI-24711 in repository https://gitbox.apache.org/repos/asf/ambari.git commit a82e169c7ed66c4a38795f0617711c784bb224a3 Author: Jayush Luniya AuthorDate: Thu Sep 28 10:50:13 2017 -0700 AMBARI-22082: Create missing parent directory when expanding mpack tarball (jluniya) --- .../ambari/server/controller/MpackResponse.java| 4 +- .../controller/internal/MpackResourceProvider.java | 43 ++--- .../apache/ambari/server/mpack/MpackManager.java | 188 +++-- .../server/state/{Mpacks.java => Mpack.java} | 6 +- .../org/apache/ambari/server/state/MpackTest.java | 2 +- 5 files changed, 161 insertions(+), 82 deletions(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/MpackResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/MpackResponse.java index 16eb03c..a2fc28a 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/MpackResponse.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/MpackResponse.java @@ -18,7 +18,7 @@ package org.apache.ambari.server.controller; -import org.apache.ambari.server.state.Mpacks; +import org.apache.ambari.server.state.Mpack; import org.apache.ambari.server.controller.internal.MpackResourceProvider; import io.swagger.annotations.ApiModelProperty; @@ -35,7 +35,7 @@ public class MpackResponse { private Long registryId; private String stackId; - public MpackResponse(Mpacks mpacks) { + public MpackResponse(Mpack mpacks) { this.mpackId = mpacks.getMpackId(); this.mpackVersion = mpacks.getVersion(); this.mpackUri = mpacks.getMpacksUri(); diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java index 70b6d74..694bf3c 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java @@ -57,12 +57,10 @@ import org.apache.ambari.server.orm.entities.MpackEntity; import org.apache.ambari.server.orm.entities.StackEntity; import org.apache.ambari.server.state.Packlet; import org.apache.ambari.server.state.StackId; -import org.apache.commons.io.IOUtils; import org.apache.commons.lang.Validate; import com.google.inject.Inject; - /** * ResourceProvider for Mpack instances */ @@ -78,10 +76,11 @@ public class MpackResourceProvider extends AbstractControllerResourceProvider { public static final String MPACK_URI = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + "mpack_uri"; public static final String PACKLETS = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + "packlets"; public static final String STACK_NAME_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + "stack_name"; - public static final String STACK_VERSION_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + "stack_version"; + public static final String STACK_VERSION_PROPERTY_ID = +RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + "stack_version"; private static Set pkPropertyIds = new HashSet<>( - Arrays.asList(MPACK_ID, STACK_NAME_PROPERTY_ID, STACK_VERSION_PROPERTY_ID)); +Arrays.asList(MPACK_ID, STACK_NAME_PROPERTY_ID, STACK_VERSION_PROPERTY_ID)); /** * The property ids for an mpack resource. @@ -163,6 +162,7 @@ public class MpackResourceProvider extends AbstractControllerResourceProvider { /*** * Validates the request body for the required properties in order to create an Mpack resource. + * * @param mpackRequest */ private void validateCreateRequest(MpackRequest mpackRequest) { @@ -171,24 +171,24 @@ public class MpackResourceProvider extends AbstractControllerResourceProvider { final Long registryId = mpackRequest.getRegistryId(); final String mpackVersion = mpackRequest.getMpackVersion(); -if(registryId == null) { +if (registryId == null) { Validate.isTrue(mpackUrl != null); LOG.info("Received a createMpack request" - + ", mpackUrl=" + mpackUrl); ++ ", mpackUrl=" + mpackUrl); } else { Validate.notNull(mpackName, "MpackName should not be null"); Validate.notNull(mpackVersion, "MpackVersion should not be null"); LOG.info("Received a createMpack request" - + ", mpackName=" + mpackName - + ", mpackVersion=" + mpackVersion - + ", registryId=" + registryId); ++ ", mpackName=" + mpackName ++ ", mpackVersion=" + mpackVersion +
[ambari] 02/20: AMBARI-21231: Download and extract mpacks. Add unit tests (mradhakrishnan)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch AMBARI-24711 in repository https://gitbox.apache.org/repos/asf/ambari.git commit cf2b52a10f0988602cfc331ee5bc2a3f4fab1593 Author: Madhuvanthi Radhakrishnan AuthorDate: Wed Jun 21 10:57:53 2017 -0700 AMBARI-21231: Download and extract mpacks. Add unit tests (mradhakrishnan) --- .../ambari/server/controller/MpackRequest.java | 84 +- .../ambari/server/controller/MpackResponse.java| 18 +- .../AbstractControllerResourceProvider.java| 2 + .../controller/internal/MpackResourceProvider.java | 22 +- .../apache/ambari/server/mpack/MpackManager.java | 201 ++- .../org/apache/ambari/server/orm/dao/MpackDAO.java | 2 +- .../ambari/server/orm/entities/MpackEntity.java| 16 +- .../org/apache/ambari/server/state/Mpacks.java | 139 +- .../org/apache/ambari/server/state/Packlet.java| 75 ++ .../api/resources/MpackResourceDefinitionTest.java | 35 +++ .../server/api/services/AmbariMetaInfoTest.java| 71 -- .../server/api/services/MpackServiceTest.java | 94 +++ .../server/configuration/ConfigurationTest.java| 10 + .../AmbariManagementControllerImplTest.java| 70 - .../ambari/server/controller/MpackRequestTest.java | 44 .../server/controller/MpackResponseTest.java | 54 .../internal/MpackResourceProviderTest.java| 281 + .../apache/ambari/server/orm/dao/MpackDAOTest.java | 76 ++ .../server/orm/entities/MpackEntityTest.java | 68 + .../org/apache/ambari/server/state/MpacksTest.java | 95 +++ 20 files changed, 1335 insertions(+), 122 deletions(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/MpackRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/MpackRequest.java index fa6dd1d..a705d18 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/MpackRequest.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/MpackRequest.java @@ -26,24 +26,24 @@ import org.apache.ambari.server.orm.entities.MpackEntity; */ public class MpackRequest { - private String mpackId; + private Long mpackId; private String mpackName; private String mpackVersion; - private String mpackUrl; - private String registryId; + private String mpackUri; + private Long registryId; - public MpackRequest(String mpackId) { + public MpackRequest(Long mpackId) { this.setMpackId(mpackId); } public MpackRequest() { } - public String getMpackId() { + public Long getMpackId() { return mpackId; } - public void setMpackId(String mpackId) { + public void setMpackId(Long mpackId) { this.mpackId = mpackId; } @@ -63,20 +63,80 @@ public class MpackRequest { this.mpackVersion = mpackVersion; } - public String getMpackUrl() { -return mpackUrl; + public String getMpackUri() { +return mpackUri; } - public void setMpackUrl(String mpackUrl) { -this.mpackUrl = mpackUrl; + public void setMpackUri(String mpackUri) { +this.mpackUri = mpackUri; } - public String getRegistryId() { + public Long getRegistryId() { return registryId; } - public void setRegistryId(String registryId) { + public void setRegistryId(Long registryId) { this.registryId = registryId; } + @Override + public int hashCode() { +int result = 1; +result = 31 + getMpackId().hashCode(); +return result; + } + + @Override + public boolean equals(Object obj) { +if (!(obj instanceof MpackRequest)) { + return false; +} +if (this == obj) { + return true; +} +MpackRequest mpackRequest = (MpackRequest) obj; + +if (mpackId == null) { + if (mpackRequest.mpackId != null) { +return false; + } +} else if (!mpackId.equals(mpackRequest.mpackId)) { + return false; +} + +if (mpackName == null) { + if (mpackRequest.mpackName != null) { +return false; + } +} else if (!mpackName.equals(mpackRequest.mpackName)) { + return false; +} + +if (mpackUri == null) { + if (mpackRequest.mpackUri != null) { +return false; + } +} else if (!mpackUri.equals(mpackRequest.mpackUri)) { + return false; +} + +if (registryId == null) { + if (mpackRequest.registryId != null) { +return false; + } +} else if (!registryId.equals(mpackRequest.registryId)) { + return false; +} + +if (mpackVersion == null) { + if (mpackRequest.mpackVersion != null) { +return false; + } +} else if (!mpackVersion.equals(mpackRequest.mpackVersion)) { + return false; +} + +return true; + } + } diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/MpackResponse.java b/ambari-server/src/main/java/org/apache/ambari/server
[ambari] 20/20: Modifications to choose only necessary changes from Ambari3.0 to Ambari2.8 (mradhakrishnan)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch AMBARI-24711 in repository https://gitbox.apache.org/repos/asf/ambari.git commit a6536f3c6fb0fa5415b42b63ff994fd2bc78c621 Author: Madhuvanthi Radhakrishnan AuthorDate: Thu Sep 27 15:51:56 2018 -0700 Modifications to choose only necessary changes from Ambari3.0 to Ambari2.8 (mradhakrishnan) --- ambari-server/src/main/assemblies/server.xml | 5 - .../api/services/AbstractVersionService.java | 362 - .../ambari/server/api/services/AmbariMetaInfo.java | 4 +- .../ambari/server/api/services/MpacksService.java | 7 +- .../controller/AmbariManagementController.java | 1 - .../controller/AmbariManagementControllerImpl.java | 43 +-- .../ambari/server/controller/MpackResponse.java| 3 +- .../controller/internal/MpackResourceProvider.java | 32 +- .../apache/ambari/server/mpack/MpackManager.java | 14 +- .../org/apache/ambari/server/orm/dao/MpackDAO.java | 18 +- .../ambari/server/orm/entities/MpackEntity.java| 22 +- .../apache/ambari/server/stack/StackManager.java | 3 +- .../org/apache/ambari/server/state/Module.java | 25 ++ .../ambari/server/state/ModuleComponent.java | 11 + .../java/org/apache/ambari/server/state/Mpack.java | 8 +- .../api/resources/MpackResourceDefinitionTest.java | 1 + .../server/api/services/AmbariMetaInfoTest.java| 51 ++- .../server/api/services/MpackServiceTest.java | 94 -- .../AmbariManagementControllerImplTest.java| 28 +- .../ambari/server/controller/MpackRequestTest.java | 2 +- .../server/controller/MpackResponseTest.java | 3 - .../internal/AbstractResourceProviderTest.java | 2 +- .../internal/ClusterControllerImplTest.java| 2 +- .../internal/MpackResourceProviderTest.java| 35 +- .../apache/ambari/server/orm/dao/MpackDAOTest.java | 20 +- .../server/orm/entities/MpackEntityTest.java | 6 +- .../org/apache/ambari/server/state/MpackTest.java | 4 +- .../org/apache/ambari/server/state/MpacksTest.java | 95 -- .../ambari/msi/AbstractResourceProviderTest.java | 7 +- 29 files changed, 151 insertions(+), 757 deletions(-) diff --git a/ambari-server/src/main/assemblies/server.xml b/ambari-server/src/main/assemblies/server.xml index 464972f..21524ee 100644 --- a/ambari-server/src/main/assemblies/server.xml +++ b/ambari-server/src/main/assemblies/server.xml @@ -316,11 +316,6 @@ 755 - target/classes/cluster-settings.xml - /var/lib/ambari-server/resources - - - 755 target/classes/Ambari-DDL-Postgres-CREATE.sql /var/lib/ambari-server/resources diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AbstractVersionService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AbstractVersionService.java deleted file mode 100644 index 2d81602..000 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AbstractVersionService.java +++ /dev/null @@ -1,362 +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.Path; -import javax.ws.rs.PathParam; - -import org.apache.ambari.server.api.rest.BootStrapResource; -import org.apache.ambari.server.api.rest.HealthCheck; -import org.apache.ambari.server.api.rest.KdcServerReachabilityCheck; -import org.apache.ambari.server.api.util.ApiVersion; - -/** - * Abstract class for single entry point for an API version - */ -public abstract class AbstractVersionService { - - /** - * Handles /actions request. - * - * @return action service - */ - @Path("/actions") - public ActionService getActionService(@PathParam("apiVersion") String apiVersion) { -return new ActionService(ApiVersion.valueOf(apiVersion)); - } - - /** - * Handles /alert_targets request. - * - * @return alert targets service - */ - @Path("/alert_targets") - public AlertTargetService getAlertTargetService(@PathParam("apiVersion") String apiVersion) { -
[ambari] 13/20: [AMBARI-22904] Revised mpack APIs (#252)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch AMBARI-24711 in repository https://gitbox.apache.org/repos/asf/ambari.git commit 10bf7bae99e6c76e8cd8902b597e16ce70573114 Author: mradha25 AuthorDate: Tue Feb 6 11:20:52 2018 -0800 [AMBARI-22904] Revised mpack APIs (#252) * [AMBARI-22904] Revised mpack APIs * [AMBARI-22904] Revised mpack APIs * [AMBARI-22904] Revised mpack APIs * [AMBARI-22904] Revised mpack APIs * [AMBARI-22904] Revised mpack APIs * [AMBARI-22904] Revised mpack APIs * [AMBARI-22904] Revised mpack APIs --- .../ambari/server/api/services/AmbariMetaInfo.java | 37 ++- .../controller/AmbariManagementController.java | 35 ++- .../controller/AmbariManagementControllerImpl.java | 37 ++- .../ambari/server/controller/MpackResponse.java| 26 +- .../controller/internal/MpackResourceProvider.java | 69 +++-- .../apache/ambari/server/mpack/MpackManager.java | 310 ++--- .../apache/ambari/server/stack/StackDirectory.java | 12 +- .../org/apache/ambari/server/state/Module.java | 163 +++ .../ambari/server/state/ModuleComponent.java | 109 .../ambari/server/state/ModuleDependency.java | 88 ++ .../java/org/apache/ambari/server/state/Mpack.java | 246 .../org/apache/ambari/server/state/Packlet.java| 162 --- .../server/state/stack/StackMetainfoXml.java | 23 +- .../AmbariManagementControllerImplTest.java| 41 +-- .../server/controller/MpackResponseTest.java | 34 ++- .../internal/MpackResourceProviderTest.java| 47 ++-- .../org/apache/ambari/server/state/MpackTest.java | 104 --- 17 files changed, 1004 insertions(+), 539 deletions(-) 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 1fa30ef..6180a13 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 @@ -73,6 +73,8 @@ import org.apache.ambari.server.state.Clusters; import org.apache.ambari.server.state.ComponentInfo; import org.apache.ambari.server.state.DependencyInfo; import org.apache.ambari.server.state.ExtensionInfo; +import org.apache.ambari.server.state.Module; +import org.apache.ambari.server.state.Mpack; import org.apache.ambari.server.state.OperatingSystemInfo; import org.apache.ambari.server.state.PropertyInfo; import org.apache.ambari.server.state.RepositoryInfo; @@ -80,7 +82,6 @@ import org.apache.ambari.server.state.Service; import org.apache.ambari.server.state.ServiceInfo; import org.apache.ambari.server.state.StackId; import org.apache.ambari.server.state.StackInfo; -import org.apache.ambari.server.state.Packlet; import org.apache.ambari.server.state.alert.AlertDefinition; import org.apache.ambari.server.state.alert.AlertDefinitionFactory; import org.apache.ambari.server.state.alert.ScriptSource; @@ -672,12 +673,12 @@ public class AmbariMetaInfo { } /** - * Gets the packlet information for given mpack. + * Gets the module information for given mpack. * @param mpackId - * @return List of Packlets. + * @return List of Modules. */ - public ArrayList getPacklets(Long mpackId) { -return mpackManager.getPacklets(mpackId); + public List getModules(Long mpackId) { +return mpackManager.getModules(mpackId); } @@ -1556,13 +1557,35 @@ public class AmbariMetaInfo { * @throws IOException */ public void removeMpack(MpackEntity mpackEntity, StackEntity stackEntity) throws IOException { -if(versionDefinitions != null) { +if (versionDefinitions != null) { versionDefinitions.clear(); } boolean stackDelete = mpackManager.removeMpack(mpackEntity, stackEntity); -if(stackDelete) { +if (stackDelete) { stackManager.removeStack(stackEntity); } } + +/* + * Fetch all mpacks from mpackMap + * @return all mpacks from mpackMap - in memory data structure + */ + public Collection getMpacks() { +if (mpackManager.getMpackMap() != null) { + return mpackManager.getMpackMap().values(); +} +return Collections.emptySet(); + } + + /*** + * Fetch a particular mpack based on mpackid + * @return a single mpack + */ + public Mpack getMpack(Long mpackId) { +if (mpackManager.getMpackMap() != null && mpackManager.getMpackMap().containsKey(mpackId)) { + return mpackManager.getMpackMap().get(mpackId); +} +return null; + } } 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 78f5f94..d94fcbc 100644 ---
[ambari] branch AMBARI-24711 created (now a6536f3)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch AMBARI-24711 in repository https://gitbox.apache.org/repos/asf/ambari.git. at a6536f3 Modifications to choose only necessary changes from Ambari3.0 to Ambari2.8 (mradhakrishnan) This branch includes the following new commits: new d3e45e9 AMBARI-21150: Mpack API and DB Schema changes (mradhakrishnan) new cf2b52a AMBARI-21231: Download and extract mpacks. Add unit tests (mradhakrishnan) new 9106dcc AMBARI-21231: Mpack to Stack Linkage and Parsing mpacks at bootstrap (mradhakrishnan) new f9d7051 AMBARI-21077: Fix build issues after reverting patch for AMBARI-21077 and merging latest trunk (jluniya) new ab5721c AMBARI-21523: DELETE Api for Mpacks (mradhakrishnan) new 32023fb AMBARI-21796 : Clear versionDefinition map during new mpack registration and mpack deletion (mradhakrishnan) new 4ae9222 AMBARI-21849 : Clean up repo_version table during mpack delete, add create validation for mpacks (mradhakrishnan) new 4cfd7a9 AMBARI-21849 : Addendum to fix checkstyle issues and null check (mradhakrishnan) new a82e169 AMBARI-22082: Create missing parent directory when expanding mpack tarball (jluniya) new 3959182 AMBARI-22283 : Add stack name and version to mpack API (mradhakrishnan) new aaa56f2 AMBARI-22283 : Add stack name and version to mpack API (mradhakrishnan) new 562e52b AMBARI-22283 : Add stack name and version to mpack API (mradhakrishnan) new 10bf7ba [AMBARI-22904] Revised mpack APIs (#252) new 29aa64d AMBARI-22971: Remove current_mpack_id to mpack_id in stacks table (jluniya) new 27f19ad [AMBARI-22992] Update error handling during mpack installation (#363) new a77b2f9 AMBARI-22979: Update software registry API to support new mpack schema (jluniya) (#433) new ffe161f [AMBARI-23223] Stack Mpack link broken in stacks api new 9360b63 [AMBARI-23254] Mpack should have both displayName and description new fab74c2 [AMBARI-23223] Review comments new a6536f3 Modifications to choose only necessary changes from Ambari3.0 to Ambari2.8 (mradhakrishnan) The 20 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[ambari] 06/20: AMBARI-21796 : Clear versionDefinition map during new mpack registration and mpack deletion (mradhakrishnan)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch AMBARI-24711 in repository https://gitbox.apache.org/repos/asf/ambari.git commit 32023fb66ab0e0b163bf4c4d4937e0d846d3b2ca Author: Madhuvanthi Radhakrishnan AuthorDate: Wed Aug 23 15:04:52 2017 -0700 AMBARI-21796 : Clear versionDefinition map during new mpack registration and mpack deletion (mradhakrishnan) --- .../ambari/server/api/services/AmbariMetaInfo.java | 6 +- .../org/apache/ambari/server/state/MpackTest.java | 96 ++ 2 files changed, 100 insertions(+), 2 deletions(-) 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 1ea5369..6812bf2 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 @@ -665,6 +665,7 @@ public class AmbariMetaInfo { * @throws ResourceAlreadyExistsException */ public MpackResponse registerMpack(MpackRequest mpackRequest) throws IOException, ResourceAlreadyExistsException { +versionDefinitions.clear(); return mpackManager.registerMpack(mpackRequest); } @@ -1453,7 +1454,8 @@ public class AmbariMetaInfo { */ private synchronized void ensureVersionDefinitions() { if (null != versionDefinitions) { - return; + if(versionDefinitions.size() > 0) +return; } versionDefinitions = new HashMap<>(); @@ -1552,7 +1554,7 @@ public class AmbariMetaInfo { * @throws IOException */ public void removeMpack(MpackEntity mpackEntity, StackEntity stackEntity) throws IOException { - +versionDefinitions.clear(); boolean stackDelete = mpackManager.removeMpack(mpackEntity, stackEntity); if(stackDelete) { diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/MpackTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/MpackTest.java new file mode 100644 index 000..388c256 --- /dev/null +++ b/ambari-server/src/test/java/org/apache/ambari/server/state/MpackTest.java @@ -0,0 +1,96 @@ +/** + * 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.state; + +import java.util.ArrayList; +import java.util.HashMap; + +import org.junit.Assert; +import org.junit.Test; + +import com.google.gson.Gson; + +public class MpackTest { + @Test + public void testMpacks() { +Mpacks mpack = new Mpacks(); +mpack.setName("name"); +mpack.setMpackId((long)100); +mpack.setDescription("desc"); +mpack.setVersion("3.0"); +mpack.setMpacksUri("abc.tar.gz"); +mpack.setRegistryId(new Long(100)); + +Assert.assertEquals("name", mpack.getName()); +Assert.assertEquals(new Long(100), mpack.getMpackId()); +Assert.assertEquals("desc", mpack.getDescription()); +Assert.assertEquals("abc.tar.gz", mpack.getMpacksUri()); +Assert.assertEquals(new Long(100), mpack.getRegistryId()); + + } + + @Test + public void testMpacksUsingGson() { +String mpackJsonContents = "{\n" + +" \"name\" : \"hdf-ambari-mpack\",\n" + +" \"version\": \"3.0.0.0-111\",\n" + +" \"description\" : \"HDF 3.0.0 Ambari Management Pack\",\n" + +" \"prerequisites\": {\n" + +"\"min-ambari-version\" : \"3.0.0.0\"\n" + +" },\n" + +" \"packlets\": [\n" + +"{\n" + +" \"type\" : \"service-packlet\",\n" + +" \"name\" : \"NIFI\",\n" + +" \"version\" : \"1.2.0.0-123\",\n" + +" \"source_location\": \"packlets/NIFI-1.2.0.0-123.tar.gz\"\n"
[ambari] 19/20: [AMBARI-23223] Review comments
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch AMBARI-24711 in repository https://gitbox.apache.org/repos/asf/ambari.git commit fab74c2c5410aea5985e34b24155a9e75d5f80b8 Author: Madhuvanthi Radhakrishnan AuthorDate: Fri Mar 16 12:34:16 2018 -0700 [AMBARI-23223] Review comments --- .../controller/internal/MpackResourceProvider.java | 45 +- 1 file changed, 19 insertions(+), 26 deletions(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java index 110e0a2..ba52639 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java @@ -235,17 +235,9 @@ public class MpackResourceProvider extends AbstractControllerResourceProvider { if (null == responses) { responses = Collections.emptySet(); } - for (MpackResponse response : responses){ -Resource resource = new ResourceImpl(Resource.Type.Mpack); -resource.setProperty(MPACK_RESOURCE_ID, response.getId()); -resource.setProperty(MPACK_ID, response.getMpackId()); -resource.setProperty(MPACK_NAME, response.getMpackName()); -resource.setProperty(MPACK_VERSION, response.getMpackVersion()); -resource.setProperty(MPACK_URI, response.getMpackUri()); -resource.setProperty(MPACK_DESCRIPTION, response.getDescription()); -resource.setProperty(REGISTRY_ID, response.getRegistryId()); -resource.setProperty(MPACK_DISPLAY_NAME, response.getDisplayName()); + for (MpackResponse response : responses) { +Resource resource = setResources(response); results.add(resource); } } else { @@ -257,15 +249,9 @@ public class MpackResourceProvider extends AbstractControllerResourceProvider { mpackId = Long.valueOf((String) objMpackId); } MpackResponse response = getManagementController().getMpack(mpackId); -Resource resource = new ResourceImpl(Resource.Type.Mpack); + if (null != response) { - resource.setProperty(MPACK_RESOURCE_ID, response.getId()); - resource.setProperty(MPACK_ID, response.getMpackId()); - resource.setProperty(MPACK_NAME, response.getMpackName()); - resource.setProperty(MPACK_VERSION, response.getMpackVersion()); - resource.setProperty(MPACK_URI, response.getMpackUri()); - resource.setProperty(MPACK_DESCRIPTION, response.getDescription()); - resource.setProperty(REGISTRY_ID, response.getRegistryId()); + Resource resource = setResources(response); List modules = getManagementController().getModules(response.getId()); resource.setProperty(MODULES, modules); results.add(resource); @@ -278,15 +264,9 @@ public class MpackResourceProvider extends AbstractControllerResourceProvider { StackEntity stackEntity = stackDAO.find(stackName, stackVersion); mpackId = stackEntity.getMpackId(); MpackResponse response = getManagementController().getMpack(mpackId); -Resource resource = new ResourceImpl(Resource.Type.Mpack); + if (null != response) { - resource.setProperty(MPACK_RESOURCE_ID, response.getId()); - resource.setProperty(MPACK_ID, response.getMpackId()); - resource.setProperty(MPACK_NAME, response.getMpackName()); - resource.setProperty(MPACK_VERSION, response.getMpackVersion()); - resource.setProperty(MPACK_URI, response.getMpackUri()); - resource.setProperty(MPACK_DESCRIPTION, response.getDescription()); - resource.setProperty(REGISTRY_ID, response.getRegistryId()); + Resource resource = setResources(response); resource.setProperty(STACK_NAME_PROPERTY_ID, stackName); resource.setProperty(STACK_VERSION_PROPERTY_ID, stackVersion); results.add(resource); @@ -324,6 +304,19 @@ public class MpackResourceProvider extends AbstractControllerResourceProvider { return results; } + private Resource setResources(MpackResponse response) { +Resource resource = new ResourceImpl(Resource.Type.Mpack); +resource.setProperty(MPACK_RESOURCE_ID, response.getId()); +resource.setProperty(MPACK_ID, response.getMpackId()); +resource.setProperty(MPACK_NAME, response.getMpackName()); +resource.setProperty(MPACK_VERSION, response.getMpackVersion()); +resource.setProperty(MPACK_URI, response.getMpackUri()); +resource.setProperty(MPACK_DESCRIPTION, response.getDescription()); +resource.setProperty(REGISTRY_ID, response.getRegistryId()); +resource.setProperty(MPACK_DISPLAY_NAME, response.getDisplayName()); +return resource
[ambari] 03/20: AMBARI-21231: Mpack to Stack Linkage and Parsing mpacks at bootstrap (mradhakrishnan)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch AMBARI-24711 in repository https://gitbox.apache.org/repos/asf/ambari.git commit 9106dccb0cc93497253ba57a215c00238dc300ff Author: Madhuvanthi Radhakrishnan AuthorDate: Fri Jul 7 09:49:10 2017 -0700 AMBARI-21231: Mpack to Stack Linkage and Parsing mpacks at bootstrap (mradhakrishnan) --- ambari-server/src/main/assemblies/server.xml | 8 + .../api/resources/MpackResourceDefinition.java | 52 +++ .../resources/StackVersionResourceDefinition.java | 8 +- .../ambari/server/api/services/AmbariMetaInfo.java | 5 +- .../controller/AmbariManagementControllerImpl.java | 45 ++- .../ambari/server/controller/MpackResponse.java| 10 + .../controller/internal/MpackResourceProvider.java | 47 ++- .../apache/ambari/server/mpack/MpackManager.java | 179 +++--- .../ambari/server/mpack/MpackManagerFactory.java | 3 +- .../ambari/server/orm/entities/StackEntity.java| 15 + .../apache/ambari/server/stack/StackManager.java | 5 +- .../org/apache/ambari/server/state/Mpacks.java | 382 +++-- .../org/apache/ambari/server/state/Packlet.java| 22 ++ .../src/main/resources/Ambari-DDL-Derby-CREATE.sql | 36 +- .../src/main/resources/Ambari-DDL-MySQL-CREATE.sql | 35 +- .../main/resources/Ambari-DDL-Oracle-CREATE.sql| 36 +- .../main/resources/Ambari-DDL-Postgres-CREATE.sql | 36 +- .../resources/Ambari-DDL-SQLAnywhere-CREATE.sql| 36 +- .../main/resources/Ambari-DDL-SQLServer-CREATE.sql | 36 +- .../src/main/resources/mpacks-v2/README.txt| 1 + 20 files changed, 658 insertions(+), 339 deletions(-) diff --git a/ambari-server/src/main/assemblies/server.xml b/ambari-server/src/main/assemblies/server.xml index 67858e7..21524ee 100644 --- a/ambari-server/src/main/assemblies/server.xml +++ b/ambari-server/src/main/assemblies/server.xml @@ -203,6 +203,14 @@ + 700 + src/main/resources/mpacks-v2 + /var/lib/ambari-server/resources/mpacks-v2 + +*/** + + + 755 src/main/python/ambari_server /usr/lib/ambari-server/lib/ambari_server diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/MpackResourceDefinition.java b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/MpackResourceDefinition.java index e33cd31..26972d8 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/MpackResourceDefinition.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/MpackResourceDefinition.java @@ -17,11 +17,18 @@ */ package org.apache.ambari.server.api.resources; +import org.apache.ambari.server.api.services.Request; +import org.apache.ambari.server.api.util.TreeNode; +import org.apache.ambari.server.controller.internal.ResourceImpl; import org.apache.ambari.server.controller.spi.Resource; import org.apache.ambari.server.controller.spi.Resource.Type; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; + /** * Resource Definition for Mpack Resource types. */ @@ -47,4 +54,49 @@ public class MpackResourceDefinition extends BaseResourceDefinition { public String getSingularName() { return "mpack"; } + + @Override + public List getPostProcessors() { +List listProcessors = new ArrayList<>(); +listProcessors.add(new MpackHrefProcessor()); +listProcessors.add(new MpackPostProcessor()); +return listProcessors; + } + + /** + * Post Processing the mpack href when the call comes from stack endpoint to ensure that the + * href is a backreference to the mpacks end point + */ + private class MpackHrefProcessor extends BaseHrefPostProcessor { +@Override +public void process(Request request, TreeNode resultNode, String href) { + if (href.contains("/stacks/")) { +ResourceImpl mpack = (ResourceImpl) resultNode.getObject(); +Map> mapInfo = mpack.getPropertiesMap(); +Map mpackInfo = mapInfo.get("MpackInfo"); + +int idx = href.indexOf("stacks/"); +Long mpackId = (Long)mpackInfo.get("mpack_id"); +href = href.substring(0, idx) + "mpacks/" + mpackId; +resultNode.setProperty("href", href); + } else { +super.process(request, resultNode, href); + } +} + } + + /*** + * Post processing to change the name of the result node to current_mpack + */ + private class MpackPostProcessor implements PostProcessor { +@Override +public void process(Request request, TreeNode resultNode, String href) { + if (href.contains("/stacks/")) { +resultNode.setName("current_mpack"); + + } +} + } + + } diff --git a/ambari-server/src/main/java/org/apache/ambari/
[ambari] 18/20: [AMBARI-23254] Mpack should have both displayName and description
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch AMBARI-24711 in repository https://gitbox.apache.org/repos/asf/ambari.git commit 9360b63c8f12a969f1131268c225d5890bee36cf Author: Madhuvanthi Radhakrishnan AuthorDate: Thu Mar 15 14:40:47 2018 -0700 [AMBARI-23254] Mpack should have both displayName and description --- .../ambari/server/controller/MpackResponse.java| 10 +++ .../controller/internal/MpackResourceProvider.java | 23 ++ .../java/org/apache/ambari/server/state/Mpack.java | 96 +- 3 files changed, 108 insertions(+), 21 deletions(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/MpackResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/MpackResponse.java index bc1e47d..70ddabe 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/MpackResponse.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/MpackResponse.java @@ -36,6 +36,7 @@ public class MpackResponse { private Long registryId; private String stackId; private String description; + private String displayName; public MpackResponse(Mpack mpack) { this.id = mpack.getResourceId(); @@ -45,6 +46,7 @@ public class MpackResponse { this.mpackUri = mpack.getMpackUri(); this.registryId = mpack.getRegistryId(); this.description = mpack.getDescription(); +this.displayName = mpack.getDisplayName(); } public Long getId() { @@ -111,6 +113,14 @@ public class MpackResponse { this.stackId = stackId; } + public String getDisplayName() { +return displayName; + } + + public void setDisplayName(String displayName) { +this.displayName = displayName; + } + @Override public int hashCode() { int result = 1; diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java index 57e987d..110e0a2 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java @@ -74,6 +74,7 @@ public class MpackResourceProvider extends AbstractControllerResourceProvider { public static final String MPACK_NAME = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + "mpack_name"; public static final String MPACK_VERSION = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + "mpack_version"; public static final String MPACK_DESCRIPTION = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + "mpack_description"; + public static final String MPACK_DISPLAY_NAME = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + "mpack_display_name"; public static final String MPACK_URI = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + "mpack_uri"; public static final String MODULES = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + "modules"; public static final String STACK_NAME_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + "stack_name"; @@ -114,6 +115,7 @@ public class MpackResourceProvider extends AbstractControllerResourceProvider { PROPERTY_IDS.add(MODULES); PROPERTY_IDS.add(STACK_NAME_PROPERTY_ID); PROPERTY_IDS.add(STACK_VERSION_PROPERTY_ID); +PROPERTY_IDS.add(MPACK_DISPLAY_NAME); // keys KEY_PROPERTY_IDS.put(Resource.Type.Mpack, MPACK_RESOURCE_ID); @@ -153,6 +155,7 @@ public class MpackResourceProvider extends AbstractControllerResourceProvider { resource.setProperty(MPACK_URI, response.getMpackUri()); resource.setProperty(MPACK_DESCRIPTION, response.getDescription()); resource.setProperty(REGISTRY_ID, response.getRegistryId()); +resource.setProperty(MPACK_DISPLAY_NAME, response.getDisplayName()); associatedResources.add(resource); return getRequestStatus(null, associatedResources); } @@ -241,6 +244,8 @@ public class MpackResourceProvider extends AbstractControllerResourceProvider { resource.setProperty(MPACK_URI, response.getMpackUri()); resource.setProperty(MPACK_DESCRIPTION, response.getDescription()); resource.setProperty(REGISTRY_ID, response.getRegistryId()); +resource.setProperty(MPACK_DISPLAY_NAME, response.getDisplayName()); + results.add(resource); } } else { @@ -293,6 +298,24 @@ public class MpackResourceProvider extends AbstractControllerResourceProvider { "Either the management pack ID or the stack name and version are required when searching"); } + MpackResponse response = getManagementController().getMpack(mpackId); + Resource resource = new ResourceImpl(Resource.Type.Mpack); + if (nul
[ambari] 08/20: AMBARI-21849 : Addendum to fix checkstyle issues and null check (mradhakrishnan)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch AMBARI-24711 in repository https://gitbox.apache.org/repos/asf/ambari.git commit 4cfd7a9815afea337fd757bd7d12b2d3e9eb1164 Author: Madhuvanthi Radhakrishnan AuthorDate: Wed Aug 30 14:52:54 2017 -0700 AMBARI-21849 : Addendum to fix checkstyle issues and null check (mradhakrishnan) --- .../java/org/apache/ambari/server/api/services/AmbariMetaInfo.java| 4 +++- .../ambari/server/controller/internal/MpackResourceProvider.java | 4 +++- .../ambari/server/controller/internal/MpackResourceProviderTest.java | 3 --- 3 files changed, 6 insertions(+), 5 deletions(-) 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 6ae0e1c..1fa30ef 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 @@ -665,7 +665,9 @@ public class AmbariMetaInfo { * @throws ResourceAlreadyExistsException */ public MpackResponse registerMpack(MpackRequest mpackRequest) throws IOException, ResourceAlreadyExistsException { -versionDefinitions.clear(); +if (versionDefinitions != null) { + versionDefinitions.clear(); +} return mpackManager.registerMpack(mpackRequest); } diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java index c4833d1..70b6d74 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/MpackResourceProvider.java @@ -56,11 +56,13 @@ import org.apache.ambari.server.orm.dao.StackDAO; import org.apache.ambari.server.orm.entities.MpackEntity; import org.apache.ambari.server.orm.entities.StackEntity; import org.apache.ambari.server.state.Packlet; - import org.apache.ambari.server.state.StackId; import org.apache.commons.io.IOUtils; import org.apache.commons.lang.Validate; +import com.google.inject.Inject; + + /** * ResourceProvider for Mpack instances */ diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/MpackResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/MpackResourceProviderTest.java index 0e38b08..944e40d 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/MpackResourceProviderTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/MpackResourceProviderTest.java @@ -17,13 +17,10 @@ */ package org.apache.ambari.server.controller.internal; -import org.apache.commons.io.IOUtils; import static org.easymock.EasyMock.createMock; import static org.easymock.EasyMock.replay; import static org.easymock.EasyMock.verify; -import java.net.URI; -import java.net.URL; import java.nio.file.Paths; import java.util.ArrayList; import java.util.HashMap;
[ambari] branch trunk updated: [AMBARI-22817] Update backend code to handle new versioning schema. (#155)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/trunk by this push: new 611337c [AMBARI-22817] Update backend code to handle new versioning schema. (#155) 611337c is described below commit 611337c928c99222133effb3ad8dc708cdfb8da3 Author: vbrodetskyi AuthorDate: Thu Jan 25 03:04:45 2018 +0200 [AMBARI-22817] Update backend code to handle new versioning schema. (#155) * AMBARI-22817. Update backend code to handle new versioning schema.(vbrodetskyi) * AMBARI-22817. Update backend code to handle new versioning schema.(vbrodetskyi) * AMBARI-22817. Update backend code to handle new versioning schema.(vbrodetskyi) * AMBARI-22817. Update backend code to handle new versioning schema.(vbrodetskyi) * AMBARI-22817. Update backend code to handle new versioning schema.(vbrodetskyi) * AMBARI-22817. Update backend code to handle new versioning schema.(vbrodetskyi) --- .../libraries/functions/module_version.py | 158 .../libraries/functions/mpack_version.py | 207 + .../apache/ambari/server/utils/ModuleVersion.java | 162 .../apache/ambari/server/utils/MpackVersion.java | 197 .../ambari/server/utils/TestVersionUtils.java | 142 ++ ambari-server/src/test/python/TestVersion.py | 100 +- 6 files changed, 964 insertions(+), 2 deletions(-) diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/module_version.py b/ambari-common/src/main/python/resource_management/libraries/functions/module_version.py new file mode 100644 index 000..6ec4ba3 --- /dev/null +++ b/ambari-common/src/main/python/resource_management/libraries/functions/module_version.py @@ -0,0 +1,158 @@ +""" + 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 re + +""" + This class should be used to compare module(service) versions. + Base method which should be used is parse(..), This method will validate and parse + version which you will pass as parameter, and return object of current class with + parsed version. Same thing you should do with another version, with which you are + planning to compare previous one. After that, use "==", "<", ">" to get final result. +""" +class ModuleVersion(object): + __module_version_pattern = "(?P[0-9]+).(?P[0-9]+).(?P[0-9]+).(?P[0-9]+)(-h(?P[0-9]+))*-b(?P[0-9]+)" + __module_version_regex = re.compile(__module_version_pattern) + + def __init__(self, apache_major, apache_minor, internal_minor, internal_maint, hotfix, build): +""" +:type apache_major int +:type apache_minor int +:type internal_maint int +:type internal_minor int +:type hotfix int +:type build int +""" +self.__apache_major = int(apache_major) +self.__apache_minor = int(apache_minor) +self.__internal_maint = int(internal_maint) +self.__internal_minor = int(internal_minor) +self.__hotfix = int(hotfix) if hotfix else 0 # hotfix is optional group +self.__build = int(build) + + def __repr__(self): +return "{0}.{1}.{2}.{3}-h{4}-b{5}".format(*self.to_list()) + + def to_list(self): +""" +Return version elements as list + +:rtype list +""" +return [ + self.__apache_major, + self.__apache_minor, + self.__internal_minor, + self.__internal_maint, + self.__hotfix, + self.__build +] + + def __cmp__(self, other): +""" +:type other ModuleVersion + +:raise TypeError +""" +if other and not isinstance(other, self.__class__): + raise TypeError("Operand type is different from {0}".format(self.__class__.__name__)) + +r = 0 +x = self.to_list() +y = other.to_list() + +for i in range(0, len(x)): + r = x[i] - y[i] +
[ambari] branch branch-feature-AMBARI-14714-dep updated: Add RESOLVE_FAILED state as a valid desired state
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714-dep in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-feature-AMBARI-14714-dep by this push: new c28908f Add RESOLVE_FAILED state as a valid desired state c28908f is described below commit c28908f77a032b1bdcebd6d71fc3dac9d98efd32 Author: Madhuvanthi Radhakrishnan AuthorDate: Fri May 25 14:50:58 2018 -0700 Add RESOLVE_FAILED state as a valid desired state --- .../src/main/java/org/apache/ambari/server/state/State.java | 6 ++ 1 file changed, 6 insertions(+) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/State.java b/ambari-server/src/main/java/org/apache/ambari/server/state/State.java index a1c3947..2fedbab 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/State.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/State.java @@ -96,6 +96,7 @@ public enum State { case UNINSTALLED: case DISABLED: case RESOLVED: + case RESOLVE_FAILED: return true; default: return false; @@ -241,6 +242,11 @@ public enum State { return true; } break; + case RESOLVE_FAILED: +if (startState == State.INIT) { + return true; + } + break; } return false; } -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714 updated (29915a4 -> 2d17eb4)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git. from 29915a4 AMBARI-23940: Update ServiceGroup POST and GET APIs to be consistent (jluniya) (#1363) add de898db [AMBARI-23746] ClusterStatusReport creates a map of host_id to component_name, needed change for resolving duplicate key add 4253fce [AMBARI-23746] Use single map with hostcomponent id as the unique key new 2d17eb4 ClusterStatusReport creates a map of host_id to component_name, needed change for resolving duplicate key The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../ambari/server/state/cluster/ClusterImpl.java | 29 +++--- 1 file changed, 15 insertions(+), 14 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] 01/01: ClusterStatusReport creates a map of host_id to component_name, needed change for resolving duplicate key
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git commit 2d17eb4c4f704cc3f239392404f65e245bf17880 Merge: 29915a4 4253fce Author: mradha25 AuthorDate: Thu May 24 14:20:48 2018 -0700 ClusterStatusReport creates a map of host_id to component_name, needed change for resolving duplicate key .../ambari/server/state/cluster/ClusterImpl.java | 29 +++--- 1 file changed, 15 insertions(+), 14 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714-dep updated: [AMBARI-22707] Implement resolving dependencies for each service
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714-dep in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-feature-AMBARI-14714-dep by this push: new 9c025b9 [AMBARI-22707] Implement resolving dependencies for each service 9c025b9 is described below commit 9c025b938015080f724a2c4b6651845fa9037cb1 Author: Madhuvanthi Radhakrishnan AuthorDate: Thu May 24 12:50:27 2018 -0700 [AMBARI-22707] Implement resolving dependencies for each service --- .../ambari/server/api/services/ServiceKey.java | 21 +++-- .../controller/AmbariManagementController.java | 8 + .../controller/AmbariManagementControllerImpl.java | 26 ++-- .../controller/ServiceDependencyRequest.java | 16 +- .../controller/ServiceDependencyResponse.java | 20 ++-- .../ServiceDependencyResourceProvider.java | 16 -- .../internal/ServiceResourceProvider.java | 36 -- .../orm/entities/ServiceDependencyEntity.java | 16 ++ .../org/apache/ambari/server/state/Cluster.java| 2 +- .../org/apache/ambari/server/state/Service.java| 2 +- .../apache/ambari/server/state/ServiceImpl.java| 6 ++-- .../java/org/apache/ambari/server/state/State.java | 35 +++-- .../ambari/server/state/cluster/ClusterImpl.java | 5 +-- .../src/main/resources/Ambari-DDL-Derby-CREATE.sql | 1 + .../src/main/resources/Ambari-DDL-MySQL-CREATE.sql | 1 + .../main/resources/Ambari-DDL-Oracle-CREATE.sql| 1 + .../main/resources/Ambari-DDL-Postgres-CREATE.sql | 2 ++ .../resources/Ambari-DDL-SQLAnywhere-CREATE.sql| 1 + .../main/resources/Ambari-DDL-SQLServer-CREATE.sql | 1 + .../AmbariCustomCommandExecutionHelperTest.java| 3 +- .../controller/AmbariManagementControllerTest.java | 3 +- .../ServiceDependencyResourceProviderTest.java | 17 +- 22 files changed, 209 insertions(+), 30 deletions(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceKey.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceKey.java index 32b87f5..635585c 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceKey.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceKey.java @@ -17,6 +17,8 @@ */ package org.apache.ambari.server.api.services; +import org.apache.ambari.server.state.ServiceDependencyType; + public class ServiceKey { private Long serviceId; @@ -26,12 +28,13 @@ public class ServiceKey { private String serviceName; private String serviceGroupName; private String clusterName; + private ServiceDependencyType dependencyType; public ServiceKey() { } public ServiceKey(Long clusterId, String clusterName, Long serviceGroupId, String serviceGroupName, Long serviceId, String serviceName, -Long dependencyId) { +Long dependencyId, ServiceDependencyType dependencyType) { this.clusterId = clusterId; this.clusterName = clusterName; this.serviceGroupId = serviceGroupId; @@ -39,6 +42,8 @@ public class ServiceKey { this.serviceId = serviceId; this.serviceName = serviceName; this.dependencyId = dependencyId; +this.dependencyType = dependencyType; + } public Long getClusterId() { @@ -97,15 +102,25 @@ public class ServiceKey { this.dependencyId = dependencyId; } + public ServiceDependencyType getDependencyType() { +return dependencyType; + } + + public void setDependencyType(ServiceDependencyType dependencyType) { +this.dependencyType = dependencyType; + } + @Override public boolean equals(Object o) { if (this == o) return true; -if (!(o instanceof ServiceKey)) return false; +if (o == null || getClass() != o.getClass()) return false; ServiceKey that = (ServiceKey) o; if (clusterId != null ? !clusterId.equals(that.clusterId) : that.clusterId != null) return false; if (clusterName != null ? !clusterName.equals(that.clusterName) : that.clusterName != null) return false; +if (dependencyId != null ? !dependencyId.equals(that.dependencyId) : that.dependencyId != null) return false; +if (dependencyType != that.dependencyType) return false; if (serviceGroupId != null ? !serviceGroupId.equals(that.serviceGroupId) : that.serviceGroupId != null) return false; if (serviceGroupName != null ? !serviceGroupName.equals(that.serviceGroupName) : that.serviceGroupName != null) @@ -121,9 +136,11 @@ public class ServiceKey { int result = serviceId != null ? serviceId.hashCode() : 0; result = 31 * result + (serviceGroupId != null ? serviceGroupId.hashCode() : 0); result = 31 * result + (clusterId != null ? clusterId.hashCode() : 0
[ambari] branch branch-feature-AMBARI-14714-dep created (now 2eab7cb)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch branch-feature-AMBARI-14714-dep in repository https://gitbox.apache.org/repos/asf/ambari.git. at 2eab7cb Config requests for multiple mpacks. No new revisions were added by this update. -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714 updated (b8fef94 -> 1b269e5)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git. from b8fef94 Fix constant declaration. add 320da2b [AMBARI-23746] Use serviceGroupName to fetch services and components new 1b269e5 Merge pull request #1308 from mradha25/AMBARI-23746 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../ambari/server/controller/AmbariManagementControllerImpl.java | 8 .../server/controller/internal/HostComponentResourceProvider.java | 2 +- .../ambari/server/state/svccomphost/ServiceComponentHostImpl.java | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] 01/01: Merge pull request #1308 from mradha25/AMBARI-23746
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git commit 1b269e5fddbc6cccf47c301a1725a8df98cd33af Merge: b8fef94 320da2b Author: mradha25 AuthorDate: Thu May 17 13:14:29 2018 -0700 Merge pull request #1308 from mradha25/AMBARI-23746 [AMBARI-23746] Use serviceGroupName to fetch services and components .../ambari/server/controller/AmbariManagementControllerImpl.java | 8 .../server/controller/internal/HostComponentResourceProvider.java | 2 +- .../ambari/server/state/svccomphost/ServiceComponentHostImpl.java | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714 updated (12fb707 -> d644932)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git. from 12fb707 Removed unused code and deprecated API calls. add 7a4fb42 [AMBARI-23746] Use stackSettings instead of clusterLevelParams. Fetch services by serviceGroupName where applicable add 8ef4892 [AMBARI-23746] Replace clusterLevelParams with stackSettings for stack_name extraction new d644932 Use stackSettings instead of clusterLevelParams. Fetch services by serviceGroupName where applicable The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../libraries/execution_command/execution_command.py | 2 +- .../python/resource_management/libraries/functions/conf_select.py | 4 ++-- .../resource_management/libraries/functions/stack_features.py | 2 +- .../resource_management/libraries/functions/stack_select.py | 4 ++-- .../python/resource_management/libraries/functions/stack_tools.py | 2 +- .../main/python/resource_management/libraries/script/script.py| 4 ++-- .../ambari/server/controller/AmbariManagementControllerImpl.java | 5 +++-- .../server/controller/internal/ServiceResourceProvider.java | 8 +++- 8 files changed, 19 insertions(+), 12 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] 01/01: Use stackSettings instead of clusterLevelParams. Fetch services by serviceGroupName where applicable
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git commit d6449329d28f13975b945b45fa438c7bf4bb9809 Merge: 12fb707 8ef4892 Author: mradha25 AuthorDate: Mon May 14 14:29:27 2018 -0700 Use stackSettings instead of clusterLevelParams. Fetch services by serviceGroupName where applicable .../libraries/execution_command/execution_command.py | 2 +- .../python/resource_management/libraries/functions/conf_select.py | 4 ++-- .../resource_management/libraries/functions/stack_features.py | 2 +- .../resource_management/libraries/functions/stack_select.py | 4 ++-- .../python/resource_management/libraries/functions/stack_tools.py | 2 +- .../main/python/resource_management/libraries/script/script.py| 4 ++-- .../ambari/server/controller/AmbariManagementControllerImpl.java | 5 +++-- .../server/controller/internal/ServiceResourceProvider.java | 8 +++- 8 files changed, 19 insertions(+), 12 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] 01/01: Merge pull request #1223 from scottduan/AMBARI-23797-branch-feature-AMBARI-14714
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git commit 731abfc9a9530c4324a287f5dc0c2372899e798c Merge: d5b1856 fc49e9d Author: mradha25 AuthorDate: Thu May 10 10:23:52 2018 -0700 Merge pull request #1223 from scottduan/AMBARI-23797-branch-feature-AMBARI-14714 AMBARI-23797: Handle null values for configurations in the Execution Command API .../libraries/execution_command/execution_command.py| 2 ++ .../libraries/execution_command/module_configs.py | 5 - ambari-common/src/test/python/TestExecutionCommand.py | 13 - ambari-common/src/test/python/command.json | 6 -- 4 files changed, 22 insertions(+), 4 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714 updated (d5b1856 -> 731abfc)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git. from d5b1856 AMBARI-23746. Fix typo in map lookup (#1208) add fc49e9d MBARI-23797: Handle null values for configurations in the Execution Command API new 731abfc Merge pull request #1223 from scottduan/AMBARI-23797-branch-feature-AMBARI-14714 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../libraries/execution_command/execution_command.py| 2 ++ .../libraries/execution_command/module_configs.py | 5 - ambari-common/src/test/python/TestExecutionCommand.py | 13 - ambari-common/src/test/python/command.json | 6 -- 4 files changed, 22 insertions(+), 4 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] 01/01: Ambari 23746 : During updateServices INIT-INSTALLED, we must fetch the services by servicegroupname instead of all clusterservices since we send the packages to be installed per mpack
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git commit c715e17315e18cde47c2c743518df4752dbf9216 Merge: 9614b25 c262a01 Author: mradha25 AuthorDate: Mon May 7 15:02:17 2018 -0700 Ambari 23746 : During updateServices INIT-INSTALLED, we must fetch the services by servicegroupname instead of all clusterservices since we send the packages to be installed per mpack .../server/controller/internal/ServiceResourceProvider.java | 5 +++-- .../main/java/org/apache/ambari/server/state/Cluster.java| 7 +++ .../org/apache/ambari/server/state/cluster/ClusterImpl.java | 12 3 files changed, 22 insertions(+), 2 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714 updated (9614b25 -> c715e17)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git. from 9614b25 AMBARI-22875. Remove temporary check (#1197) add 97db52d Merge remote-tracking branch 'upstream/branch-feature-AMBARI-14714' into AMBARI-23746 add b2e5123 [AMBARI-23746] During updateServices INIT-INSTALLED, we must fetch the services by servicegroupname instead of all clusterservices since we send the packages to be installed per mpack add 6b15e77 Merge remote-tracking branch 'upstream/branch-feature-AMBARI-14714' into AMBARI-23746 add c262a01 [AMBARI-23746] Review comments. Use entrySet for iterating over hashmap new c715e17 Ambari 23746 : During updateServices INIT-INSTALLED, we must fetch the services by servicegroupname instead of all clusterservices since we send the packages to be installed per mpack The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../server/controller/internal/ServiceResourceProvider.java | 5 +++-- .../main/java/org/apache/ambari/server/state/Cluster.java| 7 +++ .../org/apache/ambari/server/state/cluster/ClusterImpl.java | 12 3 files changed, 22 insertions(+), 2 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714 updated: Fix UT compilation issue due to surrogate key changes (mradhakrishnan)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-feature-AMBARI-14714 by this push: new 8618c4c Fix UT compilation issue due to surrogate key changes (mradhakrishnan) 8618c4c is described below commit 8618c4c56a772b47870688eb2590bbc0089a5991 Author: Madhuvanthi Radhakrishnan AuthorDate: Thu May 3 13:25:23 2018 -0700 Fix UT compilation issue due to surrogate key changes (mradhakrishnan) --- .../ambari/funtest/server/tests/DeleteServiceTest.java | 18 -- 1 file changed, 18 deletions(-) diff --git a/ambari-funtest/src/test/java/org/apache/ambari/funtest/server/tests/DeleteServiceTest.java b/ambari-funtest/src/test/java/org/apache/ambari/funtest/server/tests/DeleteServiceTest.java index 6ebf2e2..fa429f2 100644 --- a/ambari-funtest/src/test/java/org/apache/ambari/funtest/server/tests/DeleteServiceTest.java +++ b/ambari-funtest/src/test/java/org/apache/ambari/funtest/server/tests/DeleteServiceTest.java @@ -38,7 +38,6 @@ import org.apache.ambari.server.orm.entities.ServiceDesiredStateEntity; import org.apache.ambari.server.orm.entities.ServiceComponentDesiredStateEntity; import org.apache.ambari.server.orm.entities.HostComponentStateEntity; import org.apache.ambari.server.orm.entities.HostComponentDesiredStateEntity; -import org.apache.ambari.server.orm.entities.ServiceDesiredStateEntityPK; import org.apache.ambari.server.state.State; import org.apache.http.HttpStatus; @@ -165,23 +164,6 @@ public class DeleteServiceTest extends ServerTestBase { assertEquals(webResponse.getStatusCode(), HttpStatus.SC_NOT_FOUND); /** - * ClusterServiceDAO - the service entry should have been removed. - */ -//TODO : Requires logic change -clusterServiceEntity = clusterServiceDAO.findById(1L,1L,1L); -assertTrue(clusterServiceEntity == null); - -/** - * ServiceDesiredStateDAO - the service entry should have been removed. - */ -ServiceDesiredStateEntityPK serviceDesiredStateEntityPK = injector.getInstance(ServiceDesiredStateEntityPK.class); -serviceDesiredStateEntityPK.setClusterId(clusterId); -//TODO : Requires logic change -serviceDesiredStateEntityPK.setServiceId(1L); -serviceDesiredStateEntity = serviceDesiredStateDAO.findByPK(serviceDesiredStateEntityPK); -assertTrue(serviceDesiredStateEntity == null); - -/** * ServiceComponentDesiredStateDAO */ ServiceComponentDesiredStateEntity serviceComponentDesiredStateEntity = serviceComponentDesiredStateDAO.findById(0L); -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] 01/01: Creation of service, servicecomponents and host components during multimpack deployment has issues
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git commit e1848ec556b1411fa7b8c1354edc113bb4972940 Merge: f32f21f a0c9de3 Author: mradha25 AuthorDate: Thu May 3 11:09:30 2018 -0700 Creation of service, servicecomponents and host components during multimpack deployment has issues .../controller/AmbariManagementControllerImpl.java | 17 ++--- .../controller/internal/ComponentResourceProvider.java | 6 +++--- .../controller/internal/ServiceResourceProvider.java| 2 +- .../ambari/server/state/ServiceComponentImpl.java | 12 +++- .../apache/ambari/server/state/cluster/ClusterImpl.java | 16 ++-- 5 files changed, 35 insertions(+), 18 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714 updated (f32f21f -> e1848ec)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git. from f32f21f Merge pull request #1145 from apache/branch-feature-AMBARI-14714-configs add 8072f35 [AMBARI-23746] Creation of service, servicecomponents and host components during multimpack deployment has issues add 4f4d833 [AMBARI-23746] Use equals instead of equalsIgnoreCase for SG comparison add a0c9de3 [AMBARI-23746] Review comments. Pass ServiceGroupaName when fetching service from cluster map new e1848ec Creation of service, servicecomponents and host components during multimpack deployment has issues The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../controller/AmbariManagementControllerImpl.java | 17 ++--- .../controller/internal/ComponentResourceProvider.java | 6 +++--- .../controller/internal/ServiceResourceProvider.java| 2 +- .../ambari/server/state/ServiceComponentImpl.java | 12 +++- .../apache/ambari/server/state/cluster/ClusterImpl.java | 16 ++-- 5 files changed, 35 insertions(+), 18 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] 01/01: Merge pull request #1145 from apache/branch-feature-AMBARI-14714-configs
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git commit f32f21f4648fe26d45d22bfd379c01c8831919ad Merge: b6d82fe 9308a86 Author: mradha25 AuthorDate: Thu May 3 10:25:20 2018 -0700 Merge pull request #1145 from apache/branch-feature-AMBARI-14714-configs Branch feature ambari 14714 configs .../controller/AmbariManagementControllerImpl.java | 3 + ambari-web/app/controllers/wizard.js | 2 +- .../app/controllers/wizard/step8_controller.js | 102 - .../app/controllers/wizard/step9_controller.js | 4 +- .../app/mixins/common/configs/configs_saver.js | 3 +- ambari-web/app/utils/ajax/ajax.js | 9 +- ambari-web/test/controllers/wizard/step8_test.js | 35 ++ .../mixins/common/configs/configs_saver_test.js| 124 +++-- 8 files changed, 139 insertions(+), 143 deletions(-) diff --cc ambari-web/app/controllers/wizard/step9_controller.js index 55397bb,1785a94..6e87ad6 --- a/ambari-web/app/controllers/wizard/step9_controller.js +++ b/ambari-web/app/controllers/wizard/step9_controller.js @@@ -522,10 -522,10 +522,10 @@@ App.WizardStep9Controller = App.WizardS serviceGroups = this.get('content.serviceGroups'); promises = serviceGroups.map(sg => { - data.serviceGroup = sg; + data.serviceGroupName = sg; return App.ajax.send({ -name: 'common.services.update', +name: 'common.services.update', //TODO: This should change to use common.services.update.all when that is implemented on the back end. sender: this, data: data, success: 'launchStartServicesSuccessCallback', @@@ -544,10 -544,10 +544,10 @@@ serviceGroups = this.get('content.serviceGroups'); promises = serviceGroups.map(sg => { - data.serviceGroup = sg; + data.serviceGroupName = sg; return App.ajax.send({ -name: 'common.services.update', +name: 'common.services.update', //TODO: This should change to use common.services.update.all when that is implemented on the back end. sender: this, data: data, success: 'launchStartServicesSuccessCallback', diff --cc ambari-web/app/utils/ajax/ajax.js index de4c16f,fb54510..8a9ed87 --- a/ambari-web/app/utils/ajax/ajax.js +++ b/ambari-web/app/utils/ajax/ajax.js @@@ -56,29 -56,8 +56,29 @@@ var urls = } }, + 'common.services.update.all' : { +'real': '/clusters/{clusterName}/servicegroups?{urlParams}', +'format': function (data) { + return { +type: 'PUT', +data: JSON.stringify({ + RequestInfo: { +"context": data.context, +"operation_level": { + "level": "CLUSTER", + "cluster_name" : data.clusterName +} + }, + Body: { +ServiceInfo: data.ServiceInfo + } +}) + }; +} + }, + 'common.services.update' : { - 'real': '/clusters/{clusterName}/servicegroups/{serviceGroup}/services?{urlParams}', + 'real': '/clusters/{clusterName}/servicegroups/{serviceGroupName}/services?{urlParams}', 'mock': '/data/wizard/deploy/poll_1.json', 'format': function (data) { return { -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714 updated (b6d82fe -> f32f21f)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git. from b6d82fe [AMBARI-23726] Mpack Installation Response is not Updating State - missed commit add fa5469a Revert "Revert "Merge branch-feature-AMBARI-14714-configs to branch-feature-AMBARI-14714"" add 66b8b06 Merge remote-tracking branch 'upstream/branch-feature-AMBARI-14714' into branch-feature-AMBARI-14714-configs add 0f4f52e [AMBARI-23644] Handle back end issues related to new Service Config API - agent caching add 9308a86 Ambari 23644 Handle back end issues related to new Service Config API new f32f21f Merge pull request #1145 from apache/branch-feature-AMBARI-14714-configs The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../controller/AmbariManagementControllerImpl.java | 3 + ambari-web/app/controllers/wizard.js | 2 +- .../app/controllers/wizard/step8_controller.js | 102 - .../app/controllers/wizard/step9_controller.js | 4 +- .../app/mixins/common/configs/configs_saver.js | 3 +- ambari-web/app/utils/ajax/ajax.js | 9 +- ambari-web/test/controllers/wizard/step8_test.js | 35 ++ .../mixins/common/configs/configs_saver_test.js| 124 +++-- 8 files changed, 139 insertions(+), 143 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714-stable updated (228236c -> 58381cf)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch branch-feature-AMBARI-14714-stable in repository https://gitbox.apache.org/repos/asf/ambari.git. from 228236c Revert "Merge branch-feature-AMBARI-14714-configs to branch-feature-AMBARI-14714" add 4ae1a0d [AMBARI-23590] Fix issue where mpackDirectory does not get created at first mpack registration add 64f2448 [AMBARI-23590] Fix issue where mpackDirectory does not get created at registration add 58381cf [AMBARI-23629] Review calls GET, PUT, DELETE for Host components and … (#1055) No new revisions were added by this update. Summary of changes: .../apache/ambari/server/mpack/MpackManager.java | 3 ++- .../app/controllers/global/update_controller.js| 1 + .../nameNode/rollbackHA/step2_controller.js| 3 ++- .../nameNode/rollback_controller.js| 6 ++--- .../highAvailability/nameNode/step4_controller.js | 3 ++- .../highAvailability/nameNode/step5_controller.js | 2 +- .../highAvailability/nameNode/step6_controller.js | 3 ++- .../highAvailability/nameNode/step9_controller.js | 2 +- .../main/admin/kerberos/step6_controller.js| 2 +- ambari-web/app/controllers/main/host/details.js| 12 + .../app/controllers/main/service/info/summary.js | 3 ++- .../main/service/reassign/step4_controller.js | 31 -- .../main/service/reassign/step6_controller.js | 29 +++- .../main/service/reassign/step7_controller.js | 4 +-- ambari-web/app/mappers/service_metrics_mapper.js | 1 + .../details/host_components/decommissionable.js| 2 +- .../details/host_components/install_component.js | 2 +- .../details/support_client_configs_download.js | 3 ++- .../configs/component_actions_by_configs.js| 3 ++- .../mixins/wizard/wizardProgressPageController.js | 4 +-- ambari-web/app/models/host_component.js| 1 + ambari-web/app/utils/ajax/ajax.js | 22 +++ .../details/host_component_views/datanode_view.js | 3 ++- .../info/metrics/flume/flume_metric_graph.js | 4 +-- .../info/metrics/flume/flume_metric_graphs.js | 3 ++- .../nameNode/step4_controller_test.js | 5 +++- .../nameNode/step5_controller_test.js | 4 ++- .../nameNode/step6_controller_test.js | 5 +++- .../nameNode/step9_controller_test.js | 4 ++- .../main/admin/kerberos/step6_controller_test.js | 3 ++- .../test/controllers/main/host/details_test.js | 24 + .../main/service/reassign/step4_controller_test.js | 20 ++ .../main/service/reassign/step6_controller_test.js | 13 ++--- .../main/service/reassign/step7_controller_test.js | 22 +-- .../host_components/install_component_test.js | 4 +-- .../configs/component_actions_by_configs_test.js | 4 ++- .../host_component_views/datanode_view_test.js | 8 +++--- .../host_component_views/decommissionable_test.js | 4 +-- 38 files changed, 178 insertions(+), 94 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714-configs updated (fa5469a -> 9308a86)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch branch-feature-AMBARI-14714-configs in repository https://gitbox.apache.org/repos/asf/ambari.git. from fa5469a Revert "Revert "Merge branch-feature-AMBARI-14714-configs to branch-feature-AMBARI-14714"" add 4ae1a0d [AMBARI-23590] Fix issue where mpackDirectory does not get created at first mpack registration add 64f2448 [AMBARI-23590] Fix issue where mpackDirectory does not get created at registration add 66b8b06 Merge remote-tracking branch 'upstream/branch-feature-AMBARI-14714' into branch-feature-AMBARI-14714-configs add 0f4f52e [AMBARI-23644] Handle back end issues related to new Service Config API - agent caching new 9308a86 Ambari 23644 Handle back end issues related to new Service Config API The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../ambari/server/controller/AmbariManagementControllerImpl.java | 3 +++ .../src/main/java/org/apache/ambari/server/mpack/MpackManager.java | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] 01/01: Ambari 23644 Handle back end issues related to new Service Config API
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714-configs in repository https://gitbox.apache.org/repos/asf/ambari.git commit 9308a86937f3e7c779c90ba1bd0bfbdb63ee36db Merge: fa5469a 0f4f52e Author: mradha25 AuthorDate: Mon Apr 23 10:59:21 2018 -0700 Ambari 23644 Handle back end issues related to new Service Config API .../ambari/server/controller/AmbariManagementControllerImpl.java | 3 +++ .../src/main/java/org/apache/ambari/server/mpack/MpackManager.java | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714 updated (228236c -> 64f2448)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git. from 228236c Revert "Merge branch-feature-AMBARI-14714-configs to branch-feature-AMBARI-14714" add 4ae1a0d [AMBARI-23590] Fix issue where mpackDirectory does not get created at first mpack registration new 64f2448 [AMBARI-23590] Fix issue where mpackDirectory does not get created at registration The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../src/main/java/org/apache/ambari/server/mpack/MpackManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] 01/01: [AMBARI-23590] Fix issue where mpackDirectory does not get created at registration
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git commit 64f24486442e29e7fca4825ecfa340a94552df75 Merge: 228236c 4ae1a0d Author: mradha25 AuthorDate: Fri Apr 20 13:21:53 2018 -0700 [AMBARI-23590] Fix issue where mpackDirectory does not get created at registration .../src/main/java/org/apache/ambari/server/mpack/MpackManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714-configs updated: Revert "Revert "Merge branch-feature-AMBARI-14714-configs to branch-feature-AMBARI-14714""
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714-configs in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-feature-AMBARI-14714-configs by this push: new fa5469a Revert "Revert "Merge branch-feature-AMBARI-14714-configs to branch-feature-AMBARI-14714"" fa5469a is described below commit fa5469aff0e7d8e1217717aa4a5a369861beb936 Author: Madhuvanthi Radhakrishnan AuthorDate: Thu Apr 19 15:47:52 2018 -0700 Revert "Revert "Merge branch-feature-AMBARI-14714-configs to branch-feature-AMBARI-14714"" This reverts commit 228236c4a71b151fe157afdfa0c5b3ccf0c6a602. --- ambari-web/app/controllers/wizard.js | 2 +- .../app/controllers/wizard/step8_controller.js | 102 - .../app/controllers/wizard/step9_controller.js | 4 +- .../app/mixins/common/configs/configs_saver.js | 3 +- ambari-web/app/utils/ajax/ajax.js | 9 +- ambari-web/test/controllers/wizard/step8_test.js | 35 ++ .../mixins/common/configs/configs_saver_test.js| 124 +++-- 7 files changed, 136 insertions(+), 143 deletions(-) diff --git a/ambari-web/app/controllers/wizard.js b/ambari-web/app/controllers/wizard.js index f8f37d4..84ee966 100644 --- a/ambari-web/app/controllers/wizard.js +++ b/ambari-web/app/controllers/wizard.js @@ -529,7 +529,7 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, App.ThemesMappingM const serviceGroups = this.get('content.serviceGroups'); const installPromises = serviceGroups.map(sg => { - data.serviceGroup = sg; + data.serviceGroupName = sg; return App.ajax.send({ name: isRetry ? 'common.host_components.update' : 'common.services.update', diff --git a/ambari-web/app/controllers/wizard/step8_controller.js b/ambari-web/app/controllers/wizard/step8_controller.js index 2ca005e..9a894eb 100644 --- a/ambari-web/app/controllers/wizard/step8_controller.js +++ b/ambari-web/app/controllers/wizard/step8_controller.js @@ -1051,7 +1051,7 @@ App.WizardStep8Controller = App.WizardStepController.extend(App.AddSecurityConfi this.addRequestToAjaxQueue({ name: 'wizard.step8.create_selected_services', data: { - serviceGroup: service.ServiceInfo.service_group_name, + serviceGroupName: service.ServiceInfo.service_group_name, data: JSON.stringify(service) } }); @@ -1131,13 +1131,13 @@ App.WizardStep8Controller = App.WizardStepController.extend(App.AddSecurityConfi * @param componentsData * @param serviceName */ - addRequestToCreateComponent: function (componentsData, serviceName, serviceGroup) { + addRequestToCreateComponent: function (componentsData, serviceName, serviceGroupName) { this.addRequestToAjaxQueue({ name: 'wizard.step8.create_components', data: { data: JSON.stringify(componentsData), serviceName: serviceName, -serviceGroup: serviceGroup +serviceGroupName: serviceGroupName } }); }, @@ -1529,72 +1529,66 @@ App.WizardStep8Controller = App.WizardStepController.extend(App.AddSecurityConfi */ createServiceConfigurations: function () { this.get('selectedServices').forEach(function (service) { - Object.keys(service.get('configTypes')).forEach(function (type) { -if (!this.get('serviceConfigTags').someProperty('type', type)) { - var configs = this.get('configs').filterProperty('filename', App.config.getOriginalFileName(type)); - var serviceConfigNote = this.getServiceConfigNote(type, service.get('displayName')); - this.get('serviceConfigTags').pushObject(this.createDesiredConfig(type, configs, serviceConfigNote)); + let serviceConfigs = { +serviceName: service.get('serviceName'), +serviceGroupName: service.get('stackName'), //TODO - mpacks: for now +data: { + "ServiceConfigVersion": { +"service_config_version_note": this.getServiceConfigNote('', service.get('displayName')), +"stack_id": `${service.get('stackName')}-${service.get('stackVersion')}` + }, + "configurations": [] } + }; + + Object.keys(service.get('configTypesRendered')).forEach(function (typeName) { +const type = service.get('configTypes')[typeName]; //just ensure that the type is in both lists; they contain the same data if so +if (type) { + const configs = this.get('configs').filterProperty('filename',
[ambari] branch branch-feature-AMBARI-14714 updated (53c2377 -> 228236c)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git. from 53c2377 Return mpack info even when attempting to register duplicate mpack add 228236c Revert "Merge branch-feature-AMBARI-14714-configs to branch-feature-AMBARI-14714" No new revisions were added by this update. Summary of changes: ambari-web/app/controllers/wizard.js | 2 +- .../app/controllers/wizard/step8_controller.js | 102 + .../app/controllers/wizard/step9_controller.js | 4 +- .../app/mixins/common/configs/configs_saver.js | 3 +- ambari-web/app/utils/ajax/ajax.js | 9 +- ambari-web/test/controllers/wizard/step8_test.js | 35 -- .../mixins/common/configs/configs_saver_test.js| 124 ++--- 7 files changed, 143 insertions(+), 136 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714-configs updated (caea977 -> 228236c)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch branch-feature-AMBARI-14714-configs in repository https://gitbox.apache.org/repos/asf/ambari.git. from caea977 [AMBARI-23191] Service config API updates (#1028) add 4e7f7eb AMBARI-23508: Update execution_command module to handle data type conversion issue add b4cacd8 AMBARI-23508: Update execution_command module to handle data type conversion issue add c1fdcea Merge branch 'AMBARI-23508-branch-feature-AMBARI-14714' of https://github.com/scottduan/ambari into AMBARI-23508-branch-feature-AMBARI-14714 add 3737c41 Merge branch 'AMBARI-23508-branch-feature-AMBARI-14714' of https://github.com/scottduan/ambari into AMBARI-23508-branch-feature-AMBARI-14714 add 5cd0361 Merge branch 'AMBARI-23508-branch-feature-AMBARI-14714' of https://github.com/scottduan/ambari into AMBARI-23508-branch-feature-AMBARI-14714 add a847d26 AMBARI-23508-2: Misuse one execution_command package api add e6c7963 Merge remote-tracking branch 'upstream/branch-feature-AMBARI-14714' into AMBARI-23508-branch-feature-AMBARI-14714 add 788dee3 [AMBARI-23508] Misuse get_all_attributes in execution_command.py, it is actually in module_configs.py add 0bbc27a [AMBARI-23573] HDFS install fails at before-ANY hook due to no created instances (dsen) (#999) add 9aaed52 [AMBARI-23569] Provide Mpack Package Name to Install in mpack.json add 26f1e62 [AMBARI-23569] Provide Mpack Package Name to Install in mpack.json add 4adcb38 AMBARI-23552. Switch to using Surrogate PK in Ambari DB tables, wherever applicable. add d99514d AMBARI-23552. Switch to using Surrogate PK in Ambari DB tables, wherever applicable. add 703b2b0 Merge branch-feature-AMBARI-14714-configs to branch-feature-AMBARI-14714 add f1e7472 [AMBARI-23590] Return mpack info even when attempting to register duplicate mpack add 53c2377 Return mpack info even when attempting to register duplicate mpack new 228236c Revert "Merge branch-feature-AMBARI-14714-configs to branch-feature-AMBARI-14714" The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../internal/UpgradePlanResourceProvider.java | 3 +- .../VersionDefinitionResourceProvider.java | 174 ++--- .../apache/ambari/server/mpack/MpackManager.java | 104 ++-- .../ambari/server/orm/dao/ClusterServiceDAO.java | 24 +-- .../server/orm/dao/ServiceDesiredStateDAO.java | 10 +- .../ambari/server/orm/dao/ServiceGroupDAO.java | 23 +-- .../server/orm/entities/ClusterServiceEntity.java | 37 ++--- .../orm/entities/ClusterServiceEntityPK.java | 85 -- .../server/orm/entities/ConfigGroupEntity.java | 8 +- .../orm/entities/HostConfigMappingEntity.java | 8 +- .../ServiceComponentDesiredStateEntity.java| 12 +- .../server/orm/entities/ServiceConfigEntity.java | 8 +- .../orm/entities/ServiceDependencyEntity.java | 27 ++-- .../orm/entities/ServiceDesiredStateEntity.java| 24 +-- .../orm/entities/ServiceDesiredStateEntityPK.java | 85 -- .../orm/entities/ServiceGroupDependencyEntity.java | 29 ++-- .../server/orm/entities/ServiceGroupEntity.java| 16 +- .../server/orm/entities/ServiceGroupEntityPK.java | 71 - .../org/apache/ambari/server/state/Module.java | 1 + .../java/org/apache/ambari/server/state/Mpack.java | 12 ++ .../ambari/server/state/MpackOsSpecific.java | 52 +++--- .../ambari/server/state/ServiceComponentImpl.java | 7 +- .../ambari/server/state/ServiceGroupImpl.java | 47 ++ .../apache/ambari/server/state/ServiceImpl.java| 54 ++- .../ambari/server/state/cluster/ClusterImpl.java | 2 +- .../server/state/configgroup/ConfigGroupImpl.java | 4 +- .../src/main/resources/Ambari-DDL-Derby-CREATE.sql | 32 ++-- .../src/main/resources/Ambari-DDL-MySQL-CREATE.sql | 32 ++-- .../main/resources/Ambari-DDL-Oracle-CREATE.sql| 32 ++-- .../main/resources/Ambari-DDL-Postgres-CREATE.sql | 33 ++-- .../resources/Ambari-DDL-SQLAnywhere-CREATE.sql| 32 ++-- .../main/resources/Ambari-DDL-SQLServer-CREATE.sql | 32 ++-- .../stack-hooks/after-INSTALL/scripts/hook.py | 6 +- .../after-INSTALL/scripts/shared_initialization.py | 2 +- .../stack-hooks/before-ANY/scripts/hook.py | 4 +- .../stack-hooks/before-ANY/scripts/params.py | 14 +- .../stack-hooks/before-START/scripts/hook.py | 10 +- .../internal/ServiceResourceProviderTest.java | 52 -- .../internal/UpgradePlanResourceProviderTest.java | 3 +- ambari-web/app/co
[ambari] 01/01: Revert "Merge branch-feature-AMBARI-14714-configs to branch-feature-AMBARI-14714"
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714-configs in repository https://gitbox.apache.org/repos/asf/ambari.git commit 228236c4a71b151fe157afdfa0c5b3ccf0c6a602 Author: Madhuvanthi Radhakrishnan AuthorDate: Thu Apr 19 15:39:30 2018 -0700 Revert "Merge branch-feature-AMBARI-14714-configs to branch-feature-AMBARI-14714" This reverts commit 703b2b04aaf31e70a532e0ec5f17316661c4b0bc, reversing changes made to d99514d3cde9a7e672862ac3aa950d345a4a5a57. --- ambari-web/app/controllers/wizard.js | 2 +- .../app/controllers/wizard/step8_controller.js | 102 + .../app/controllers/wizard/step9_controller.js | 4 +- .../app/mixins/common/configs/configs_saver.js | 3 +- ambari-web/app/utils/ajax/ajax.js | 9 +- ambari-web/test/controllers/wizard/step8_test.js | 35 -- .../mixins/common/configs/configs_saver_test.js| 124 ++--- 7 files changed, 143 insertions(+), 136 deletions(-) diff --git a/ambari-web/app/controllers/wizard.js b/ambari-web/app/controllers/wizard.js index 84ee966..f8f37d4 100644 --- a/ambari-web/app/controllers/wizard.js +++ b/ambari-web/app/controllers/wizard.js @@ -529,7 +529,7 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, App.ThemesMappingM const serviceGroups = this.get('content.serviceGroups'); const installPromises = serviceGroups.map(sg => { - data.serviceGroupName = sg; + data.serviceGroup = sg; return App.ajax.send({ name: isRetry ? 'common.host_components.update' : 'common.services.update', diff --git a/ambari-web/app/controllers/wizard/step8_controller.js b/ambari-web/app/controllers/wizard/step8_controller.js index 9a894eb..2ca005e 100644 --- a/ambari-web/app/controllers/wizard/step8_controller.js +++ b/ambari-web/app/controllers/wizard/step8_controller.js @@ -1051,7 +1051,7 @@ App.WizardStep8Controller = App.WizardStepController.extend(App.AddSecurityConfi this.addRequestToAjaxQueue({ name: 'wizard.step8.create_selected_services', data: { - serviceGroupName: service.ServiceInfo.service_group_name, + serviceGroup: service.ServiceInfo.service_group_name, data: JSON.stringify(service) } }); @@ -1131,13 +1131,13 @@ App.WizardStep8Controller = App.WizardStepController.extend(App.AddSecurityConfi * @param componentsData * @param serviceName */ - addRequestToCreateComponent: function (componentsData, serviceName, serviceGroupName) { + addRequestToCreateComponent: function (componentsData, serviceName, serviceGroup) { this.addRequestToAjaxQueue({ name: 'wizard.step8.create_components', data: { data: JSON.stringify(componentsData), serviceName: serviceName, -serviceGroupName: serviceGroupName +serviceGroup: serviceGroup } }); }, @@ -1529,66 +1529,72 @@ App.WizardStep8Controller = App.WizardStepController.extend(App.AddSecurityConfi */ createServiceConfigurations: function () { this.get('selectedServices').forEach(function (service) { - let serviceConfigs = { -serviceName: service.get('serviceName'), -serviceGroupName: service.get('stackName'), //TODO - mpacks: for now -data: { - "ServiceConfigVersion": { -"service_config_version_note": this.getServiceConfigNote('', service.get('displayName')), -"stack_id": `${service.get('stackName')}-${service.get('stackVersion')}` - }, - "configurations": [] + Object.keys(service.get('configTypes')).forEach(function (type) { +if (!this.get('serviceConfigTags').someProperty('type', type)) { + var configs = this.get('configs').filterProperty('filename', App.config.getOriginalFileName(type)); + var serviceConfigNote = this.getServiceConfigNote(type, service.get('displayName')); + this.get('serviceConfigTags').pushObject(this.createDesiredConfig(type, configs, serviceConfigNote)); } - }; - - Object.keys(service.get('configTypesRendered')).forEach(function (typeName) { -const type = service.get('configTypes')[typeName]; //just ensure that the type is in both lists; they contain the same data if so -if (type) { - const configs = this.get('configs').filterProperty('filename', App.config.getOriginalFileName(typeName)); - serviceConfigs.data.configurations.push(this.createDesiredConfig(typeName, configs, null, true)); -} }, this); - - if (serviceConfi
[ambari] 01/01: Return mpack info even when attempting to register duplicate mpack
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git commit 53c23773a8e20055e55bb5e256232be4de808d00 Merge: 703b2b0 f1e7472 Author: mradha25 AuthorDate: Thu Apr 19 13:12:58 2018 -0700 Return mpack info even when attempting to register duplicate mpack .../apache/ambari/server/mpack/MpackManager.java | 82 +++--- 1 file changed, 41 insertions(+), 41 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714 updated (703b2b0 -> 53c2377)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git. from 703b2b0 Merge branch-feature-AMBARI-14714-configs to branch-feature-AMBARI-14714 add f1e7472 [AMBARI-23590] Return mpack info even when attempting to register duplicate mpack new 53c2377 Return mpack info even when attempting to register duplicate mpack The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../apache/ambari/server/mpack/MpackManager.java | 82 +++--- 1 file changed, 41 insertions(+), 41 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] 01/01: Merge branch-feature-AMBARI-14714-configs to branch-feature-AMBARI-14714
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git commit 703b2b04aaf31e70a532e0ec5f17316661c4b0bc Merge: d99514d caea977 Author: mradha25 AuthorDate: Wed Apr 18 13:04:11 2018 -0700 Merge branch-feature-AMBARI-14714-configs to branch-feature-AMBARI-14714 ambari-web/app/controllers/wizard.js | 2 +- .../app/controllers/wizard/step8_controller.js | 102 - .../app/controllers/wizard/step9_controller.js | 4 +- .../app/mixins/common/configs/configs_saver.js | 3 +- ambari-web/app/utils/ajax/ajax.js | 9 +- ambari-web/test/controllers/wizard/step8_test.js | 35 ++ .../mixins/common/configs/configs_saver_test.js| 124 +++-- 7 files changed, 136 insertions(+), 143 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714 updated (d99514d -> 703b2b0)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git. from d99514d AMBARI-23552. Switch to using Surrogate PK in Ambari DB tables, wherever applicable. add caea977 [AMBARI-23191] Service config API updates (#1028) new 703b2b0 Merge branch-feature-AMBARI-14714-configs to branch-feature-AMBARI-14714 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: ambari-web/app/controllers/wizard.js | 2 +- .../app/controllers/wizard/step8_controller.js | 102 - .../app/controllers/wizard/step9_controller.js | 4 +- .../app/mixins/common/configs/configs_saver.js | 3 +- ambari-web/app/utils/ajax/ajax.js | 9 +- ambari-web/test/controllers/wizard/step8_test.js | 35 ++ .../mixins/common/configs/configs_saver_test.js| 124 +++-- 7 files changed, 136 insertions(+), 143 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714 updated (0bbc27a -> 26f1e62)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git. from 0bbc27a [AMBARI-23573] HDFS install fails at before-ANY hook due to no created instances (dsen) (#999) add 9aaed52 [AMBARI-23569] Provide Mpack Package Name to Install in mpack.json new 26f1e62 [AMBARI-23569] Provide Mpack Package Name to Install in mpack.json The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../apache/ambari/server/mpack/MpackManager.java | 22 + .../org/apache/ambari/server/state/Module.java | 1 + .../java/org/apache/ambari/server/state/Mpack.java | 12 + .../ambari/server/state/MpackOsSpecific.java | 52 +++--- 4 files changed, 52 insertions(+), 35 deletions(-) copy contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/dto/TableInfo.java => ambari-server/src/main/java/org/apache/ambari/server/state/MpackOsSpecific.java (53%) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] 01/01: [AMBARI-23569] Provide Mpack Package Name to Install in mpack.json
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git commit 26f1e62277b1e659821b1b5bcd76968bfeb5caf0 Merge: 0bbc27a 9aaed52 Author: mradha25 AuthorDate: Mon Apr 16 10:01:28 2018 -0700 [AMBARI-23569] Provide Mpack Package Name to Install in mpack.json .../apache/ambari/server/mpack/MpackManager.java | 22 --- .../org/apache/ambari/server/state/Module.java | 1 + .../java/org/apache/ambari/server/state/Mpack.java | 12 .../ambari/server/state/MpackOsSpecific.java | 67 ++ 4 files changed, 94 insertions(+), 8 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] 01/01: [AMBARI-23508] Misuse get_all_attributes in execution_command.py, it is actually in module_configs.py
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git commit 788dee3f08634dedf8cdf22ba5716042de3030f4 Merge: f93c9af e6c7963 Author: mradha25 AuthorDate: Thu Apr 12 14:38:28 2018 -0700 [AMBARI-23508] Misuse get_all_attributes in execution_command.py, it is actually in module_configs.py .../stack-hooks/after-INSTALL/scripts/shared_initialization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714 updated (f93c9af -> 788dee3)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git. from f93c9af AMBARI-23508: Update execution_command module to handle data type con… (#957) add 4e7f7eb AMBARI-23508: Update execution_command module to handle data type conversion issue add b4cacd8 AMBARI-23508: Update execution_command module to handle data type conversion issue add c1fdcea Merge branch 'AMBARI-23508-branch-feature-AMBARI-14714' of https://github.com/scottduan/ambari into AMBARI-23508-branch-feature-AMBARI-14714 add 3737c41 Merge branch 'AMBARI-23508-branch-feature-AMBARI-14714' of https://github.com/scottduan/ambari into AMBARI-23508-branch-feature-AMBARI-14714 add 5cd0361 Merge branch 'AMBARI-23508-branch-feature-AMBARI-14714' of https://github.com/scottduan/ambari into AMBARI-23508-branch-feature-AMBARI-14714 add a847d26 AMBARI-23508-2: Misuse one execution_command package api add e6c7963 Merge remote-tracking branch 'upstream/branch-feature-AMBARI-14714' into AMBARI-23508-branch-feature-AMBARI-14714 new 788dee3 [AMBARI-23508] Misuse get_all_attributes in execution_command.py, it is actually in module_configs.py The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../stack-hooks/after-INSTALL/scripts/shared_initialization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714-configs created (now f93c9af)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch branch-feature-AMBARI-14714-configs in repository https://gitbox.apache.org/repos/asf/ambari.git. at f93c9af AMBARI-23508: Update execution_command module to handle data type con… (#957) No new revisions were added by this update. -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] 01/01: [AMBARI-23506] Remove HDP 3.0 stack definition from branch-feature-AMBARI-14714
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git commit 495ee38f04117ec866f7b477fe9f45d6a877d2e8 Merge: c1dda71 28dd72c Author: mradha25 AuthorDate: Fri Apr 6 14:05:16 2018 -0700 [AMBARI-23506] Remove HDP 3.0 stack definition from branch-feature-AMBARI-14714 .../stacks/HDP/3.0/configuration/settings.xml | 91 -- 1 file changed, 91 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714 updated (c1dda71 -> 495ee38)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git. from c1dda71 AMBARI-23503: Fix installation issues caused by execution_command library (#927) add 28dd72c [AMBARI-23506] Remove HDP 3.0 stack definition from branch-feature-AMBARI-14714 new 495ee38 [AMBARI-23506] Remove HDP 3.0 stack definition from branch-feature-AMBARI-14714 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../stacks/HDP/3.0/configuration/settings.xml | 91 -- 1 file changed, 91 deletions(-) delete mode 100644 ambari-server/src/main/resources/stacks/HDP/3.0/configuration/settings.xml -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714 updated (b5f15af -> f395077)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git. from b5f15af Merge pull request #853 from scottduan/AMBARI-23136-branch-feature-AMBARI-14714 add f997a5a [AMBARI-23255] Load modules and components into a map when reading the mpack.json add 7305d32 [AMBARI-23255] Load modules and components into a map when reading the mpack.json add e1a39ac Merge branch 'AMBARI-23255' of https://github.com/mradha25/ambari into AMBARI-23255 add 3738300 [AMBARI-23255] Load modules and components into a map when reading the mpack.json - Review comments add 9f5ce92 [AMBARI-23255] Load modules and components into a map when reading the mpack.json - Review comments new f395077 Merge pull request #808 from mradha25/AMBARI-23255 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../apache/ambari/server/mpack/MpackManager.java | 4 +++ .../org/apache/ambari/server/state/Module.java | 27 - .../java/org/apache/ambari/server/state/Mpack.java | 34 +- 3 files changed, 43 insertions(+), 22 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] 01/01: Merge pull request #808 from mradha25/AMBARI-23255
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git commit f395077ba2a1b3853b0167e53eef3b0187dac8ae Merge: b5f15af 9f5ce92 Author: mradha25 AuthorDate: Wed Apr 4 15:15:01 2018 -0700 Merge pull request #808 from mradha25/AMBARI-23255 [AMBARI-23255] Load modules and components into a map when reading the mpack.json .../apache/ambari/server/mpack/MpackManager.java | 4 +++ .../org/apache/ambari/server/state/Module.java | 27 - .../java/org/apache/ambari/server/state/Mpack.java | 34 +- 3 files changed, 43 insertions(+), 22 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] 01/01: Merge pull request #839 from mradha25/AMBARI-22904
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git commit 48b9007106cab9e26985858904cf2a2d02f8914f Merge: 7755bff 665775e Author: mradha25 AuthorDate: Wed Apr 4 09:31:03 2018 -0700 Merge pull request #839 from mradha25/AMBARI-22904 [AMBARI-22904] Fix mpack-related unit tests .../api/resources/MpackResourceDefinitionTest.java | 1 + .../internal/MpackResourceProviderTest.java| 86 ++ .../org/apache/ambari/server/state/MpackTest.java | 78 ++-- 3 files changed, 78 insertions(+), 87 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714 updated (7755bff -> 48b9007)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git. from 7755bff [AMBARI-23441] API Addition for Upgrade Plan for Config Changes add 665775e [AMBARI-22904] Fix mpack-related unit tests new 48b9007 Merge pull request #839 from mradha25/AMBARI-22904 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../api/resources/MpackResourceDefinitionTest.java | 1 + .../internal/MpackResourceProviderTest.java| 86 ++ .../org/apache/ambari/server/state/MpackTest.java | 78 ++-- 3 files changed, 78 insertions(+), 87 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714 updated (701f848 -> 0d0a3bc)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git. from 701f848 Merge pull request #835 from scottduan/AMBARI-23136-branch-feature-AMBARI-14714 add f48cc91 Removed "desired_stack" from service creation API call. new 0d0a3bc Merge pull request #857 from jgolieb/AMBARI-23425_remove-desired-stack The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: ambari-web/app/controllers/wizard/step8_controller.js | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] 01/01: Merge pull request #857 from jgolieb/AMBARI-23425_remove-desired-stack
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git commit 0d0a3bc48d0a83fa2e7c75ae9c7c035b65e4d6d7 Merge: 701f848 f48cc91 Author: mradha25 AuthorDate: Mon Apr 2 14:05:15 2018 -0700 Merge pull request #857 from jgolieb/AMBARI-23425_remove-desired-stack [AMBARI-23425] Remove "desired_stack" from service creation call ambari-web/app/controllers/wizard/step8_controller.js | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] 01/01: Merge pull request #835 from scottduan/AMBARI-23136-branch-feature-AMBARI-14714
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git commit 701f8489a67362af05eaa8d510141532050a0908 Merge: 6433f33 a04b93d Author: mradha25 AuthorDate: Thu Mar 29 17:40:34 2018 -0700 Merge pull request #835 from scottduan/AMBARI-23136-branch-feature-AMBARI-14714 Ambari 23136 branch feature ambari 14714 .../execution_command/execution_command.py | 128 ++--- 1 file changed, 113 insertions(+), 15 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714 updated (6433f33 -> 701f848)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git. from 6433f33 AMBARI-23398: Fix merge issues in branch-feature-AMBARI-14714 (jluniya) (#821) add 9510a3c AMBARI-23136: Create an interface to read command.json properties via API instead of direct access add ab5d244 AMBARI-23136: Create an interface to read command.json properties via API instead of direct access add 52fc032 Merge branch 'AMBARI-23136-branch-feature-AMBARI-14714' of https://github.com/scottduan/ambari into AMBARI-23136-branch-feature-AMBARI-14714 add ed38996 AMBARI-23136: Continued: Create an interface to read command.json properties via API instead of direct access add a04b93d Merge branch 'branch-feature-AMBARI-14714' into AMBARI-23136-branch-feature-AMBARI-14714 new 701f848 Merge pull request #835 from scottduan/AMBARI-23136-branch-feature-AMBARI-14714 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../execution_command/execution_command.py | 128 ++--- 1 file changed, 113 insertions(+), 15 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] 01/01: Merge pull request #769 from mradha25/AMBARI-23331
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git commit 01c9e4bd5d2e15fd842bb4ad88a2e2c52af55def Merge: a33db89 ef37bd1 Author: mradha25 AuthorDate: Fri Mar 23 10:47:38 2018 -0700 Merge pull request #769 from mradha25/AMBARI-23331 Ambari 23331 ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714 updated (a33db89 -> 01c9e4b)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git. from a33db89 Ambari-23136: Create an interface to read command.json properties via API instead of direct access (#709) add cdb9646 Fix checkstyle issue add ad16eaa Merge remote-tracking branch 'upstream/branch-feature-AMBARI-14714' into branch-feature-AMBARI-14714 add ef37bd1 [AMBARI-23331] CustomServiceOrchestrator complains about controller not being defined new 01c9e4b Merge pull request #769 from mradha25/AMBARI-23331 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] 01/01: Merge pull request #747 from mradha25/MergeTrunk_Feature14714
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git commit d057be0443582c7e6d010084155a8fbab1219a7b Merge: 36a64f6 8d93603 Author: mradha25 AuthorDate: Wed Mar 21 14:36:28 2018 -0700 Merge pull request #747 from mradha25/MergeTrunk_Feature14714 Merge trunk feature14714 .../src/main/python/ambari_commons/subprocess32.py | 18 -- ambari-common/src/main/python/ambari_stomp/__main__.py | 18 -- ambari-common/src/main/python/ambari_stomp/backward.py | 18 -- .../src/main/python/ambari_stomp/backward2.py | 18 -- .../src/main/python/ambari_stomp/backward3.py | 18 -- .../src/main/python/ambari_stomp/backwardsock.py | 18 -- .../src/main/python/ambari_stomp/backwardsock25.py | 18 -- .../src/main/python/ambari_stomp/backwardsock26.py | 18 -- ambari-common/src/main/python/ambari_stomp/colors.py | 18 -- ambari-common/src/main/python/ambari_stomp/connect.py | 18 -- .../src/main/python/ambari_stomp/constants.py | 18 -- .../src/main/python/ambari_stomp/exception.py | 18 -- ambari-common/src/main/python/ambari_stomp/listener.py | 18 -- ambari-common/src/main/python/ambari_stomp/protocol.py | 18 -- .../src/main/python/ambari_stomp/transport.py | 18 -- ambari-common/src/main/python/ambari_stomp/utils.py| 18 -- ambari-common/src/main/python/ambari_ws4py/__init__.py | 18 -- .../src/main/python/ambari_ws4py/client/__init__.py| 18 -- .../main/python/ambari_ws4py/client/geventclient.py| 18 -- .../main/python/ambari_ws4py/client/threadedclient.py | 18 -- .../main/python/ambari_ws4py/client/tornadoclient.py | 18 -- ambari-common/src/main/python/ambari_ws4py/compat.py | 18 -- ambari-common/src/main/python/ambari_ws4py/exc.py | 18 -- ambari-common/src/main/python/ambari_ws4py/framing.py | 18 -- ambari-common/src/main/python/ambari_ws4py/manager.py | 18 -- .../src/main/python/ambari_ws4py/messaging.py | 18 -- .../src/main/python/ambari_ws4py/streaming.py | 18 -- .../src/main/python/ambari_ws4py/websocket.py | 18 -- .../src/test/python/coilmq/config/coilmq.cfg-sample| 16 .../src/test/python/coilmq/config/defaults.cfg | 16 .../src/test/python/coilmq/protocol/__init__.py| 18 -- ambari-common/src/test/python/coilmq/store/sa/meta.py | 18 -- ambari-common/src/test/python/coilmq/util/frames.py| 18 -- ambari-common/src/test/python/coilmq/util/six.py | 18 -- pom.xml| 9 + 35 files changed, 9 insertions(+), 608 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714 updated (36a64f6 -> d057be0)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git. from 36a64f6 [Ambari 23318] API Addition for Upgrade Plan (#744) add 48d8e75 Fix rat license for files which do not require them add 8d93603 Merge remote-tracking branch 'upstream/branch-feature-AMBARI-14714' into MergeTrunk_Feature14714 new d057be0 Merge pull request #747 from mradha25/MergeTrunk_Feature14714 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../src/main/python/ambari_commons/subprocess32.py | 18 -- ambari-common/src/main/python/ambari_stomp/__main__.py | 18 -- ambari-common/src/main/python/ambari_stomp/backward.py | 18 -- .../src/main/python/ambari_stomp/backward2.py | 18 -- .../src/main/python/ambari_stomp/backward3.py | 18 -- .../src/main/python/ambari_stomp/backwardsock.py | 18 -- .../src/main/python/ambari_stomp/backwardsock25.py | 18 -- .../src/main/python/ambari_stomp/backwardsock26.py | 18 -- ambari-common/src/main/python/ambari_stomp/colors.py | 18 -- ambari-common/src/main/python/ambari_stomp/connect.py | 18 -- .../src/main/python/ambari_stomp/constants.py | 18 -- .../src/main/python/ambari_stomp/exception.py | 18 -- ambari-common/src/main/python/ambari_stomp/listener.py | 18 -- ambari-common/src/main/python/ambari_stomp/protocol.py | 18 -- .../src/main/python/ambari_stomp/transport.py | 18 -- ambari-common/src/main/python/ambari_stomp/utils.py| 18 -- ambari-common/src/main/python/ambari_ws4py/__init__.py | 18 -- .../src/main/python/ambari_ws4py/client/__init__.py| 18 -- .../main/python/ambari_ws4py/client/geventclient.py| 18 -- .../main/python/ambari_ws4py/client/threadedclient.py | 18 -- .../main/python/ambari_ws4py/client/tornadoclient.py | 18 -- ambari-common/src/main/python/ambari_ws4py/compat.py | 18 -- ambari-common/src/main/python/ambari_ws4py/exc.py | 18 -- ambari-common/src/main/python/ambari_ws4py/framing.py | 18 -- ambari-common/src/main/python/ambari_ws4py/manager.py | 18 -- .../src/main/python/ambari_ws4py/messaging.py | 18 -- .../src/main/python/ambari_ws4py/streaming.py | 18 -- .../src/main/python/ambari_ws4py/websocket.py | 18 -- .../src/test/python/coilmq/config/coilmq.cfg-sample| 16 .../src/test/python/coilmq/config/defaults.cfg | 16 .../src/test/python/coilmq/protocol/__init__.py| 18 -- ambari-common/src/test/python/coilmq/store/sa/meta.py | 18 -- ambari-common/src/test/python/coilmq/util/frames.py| 18 -- ambari-common/src/test/python/coilmq/util/six.py | 18 -- pom.xml| 9 + 35 files changed, 9 insertions(+), 608 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] 01/01: Merge pull request #711 from mradha25/MergeTrunk_Feature14714
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git commit 430b544d4182b255e2ef91aab1e647ee8865e6d8 Merge: 1f81303 dd68e2c Author: mradha25 AuthorDate: Wed Mar 21 09:56:22 2018 -0700 Merge pull request #711 from mradha25/MergeTrunk_Feature14714 Merge trunk feature14714 .gitignore |4 +- LICENSE.txt| 28 + NOTICE.txt | 11 +- .../stackVersions/StackVersionsCreateCtrl.js |9 +- .../stackVersions/StackVersionsListCtrl.js |2 +- .../controllers/userManagement/GroupEditCtrl.js|2 +- .../controllers/userManagement/UserEditCtrl.js |2 +- .../controllers/userManagement/UsersListCtrl.js|3 + .../ui/admin-web/app/scripts/i18n.config.js|1 + .../ui/admin-web/app/scripts/services/User.js |3 +- .../resources/ui/admin-web/app/styles/main.css | 31 +- .../admin-web/app/views/ambariViews/viewsList.html |6 +- .../ui/admin-web/app/views/stackVersions/list.html |4 +- .../app/views/stackVersions/stackVersionPage.html | 25 +- .../views/userManagement/modals/userCreate.html|2 +- .../app/views/userManagement/userEdit.html |4 +- .../app/views/userManagement/usersList.html|2 +- ambari-agent/conf/unix/agent-multiplier.py | 10 +- ambari-agent/conf/unix/ambari-agent.ini|5 + ambari-agent/conf/unix/install-helper.sh | 41 +- ambari-agent/pom.xml |4 +- .../src/main/python/ambari_agent/ActionQueue.py| 206 +- .../python/ambari_agent/AlertSchedulerHandler.py | 84 +- .../python/ambari_agent/AlertStatusReporter.py | 110 + .../src/main/python/ambari_agent/AmbariAgent.py| 19 +- .../src/main/python/ambari_agent/AmbariConfig.py | 63 +- .../ambari_agent/ClusterAlertDefinitionsCache.py | 109 + .../src/main/python/ambari_agent/ClusterCache.py | 170 ++ .../python/ambari_agent/ClusterConfiguration.py| 160 -- .../ambari_agent/ClusterConfigurationCache.py | 42 + .../ambari_agent/ClusterHostLevelParamsCache.py| 45 + .../python/ambari_agent/ClusterMetadataCache.py| 42 + .../python/ambari_agent/ClusterTopologyCache.py| 247 ++ .../main/python/ambari_agent/CommandStatusDict.py | 142 +- .../python/ambari_agent/CommandStatusReporter.py | 51 + .../python/ambari_agent/ComponentStatusExecutor.py | 154 ++ .../python/ambari_agent/ConfigurationBuilder.py| 83 + .../src/main/python/ambari_agent/Constants.py | 27 +- .../src/main/python/ambari_agent/Controller.py | 52 +- .../ambari_agent/CustomServiceOrchestrator.py | 116 +- .../src/main/python/ambari_agent/Facter.py | 26 +- .../src/main/python/ambari_agent/FileCache.py | 20 +- .../src/main/python/ambari_agent/Hardware.py |6 +- .../main/python/ambari_agent/HeartbeatHandlers.py | 12 +- .../main/python/ambari_agent/HeartbeatThread.py| 252 ++ .../src/main/python/ambari_agent/HostCleanup.py| 16 +- .../src/main/python/ambari_agent/HostInfo.py | 32 +- .../main/python/ambari_agent/HostStatusReporter.py | 75 + .../main/python/ambari_agent/InitializerModule.py | 87 + .../src/main/python/ambari_agent/NetUtil.py| 23 +- .../main/python/ambari_agent/PingPortListener.py |8 +- .../src/main/python/ambari_agent/PythonExecutor.py | 29 +- .../ambari_agent/PythonReflectiveExecutor.py |2 +- .../main/python/ambari_agent/RecoveryManager.py| 321 +-- .../src/main/python/ambari_agent/Register.py | 26 +- .../main/python/ambari_agent/StaleAlertsMonitor.py | 71 + ambari-agent/src/main/python/ambari_agent/Utils.py | 228 ++ .../main/python/ambari_agent/alerts/ams_alert.py |2 +- .../main/python/ambari_agent/alerts/base_alert.py | 148 +- .../main/python/ambari_agent/alerts/collector.py |2 +- .../python/ambari_agent/alerts/metric_alert.py | 57 +- .../main/python/ambari_agent/alerts/port_alert.py |5 +- .../python/ambari_agent/alerts/recovery_alert.py |2 +- .../python/ambari_agent/alerts/script_alert.py | 14 +- .../main/python/ambari_agent/alerts/web_alert.py | 35 +- .../python/ambari_agent/apscheduler/threadpool.py |2 +- .../src/main/python/ambari_agent/client_example.py | 69 + .../src/main/python/ambari_agent/hostname.py |8 +- .../listeners/AlertDefinitionsEventListener.py | 77 + .../listeners/CommandsEventListener.py | 79 + .../listeners/ConfigurationEventListener.py| 66 + .../listeners/HostLevelParamsEventListener.py | 60 + .../listeners/MetadataEventListener.py | 52 + .../listeners/ServerResponsesListener.py
[ambari] branch branch-feature-AMBARI-14714 updated (5991237 -> 614f5a7)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git. from 5991237 AMBARI-23265 - Provide Original Operating Systems from Mpack repoinfo… (#690) add f2d2a25 [AMBARI-23223] Stack Mpack link broken in stacks api add 7c49e0f Merge branch 'branch-feature-AMBARI-14714' into AMBARI-23223 add 4ad157b [AMBARI-23223] Review comments new 614f5a7 Merge pull request #677 from mradha25/AMBARI-23223 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../controller/AmbariManagementControllerImpl.java | 18 -- .../controller/internal/MpackResourceProvider.java | 72 -- .../internal/StackVersionResourceProvider.java | 14 ++--- 3 files changed, 59 insertions(+), 45 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] 01/01: Merge pull request #677 from mradha25/AMBARI-23223
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git commit 614f5a7c56511846826084a2b753fef8062c36e8 Merge: 5991237 4ad157b Author: mradha25 AuthorDate: Fri Mar 16 13:38:08 2018 -0700 Merge pull request #677 from mradha25/AMBARI-23223 [AMBARI-23223] Stack Mpack link broken in stacks api .../controller/AmbariManagementControllerImpl.java | 18 -- .../controller/internal/MpackResourceProvider.java | 72 -- .../internal/StackVersionResourceProvider.java | 14 ++--- 3 files changed, 59 insertions(+), 45 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] 01/01: [AMBARI-23254] Mpack should have both displayName and description
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git commit 5a23afa17e73ba0fc4f2858c8c87404d49978b87 Merge: 239d782 127e7e3 Author: mradha25 AuthorDate: Thu Mar 15 16:10:49 2018 -0700 [AMBARI-23254] Mpack should have both displayName and description .../ambari/server/controller/MpackResponse.java | 10 ++ .../server/controller/RegistryMpackResponse.java | 12 +++- .../controller/internal/MpackResourceProvider.java| 5 + .../internal/RegistryMpackResourceProvider.java | 9 +++-- .../apache/ambari/server/registry/RegistryMpack.java | 6 ++ .../server/registry/json/JsonRegistryMpack.java | 8 .../java/org/apache/ambari/server/state/Mpack.java| 19 +-- 7 files changed, 64 insertions(+), 5 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714 updated (239d782 -> 5a23afa)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git. from 239d782 AMBARI-23206 - Use Agent Command Response To Update Mpack Install State (#668) add 127e7e3 [AMBARI-23254] Mpack should have both displayName and description new 5a23afa [AMBARI-23254] Mpack should have both displayName and description The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../ambari/server/controller/MpackResponse.java | 10 ++ .../server/controller/RegistryMpackResponse.java | 12 +++- .../controller/internal/MpackResourceProvider.java| 5 + .../internal/RegistryMpackResourceProvider.java | 9 +++-- .../apache/ambari/server/registry/RegistryMpack.java | 6 ++ .../server/registry/json/JsonRegistryMpack.java | 8 .../java/org/apache/ambari/server/state/Mpack.java| 19 +-- 7 files changed, 64 insertions(+), 5 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714 updated: [AMBARI-23177] Yarn-MR separation and minor deployment fixes (#588)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-feature-AMBARI-14714 by this push: new 154266f [AMBARI-23177] Yarn-MR separation and minor deployment fixes (#588) 154266f is described below commit 154266f638b946257be79ccf08b8e0bc9205146e Author: mradha25 AuthorDate: Thu Mar 8 12:42:29 2018 -0800 [AMBARI-23177] Yarn-MR separation and minor deployment fixes (#588) * [AMBARI-23177] Yarn-MR separation and minor deployment fixes * Review comments * Review comments --- .../libraries/functions/get_not_managed_resources.py | 5 +++-- .../org/apache/ambari/server/orm/entities/RepoDefinitionEntity.java | 1 - ambari-web/app/models/stack_service.js | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/get_not_managed_resources.py b/ambari-common/src/main/python/resource_management/libraries/functions/get_not_managed_resources.py index 4af636b..10765bb 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/get_not_managed_resources.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/get_not_managed_resources.py @@ -25,6 +25,7 @@ import json from resource_management.libraries.script import Script from resource_management.core.logger import Logger from resource_management.libraries.functions.default import default +from resource_management.libraries.functions.cluster_settings import get_cluster_setting_value, get_cluster_setting def get_not_managed_resources(): """ @@ -34,8 +35,8 @@ def get_not_managed_resources(): """ config = Script.get_config() not_managed_hdfs_path_list = json.loads(config['hostLevelParams']['not_managed_hdfs_path_list'])[:] - if 'managed_hdfs_resource_property_names' in config['configurations']['cluster-env']: -managed_hdfs_resource_property_names = config['configurations']['cluster-env']['managed_hdfs_resource_property_names'] + if get_cluster_setting('managed_hdfs_resource_property_names') is not None: +managed_hdfs_resource_property_names = get_cluster_setting_value('managed_hdfs_resource_property_names') managed_hdfs_resource_property_list = filter(None, [property.strip() for property in managed_hdfs_resource_property_names.split(',')]) for property_name in managed_hdfs_resource_property_list: diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RepoDefinitionEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RepoDefinitionEntity.java index edcc1f1..d1fc9d8 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RepoDefinitionEntity.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RepoDefinitionEntity.java @@ -37,7 +37,6 @@ import javax.persistence.TableGenerator; import org.apache.ambari.server.state.RepositoryInfo; import org.apache.ambari.server.state.stack.RepoTag; - import com.google.common.base.Objects; /** diff --git a/ambari-web/app/models/stack_service.js b/ambari-web/app/models/stack_service.js index 3240ef4..12d4119 100644 --- a/ambari-web/app/models/stack_service.js +++ b/ambari-web/app/models/stack_service.js @@ -206,7 +206,8 @@ App.StackService = DS.Model.extend({ }.property('coSelectedServices', 'serviceName'), isHiddenOnSelectServicePage: function () { -var hiddenServices = ['MAPREDUCE2']; +//var hiddenServices = ['MAPREDUCE2']; + var hiddenServices = []; return hiddenServices.contains(this.get('serviceName')) || !this.get('isInstallable') || this.get('doNotShowAndInstall'); }.property('serviceName', 'isInstallable'), @@ -340,7 +341,7 @@ App.StackService.componentsOrderForService = { //@TODO: Write unit test for no two keys in the object should have any intersecting elements in their values App.StackService.coSelected = { - +//'YARN': ['MAPREDUCE2'] }; -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714 updated: [Ambari 23133] Hooks scripts has hadoop specific code
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-feature-AMBARI-14714 by this push: new 28ea5b9 [Ambari 23133] Hooks scripts has hadoop specific code 28ea5b9 is described below commit 28ea5b98afd08582a2eb8b5d4093b4fae8714fd5 Author: Madhuvanthi Radhakrishnan AuthorDate: Mon Mar 5 19:11:08 2018 -0800 [Ambari 23133] Hooks scripts has hadoop specific code --- .../src/main/resources/stack-hooks/before-ANY/scripts/params.py | 8 ++-- .../stack-hooks/before-ANY/scripts/shared_initialization.py | 3 +++ ambari-web/app/models/stack_service.js| 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/params.py b/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/params.py index 09ed2e1..a2c3596 100644 --- a/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/params.py +++ b/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/params.py @@ -63,7 +63,8 @@ sudo = AMBARI_SUDO_BINARY ambari_server_hostname = config['clusterHostInfo']['ambari_server_host'][0] stack_version_unformatted = config['hostLevelParams']['stack_version'] -stack_version_formatted = format_stack_version(stack_version_unformatted) +stack_version_formatted = config['hostLevelParams']['stack_version'] +#stack_version_formatted = format_stack_version(stack_version_unformatted) upgrade_type = Script.get_upgrade_type(default("/commandParams/upgrade_type", "")) version = default("/commandParams/version", None) @@ -109,7 +110,10 @@ def is_secure_port(port): # force the use of "current" in the hook hdfs_user_nofile_limit = default("/configurations/hadoop-env/hdfs_user_nofile_limit", "128000") hadoop_home = stack_select.get_hadoop_dir("home") -hadoop_libexec_dir = stack_select.get_hadoop_dir("libexec") +stack_name = default("/hostLevelParams/stack_name", None) +stack_name = stack_name.lower() +component_directory = "namenode" +hadoop_libexec_dir = format("/usr/hwx/mpacks/{stack_name}/{stack_version_formatted}/{component_directory}/libexec") hadoop_lib_home = stack_select.get_hadoop_dir("lib") hadoop_dir = "/etc/hadoop" diff --git a/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/shared_initialization.py b/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/shared_initialization.py index 27679e0..b63c1ff 100644 --- a/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/shared_initialization.py +++ b/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/shared_initialization.py @@ -189,6 +189,9 @@ def setup_hadoop_env(): # create /etc/hadoop Directory(params.hadoop_dir, mode=0755) +#Write out the conf directory +#TODO: Change with instance manager +Directory(params.hadoop_conf_dir, mode=0755) # write out hadoop-env.sh, but only if the directory exists if os.path.exists(params.hadoop_conf_dir): File(os.path.join(params.hadoop_conf_dir, 'hadoop-env.sh'), owner=tc_owner, diff --git a/ambari-web/app/models/stack_service.js b/ambari-web/app/models/stack_service.js index 1b583c1..3240ef4 100644 --- a/ambari-web/app/models/stack_service.js +++ b/ambari-web/app/models/stack_service.js @@ -340,7 +340,7 @@ App.StackService.componentsOrderForService = { //@TODO: Write unit test for no two keys in the object should have any intersecting elements in their values App.StackService.coSelected = { - 'YARN': ['MAPREDUCE2'] + }; -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714 updated: [AMBARI-22992] Update error handling during mpack installation (#363)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-feature-AMBARI-14714 by this push: new 54da5c0 [AMBARI-22992] Update error handling during mpack installation (#363) 54da5c0 is described below commit 54da5c00a2c265ea67bbdccf1374964acae6e199 Author: mradha25 AuthorDate: Thu Feb 15 12:09:52 2018 -0800 [AMBARI-22992] Update error handling during mpack installation (#363) * [AMBARI-22992] Update error handling during mpack installation * [AMBARI-22997] cluster-settings.xml is not present in /var/lib/ambari-server/resources post ambari installation * [AMBARI-22992] Update error handling during mpack installation - review comments --- ambari-server/src/main/assemblies/server.xml | 5 ++ .../apache/ambari/server/mpack/MpackManager.java | 53 +++--- 2 files changed, 21 insertions(+), 37 deletions(-) diff --git a/ambari-server/src/main/assemblies/server.xml b/ambari-server/src/main/assemblies/server.xml index d31b773..cc6c82b 100644 --- a/ambari-server/src/main/assemblies/server.xml +++ b/ambari-server/src/main/assemblies/server.xml @@ -316,6 +316,11 @@ 755 + target/classes/cluster-settings.xml + /var/lib/ambari-server/resources + + + 755 target/classes/Ambari-DDL-Postgres-CREATE.sql /var/lib/ambari-server/resources diff --git a/ambari-server/src/main/java/org/apache/ambari/server/mpack/MpackManager.java b/ambari-server/src/main/java/org/apache/ambari/server/mpack/MpackManager.java index 0aee6a7..e272817 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/mpack/MpackManager.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/mpack/MpackManager.java @@ -48,7 +48,6 @@ import org.apache.ambari.server.orm.entities.StackEntity; import org.apache.ambari.server.state.Module; import org.apache.ambari.server.state.Mpack; import org.apache.ambari.server.state.OsSpecific; -import org.apache.ambari.server.state.StackId; import org.apache.ambari.server.state.stack.StackMetainfoXml; import org.apache.commons.compress.archivers.tar.TarArchiveEntry; import org.apache.commons.compress.archivers.tar.TarArchiveInputStream; @@ -208,13 +207,13 @@ public class MpackManager { if (mpackId != null) { mpackMap.put(mpackId, mpack); mpack.setMpackId(mpackId); - populateStackDB(mpack); - return new MpackResponse(mpack); -} else { - String message = "Mpack :" + mpackRequest.getMpackName() + " version: " + mpackRequest.getMpackVersion() -+ " already exists in server"; - throw new ResourceAlreadyExistsException(message); + if (populateStackDB(mpack)) +return new MpackResponse(mpack); } +String message = "Mpack :" + mpackRequest.getMpackName() + " version: " + mpackRequest.getMpackVersion() + + " already exists in server"; +throw new ResourceAlreadyExistsException(message); + } /*** @@ -433,17 +432,8 @@ public class MpackManager { */ private void createSymLinks(Mpack mpack) throws IOException { -String stackId = mpack.getStackId(); -String stackName = ""; -String stackVersion = ""; -if (stackId == null) { - stackName = mpack.getName(); - stackVersion = mpack.getVersion(); -} else { - StackId id = new StackId(stackId); - stackName = id.getStackName(); - stackVersion = id.getStackVersion(); -} +String stackName = mpack.getName(); +String stackVersion = mpack.getVersion(); File stack = new File(stackRoot + "/" + stackName); Path stackPath = Paths.get(stackRoot + "/" + stackName + "/" + stackVersion); Path mpackPath = Paths.get(mpacksStaging + "/" + mpack.getName() + "/" + mpack.getVersion()); @@ -517,8 +507,8 @@ public class MpackManager { String mpackName = mpack.getName(); String mpackVersion = mpack.getVersion(); List resultSet = mpackDAO.findByNameVersion(mpackName, mpackVersion); - -if (resultSet.size() == 0) { +StackEntity stackEntity = stackDAO.find(mpackName, mpackVersion); +if (resultSet.size() == 0 && stackEntity == null) { LOG.info("Adding mpack {}-{} to the database", mpackName, mpackVersion); MpackEntity mpackEntity = new MpackEntity(); @@ -540,20 +530,10 @@ public class MpackManager { * @param mpack * @throws IOException */ - protected void populateStackDB(Mpack mpack) throws IOException { - -String stackId = mpack.getStackId(); -String stackName = ""; -String stackVersion = ""; -if (stackId == null) { - stackName = mpack.getName(); - s
[ambari] 01/01: Merge pull request #344 from mradha25/RM_cleanup_branch-branch-feature-AMBARI-14714
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git commit acdeb1e0a73deaef848a1a569e09bb3c07345680 Merge: 90aca63 2cb6fca Author: mradha25 AuthorDate: Thu Feb 15 11:06:19 2018 -0800 Merge pull request #344 from mradha25/RM_cleanup_branch-branch-feature-AMBARI-14714 [AMBARI-22980] Commenting out stack_features and stack_select calls u… .../resource_management/libraries/functions/repository_util.py | 5 +++-- .../resource_management/libraries/functions/stack_features.py | 2 +- .../python/resource_management/libraries/functions/stack_select.py | 6 ++ 3 files changed, 10 insertions(+), 3 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714 updated (90aca63 -> acdeb1e)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git. from 90aca63 [AMBARI-22995] Remove deprecated Upgrade Packs add d73b80b [AMBARI-22980] Commenting out stack_features and stack_select calls until instance_manager is ready add 2cb6fca [AMBARI-22980] Issue warnings when stack select tool is not present new acdeb1e Merge pull request #344 from mradha25/RM_cleanup_branch-branch-feature-AMBARI-14714 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../resource_management/libraries/functions/repository_util.py | 5 +++-- .../resource_management/libraries/functions/stack_features.py | 2 +- .../python/resource_management/libraries/functions/stack_select.py | 6 ++ 3 files changed, 10 insertions(+), 3 deletions(-) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714 updated (e527898 -> 5a7ed0d)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git. from e527898 Merge pull request #332 from jayush/AMBARI-22971-branch-feature-AMBARI-14714 add dbca47d [AMBARI-22957] Stack Metainfo.xml should contain the osSpecifics tag new 5a7ed0d Merge pull request #333 from mradha25/AMBARI-22957-branch-feature-AMBARI-14714 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../java/org/apache/ambari/server/mpack/MpackManager.java | 13 + .../apache/ambari/server/state/stack/StackMetainfoXml.java | 4 2 files changed, 17 insertions(+) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] 01/01: Merge pull request #333 from mradha25/AMBARI-22957-branch-feature-AMBARI-14714
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git commit 5a7ed0d1219cbedee19e4856a7f46777f9584f84 Merge: e527898 dbca47d Author: mradha25 AuthorDate: Mon Feb 12 22:48:22 2018 -0800 Merge pull request #333 from mradha25/AMBARI-22957-branch-feature-AMBARI-14714 [AMBARI-22957] Stack Metainfo.xml should contain the osSpecifics tag .../java/org/apache/ambari/server/mpack/MpackManager.java | 13 + .../apache/ambari/server/state/stack/StackMetainfoXml.java | 4 2 files changed, 17 insertions(+) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch AMBARI-22957-branch-feature-AMBARI-14714 deleted (was 2d5787a)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch AMBARI-22957-branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git. was 2d5787a [AMBARI-96286] Stack Metainfo.xml should contain the osSpecifics tag. Add as part of metainfo generation. The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository. -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch AMBARI-22957-branch-feature-AMBARI-14714 created (now 2d5787a)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a change to branch AMBARI-22957-branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git. at 2d5787a [AMBARI-96286] Stack Metainfo.xml should contain the osSpecifics tag. Add as part of metainfo generation. This branch includes the following new commits: new 2d5787a [AMBARI-96286] Stack Metainfo.xml should contain the osSpecifics tag. Add as part of metainfo generation. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] 01/01: [AMBARI-96286] Stack Metainfo.xml should contain the osSpecifics tag. Add as part of metainfo generation.
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch AMBARI-22957-branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git commit 2d5787a3c67dc1648569d98a7acae44ee69bb113 Author: Madhuvanthi Radhakrishnan AuthorDate: Fri Feb 9 20:18:45 2018 -0800 [AMBARI-96286] Stack Metainfo.xml should contain the osSpecifics tag. Add as part of metainfo generation. --- .../java/org/apache/ambari/server/mpack/MpackManager.java | 13 + .../apache/ambari/server/state/stack/StackMetainfoXml.java | 4 2 files changed, 17 insertions(+) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/mpack/MpackManager.java b/ambari-server/src/main/java/org/apache/ambari/server/mpack/MpackManager.java index 300c22e..22a2a74 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/mpack/MpackManager.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/mpack/MpackManager.java @@ -29,6 +29,7 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.StandardCopyOption; +import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; @@ -46,6 +47,7 @@ import org.apache.ambari.server.orm.entities.MpackEntity; import org.apache.ambari.server.orm.entities.StackEntity; import org.apache.ambari.server.state.Module; import org.apache.ambari.server.state.Mpack; +import org.apache.ambari.server.state.OsSpecific; import org.apache.ambari.server.state.StackId; import org.apache.ambari.server.state.stack.StackMetainfoXml; import org.apache.commons.compress.archivers.tar.TarArchiveEntry; @@ -328,6 +330,17 @@ public class MpackManager { version.setActive(true); generatedMetainfo.setVersion(version); +//Add osSpecifics to the metainfo.xml +OsSpecific osSpecific = new OsSpecific("any"); +OsSpecific.Package pkg = new OsSpecific.Package(); +pkg.setName(mpack.getName().toLowerCase()); +ArrayList packageArrayList = new ArrayList<>(); +packageArrayList.add(pkg); +ArrayList osSpecificArrayList = new ArrayList<>(); +osSpecificArrayList.add(osSpecific); +osSpecific.addPackages(packageArrayList); +generatedMetainfo.setOsSpecifics(osSpecificArrayList); + Map prerequisites = mpack.getPrerequisites(); if (prerequisites != null && prerequisites.containsKey(MIN_JDK_PROPERTY)) { generatedMetainfo.setMinJdk(mpack.getPrerequisites().get(MIN_JDK_PROPERTY)); diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/StackMetainfoXml.java b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/StackMetainfoXml.java index 7f56b50..31568d8 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/StackMetainfoXml.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/StackMetainfoXml.java @@ -131,6 +131,10 @@ public class StackMetainfoXml implements Validable{ this.version = version; } + public void setOsSpecifics(List osSpecifics) { +this.osSpecifics = osSpecifics; + } + /** * Internal list of os-specific details (loaded from xml). Added at schema ver 2 */ -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714 updated: Branch feature ambari 14714 (#307)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-feature-AMBARI-14714 by this push: new 8383d16 Branch feature ambari 14714 (#307) 8383d16 is described below commit 8383d160f2c6c7d6477de27b175485bdf843fc32 Author: mradha25 AuthorDate: Fri Feb 9 12:55:32 2018 -0800 Branch feature ambari 14714 (#307) * [AMBARI-22948] stack-hooks has to be updated to use cluster-settings instead of cluster-env * [AMBARI-22938] Fix SQL issue due to trunk merge issue --- .../src/main/resources/Ambari-DDL-Postgres-CREATE.sql | 2 +- .../resources/stack-hooks/after-INSTALL/scripts/params.py | 5 +++-- .../resources/stack-hooks/before-ANY/scripts/params.py| 15 --- .../stack-hooks/before-INSTALL/scripts/params.py | 13 +++-- .../resources/stack-hooks/before-START/scripts/params.py | 11 ++- 5 files changed, 25 insertions(+), 21 deletions(-) diff --git a/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql index 20b777d..bbd0239 100644 --- a/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql +++ b/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql @@ -1287,7 +1287,7 @@ INSERT INTO ambari_sequences (sequence_name, sequence_value) VALUES ('servicecomponent_version_id_seq', 0), ('blueprint_service_id_seq', 0), ('blueprint_mpack_instance_id_seq', 0), - ('hostgroup_component_id_seq', 0); + ('hostgroup_component_id_seq', 0), ('repo_os_id_seq', 0), ('repo_definition_id_seq', 0), ('hostcomponentdesiredstate_id_seq', 0); diff --git a/ambari-server/src/main/resources/stack-hooks/after-INSTALL/scripts/params.py b/ambari-server/src/main/resources/stack-hooks/after-INSTALL/scripts/params.py index 4eecfa2..8d7b31d 100644 --- a/ambari-server/src/main/resources/stack-hooks/after-INSTALL/scripts/params.py +++ b/ambari-server/src/main/resources/stack-hooks/after-INSTALL/scripts/params.py @@ -27,6 +27,7 @@ from resource_management.libraries.functions import conf_select from resource_management.libraries.functions import stack_select from resource_management.libraries.functions import format_jvm_option from resource_management.libraries.functions.version import format_stack_version, get_major_version +from resource_management.libraries.functions.cluster_settings import get_cluster_setting_value from string import lower config = Script.get_config() @@ -64,7 +65,7 @@ mapreduce_libs_path = "/usr/hdp/current/hadoop-mapreduce-client/*" versioned_stack_root = '/usr/hdp/current' #security params -security_enabled = config['configurations']['cluster-env']['security_enabled'] +security_enabled = get_cluster_setting_value('security_enabled') #java params java_home = config['hostLevelParams']['java_home'] @@ -94,7 +95,7 @@ mapred_log_dir_prefix = default("/configurations/mapred-env/mapred_log_dir_prefi #users and groups hdfs_user = config['configurations']['hadoop-env']['hdfs_user'] -user_group = config['configurations']['cluster-env']['user_group'] +user_group = get_cluster_setting_value('user_group') namenode_host = default("/clusterHostInfo/namenode_host", []) has_namenode = not len(namenode_host) == 0 diff --git a/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/params.py b/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/params.py index e050db5..09ed2e1 100644 --- a/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/params.py +++ b/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/params.py @@ -37,6 +37,7 @@ from resource_management.libraries.functions import StackFeature 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.get_architecture import get_architecture +from resource_management.libraries.functions.cluster_settings import get_cluster_setting_value from ambari_commons.constants import AMBARI_SUDO_BINARY @@ -72,7 +73,7 @@ if (upgrade_type is not None) and version: ambari_java_home = default("/commandParams/ambari_java_home", None) ambari_jdk_name = default("/commandParams/ambari_jdk_name", None) -security_enabled = config['configurations']['cluster-env']['security_enabled'] +security_enabled = get_cluster_setting_value('security_enabled') hdfs_user = config[
[ambari] branch branch-feature-AMBARI-14714 updated: Branch feature ambari 14714 (#291)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-feature-AMBARI-14714 by this push: new 4f521a9 Branch feature ambari 14714 (#291) 4f521a9 is described below commit 4f521a9c9bd358b5805406a388d87cdcc73e1666 Author: mradha25 AuthorDate: Wed Feb 7 14:38:40 2018 -0800 Branch feature ambari 14714 (#291) * [AMBARI-22904] Revised mpack APIs * [AMBARI-22904] Revised mpack APIs * [AMBARI-22904] Revised mpack APIs * [AMBARI-22904] Revised mpack APIs * [AMBARI-22904] Revised mpack APIs * [AMBARI-22904] Revised mpack APIs * [AMBARI-22904] Revised mpack APIs * [AMBARI-22904] Revised mpack APIs - Fix for dependencyType -> Type in ModuleDependency class. --- .../src/main/java/org/apache/ambari/server/state/ModuleDependency.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/ModuleDependency.java b/ambari-server/src/main/java/org/apache/ambari/server/state/ModuleDependency.java index bdce407..a462391 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/ModuleDependency.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/ModuleDependency.java @@ -30,7 +30,7 @@ public class ModuleDependency { @SerializedName("INSTALL") INSTALL } - @SerializedName("dependencyType") + @SerializedName("type") private DependencyType dependencyType; public String getName() { -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch branch-feature-AMBARI-14714 updated: [AMBARI-22904] Revised mpack APIs (#252)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-feature-AMBARI-14714 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-feature-AMBARI-14714 by this push: new aedcb74 [AMBARI-22904] Revised mpack APIs (#252) aedcb74 is described below commit aedcb74030e25fa9a0a1784b37c642022c0dd437 Author: mradha25 AuthorDate: Tue Feb 6 11:20:52 2018 -0800 [AMBARI-22904] Revised mpack APIs (#252) * [AMBARI-22904] Revised mpack APIs * [AMBARI-22904] Revised mpack APIs * [AMBARI-22904] Revised mpack APIs * [AMBARI-22904] Revised mpack APIs * [AMBARI-22904] Revised mpack APIs * [AMBARI-22904] Revised mpack APIs * [AMBARI-22904] Revised mpack APIs --- .../ambari/server/api/services/AmbariMetaInfo.java | 33 ++- .../controller/AmbariManagementController.java | 21 +- .../controller/AmbariManagementControllerImpl.java | 29 ++- .../ambari/server/controller/MpackResponse.java| 12 + .../controller/internal/MpackResourceProvider.java | 68 +++--- .../controller/internal/StackDefinition.java | 18 ++ .../apache/ambari/server/mpack/MpackGenerator.java | 58 +++-- .../apache/ambari/server/mpack/MpackManager.java | 189 --- .../apache/ambari/server/stack/StackDirectory.java | 12 +- .../org/apache/ambari/server/state/Module.java | 163 + .../ambari/server/state/ModuleComponent.java | 109 + .../ambari/server/state/ModuleDependency.java | 88 +++ .../java/org/apache/ambari/server/state/Mpack.java | 253 + .../org/apache/ambari/server/state/Packlet.java| 167 -- .../AmbariManagementControllerImplTest.java| 19 +- .../server/controller/MpackResponseTest.java | 4 +- .../internal/MpackResourceProviderTest.java| 37 +-- .../org/apache/ambari/server/state/MpackTest.java | 103 ++--- 18 files changed, 849 insertions(+), 534 deletions(-) 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 f5abc6c..4109035 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 @@ -74,8 +74,9 @@ import org.apache.ambari.server.state.Clusters; import org.apache.ambari.server.state.ComponentInfo; import org.apache.ambari.server.state.DependencyInfo; import org.apache.ambari.server.state.ExtensionInfo; +import org.apache.ambari.server.state.Module; +import org.apache.ambari.server.state.Mpack; import org.apache.ambari.server.state.OperatingSystemInfo; -import org.apache.ambari.server.state.Packlet; import org.apache.ambari.server.state.PropertyInfo; import org.apache.ambari.server.state.RepositoryInfo; import org.apache.ambari.server.state.Service; @@ -694,12 +695,12 @@ public class AmbariMetaInfo { } /** - * Gets the packlet information for given mpack. + * Gets the module information for given mpack. * @param mpackId - * @return List of Packlets. + * @return List of Modules. */ - public List getPacklets(Long mpackId) { -return mpackManager.getPacklets(mpackId); + public List getModules(Long mpackId) { +return mpackManager.getModules(mpackId); } @@ -1655,4 +1656,26 @@ public class AmbariMetaInfo { public File getCommonWidgetsDescriptorFile() { return commonWidgetsDescriptorFile; } + + /*** + * Fetch all mpacks from mpackMap + * @return all mpacks from mpackMap - in memory data structure + */ + public Collection getMpacks() { +if (mpackManager.getMpackMap() != null) { + return mpackManager.getMpackMap().values(); +} +return Collections.emptySet(); + } + + /*** + * Fetch a particular mpack based on mpackid + * @return a single mpack + */ + public Mpack getMpack(Long mpackId) { +if (mpackManager.getMpackMap() != null && mpackManager.getMpackMap().containsKey(mpackId)) { + return mpackManager.getMpackMap().get(mpackId); +} +return null; + } } 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 2064c0e..9a1bb92 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 @@ -57,8 +57,8 @@ import org.apache.ambari.server.state.Config; import org.apache.ambari.server.state.ConfigHelper; import org.apache.ambari.server.state.HostState; import org.apache.ambari.server.state.MaintenanceState;
[ambari] branch branch-2.6 updated: AMBARI-20908 Kafka advertised.listeners replaced in Kerberos Mode (bharatviswa via mradhakrishnan)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch branch-2.6 in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/branch-2.6 by this push: new 5148ecb AMBARI-20908 Kafka advertised.listeners replaced in Kerberos Mode (bharatviswa via mradhakrishnan) 5148ecb is described below commit 5148ecb0a74bc10a2b39610bbd1b14f94e56d5e5 Author: Madhuvanthi Radhakrishnan AuthorDate: Tue Jan 30 12:13:49 2018 -0800 AMBARI-20908 Kafka advertised.listeners replaced in Kerberos Mode (bharatviswa via mradhakrishnan) --- .../main/resources/common-services/KAFKA/0.8.1/package/scripts/kafka.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/kafka.py b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/kafka.py index f03bccb..ec32ea2 100644 --- a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/kafka.py +++ b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/kafka.py @@ -58,8 +58,6 @@ def kafka(upgrade_type=None): listeners = listeners.replace("PLAINTEXT", "PLAINTEXTSASL") kafka_server_config['listeners'] = listeners - kafka_server_config['advertised.listeners'] = listeners - Logger.info(format("Kafka advertised listeners: {listeners}")) else: kafka_server_config['listeners'] = listeners if 'advertised.listeners' in kafka_server_config: -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.
[ambari] branch trunk updated: AMBARI-20908 : Kafka advertised.listeners replaced in Kerberos Mode (bharatviswa via mradhakrishnan)
This is an automated email from the ASF dual-hosted git repository. mradhakrishnan pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ambari.git The following commit(s) were added to refs/heads/trunk by this push: new feb6f7d AMBARI-20908 : Kafka advertised.listeners replaced in Kerberos Mode (bharatviswa via mradhakrishnan) feb6f7d is described below commit feb6f7d9096ffc284bdc89f09035d289a1d73d48 Author: Madhuvanthi Radhakrishnan AuthorDate: Tue Jan 30 11:49:59 2018 -0800 AMBARI-20908 : Kafka advertised.listeners replaced in Kerberos Mode (bharatviswa via mradhakrishnan) --- .../resources/common-services/KAFKA/0.8.1/package/scripts/kafka.py | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/kafka.py b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/kafka.py index 3adea69..949f3a2 100644 --- a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/kafka.py +++ b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/kafka.py @@ -53,11 +53,7 @@ def kafka(upgrade_type=None): Logger.info(format("Kafka listeners: {listeners}")) kafka_server_config['listeners'] = listeners - if params.kerberos_security_enabled and params.kafka_kerberos_enabled: - Logger.info("Kafka kerberos security is enabled.") - kafka_server_config['advertised.listeners'] = listeners - Logger.info(format("Kafka advertised listeners: {listeners}")) - elif 'advertised.listeners' in kafka_server_config: + if 'advertised.listeners' in kafka_server_config: advertised_listeners = kafka_server_config['advertised.listeners'].replace("localhost", params.hostname) kafka_server_config['advertised.listeners'] = advertised_listeners Logger.info(format("Kafka advertised listeners: {advertised_listeners}")) -- To stop receiving notification emails like this one, please contact mradhakrish...@apache.org.