From b8c2d009f074dd00f75ac5d9ed848cc08f779d94 Mon Sep 17 00:00:00 2001 From: jialiang Date: Wed, 31 Jul 2024 08:56:47 +0800 Subject: [PATCH 1/5] AMBARI-26049: Fix type error in ambari port alert (#3772) --- .../src/main/python/ambari_agent/alerts/port_alert.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py b/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py index acf37467d39..59e40134c83 100644 --- a/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py +++ b/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py @@ -154,8 +154,8 @@ def _collect(self): start_time = time.time() s.connect((host, port)) if self.socket_command is not None: - s.sendall(self.socket_command) - data = s.recv(1024) + s.sendall(self.socket_command.encode()) + data = s.recv(1024).decode() if self.socket_command_response is not None and data != self.socket_command_response: raise Exception("Expected response {0}, Actual response {1}".format( self.socket_command_response, data)) From aef70a95b595693dece108a00264e2d2d365f835 Mon Sep 17 00:00:00 2001 From: jialiang Date: Wed, 31 Jul 2024 14:27:22 +0800 Subject: [PATCH 2/5] AMBARI-26105: Fix TestPortAlert.py unit test failures in Ambari agent due to Python 2 to 3 upgrade (#3800) --- ambari-agent/src/test/python/ambari_agent/TestPortAlert.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ambari-agent/src/test/python/ambari_agent/TestPortAlert.py b/ambari-agent/src/test/python/ambari_agent/TestPortAlert.py index 0a47f3b8a5c..845a8cf2777 100644 --- a/ambari-agent/src/test/python/ambari_agent/TestPortAlert.py +++ b/ambari-agent/src/test/python/ambari_agent/TestPortAlert.py @@ -393,7 +393,7 @@ def test_collect_zookeeper(self, time, socket): alert.set_cluster(cluster, cluster_id, host) alert.configuration_builder = MagicMock() s = socket() - s.recv.return_value = "imok" + s.recv.return_value = "imok".encode() def collector_side_effect(clus, data): self.assertEqual(data['name'], alert_meta['name']) @@ -451,7 +451,7 @@ def test_collect_zookeeper_warning(self, time, socket): alert.set_cluster(cluster, cluster_id, host) alert.configuration_builder = MagicMock() s = socket() - s.recv.return_value = "imok" + s.recv.return_value = "imok".encode() def collector_side_effect(clus, data): self.assertEqual(data['name'], alert_meta['name']) @@ -510,7 +510,7 @@ def test_collect_zookeeper_connectionTimeout(self, time, socket): alert.configuration_builder = MagicMock() s = socket() - s.recv.return_value = "imok" + s.recv.return_value = "imok".encode() def collector_side_effect(clus, data): self.assertEqual(data['name'], alert_meta['name']) From 2c2917aaeb7781b6eb7b6443a4a02d6d2d964ebd Mon Sep 17 00:00:00 2001 From: wangda <38549158+daziz@users.noreply.github.com> Date: Wed, 31 Jul 2024 14:31:49 +0800 Subject: [PATCH 3/5] AMBARI-26104: [fix][doc] Correcting spelling mistakes #3752 Signed-off-by: zhangwd3 Co-authored-by: zhangwd3 --- ambari-server/docs/api/v1/alert-dispatching.md | 2 +- ambari-server/docs/api/v1/index.md | 2 +- ambari-server/docs/configuration/index.md | 2 +- ambari-views/docs/index.md | 2 +- ambari-views/examples/restricted-view/docs/index.md | 2 +- dev-support/docker/centos7/README.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ambari-server/docs/api/v1/alert-dispatching.md b/ambari-server/docs/api/v1/alert-dispatching.md index 8326e5ee053..90a9499e507 100644 --- a/ambari-server/docs/api/v1/alert-dispatching.md +++ b/ambari-server/docs/api/v1/alert-dispatching.md @@ -37,7 +37,7 @@ Any number of targets can be associated with an alert group (a grouping of defin There is also a `global` alert target which can be used as a way to produce notifications for any alert defined in Ambari. These `global` targets are never associated with any groups; they apply to all groups and all definitions. ##### Notices -Once an alert has changed state, Ambari will determine if there are any targets that should receive a notification of the state change. These notifications, or notices, are created with an initial status of `PENDING` and will transition either to `DELIVERED` or `FAILED` once the proper dispatcher has attemped to process the notice. Dispatchers can attempt to aggregate any `PENDING` notices into a single outbound notification. +Once an alert has changed state, Ambari will determine if there are any targets that should receive a notification of the state change. These notifications, or notices, are created with an initial status of `PENDING` and will transition either to `DELIVERED` or `FAILED` once the proper dispatcher has attempted to process the notice. Dispatchers can attempt to aggregate any `PENDING` notices into a single outbound notification. ### API Summary diff --git a/ambari-server/docs/api/v1/index.md b/ambari-server/docs/api/v1/index.md index e8abcb633b2..4bdbcff23d2 100644 --- a/ambari-server/docs/api/v1/index.md +++ b/ambari-server/docs/api/v1/index.md @@ -176,7 +176,7 @@ Delete the cluster named 'c1'. ### Asynchronous Response -The managment APIs can return a response code of 202 which indicates that the request has been accepted. The body of the response contains the ID and href of the request resource that was created to carry out the instruction. +The management APIs can return a response code of 202 which indicates that the request has been accepted. The body of the response contains the ID and href of the request resource that was created to carry out the instruction. 202 Accepted { diff --git a/ambari-server/docs/configuration/index.md b/ambari-server/docs/configuration/index.md index 7a1b7184f65..01c61d8caa3 100644 --- a/ambari-server/docs/configuration/index.md +++ b/ambari-server/docs/configuration/index.md @@ -234,7 +234,7 @@ The following are the properties which can be used to configure Ambari. | server.metrics.retrieval-service.thread.priority | The priority of threads used by the service which retrieves JMX and REST metrics directly from their respective endpoints. |`5` | | server.metrics.retrieval-service.threadpool.size.core | The core number of threads used to retrieve JMX and REST metrics directly from their respective endpoints. |`4` | | server.metrics.retrieval-service.threadpool.size.max | The maximum number of threads used to retrieve JMX and REST metrics directly from their respective endpoints. |`8` | -| server.metrics.retrieval-service.threadpool.worker.size | The number of queued requests allowed for JMX and REST metrics before discarding old requests which have not been fullfilled. |`80` | +| server.metrics.retrieval-service.threadpool.worker.size | The number of queued requests allowed for JMX and REST metrics before discarding old requests which have not been fulfilled. |`80` | | server.operations.retry-attempts | The number of retry attempts for failed API and blueprint operations. |`0` | | server.os_family | The operating system family for all hosts in the cluster. This is used when bootstrapping agents and when enabling Kerberos.

The following are examples of valid values:
  • `redhat`
  • `ubuntu`
| | | server.os_type | The operating system version for all hosts in the cluster. This is used when bootstrapping agents and when enabling Kerberos.

The following are examples of valid values:
  • `6`
  • `7`
| | diff --git a/ambari-views/docs/index.md b/ambari-views/docs/index.md index 302d6a79d95..407fc82a441 100644 --- a/ambari-views/docs/index.md +++ b/ambari-views/docs/index.md @@ -1085,7 +1085,7 @@ Because the resource is managed through the Ambari API framework, it may be quer #####Grant view privileges -To grant privileges to access the restricted resource we can create a privilege sub-resource for the view instance. The following API will grant RESTICTED permission to the user 'bob' for the view instance 'INSTANCE_1' of the 'RESTRICTED' view. +To grant privileges to access the restricted resource we can create a privilege sub-resource for the view instance. The following API will grant RESTRICTED permission to the user 'bob' for the view instance 'INSTANCE_1' of the 'RESTRICTED' view. POST http:///api/v1/views/RESTRICTED/versions/1.0.0/instances/INSTANCE_1 diff --git a/ambari-views/examples/restricted-view/docs/index.md b/ambari-views/examples/restricted-view/docs/index.md index 78aced45235..14b469cb5fd 100644 --- a/ambari-views/examples/restricted-view/docs/index.md +++ b/ambari-views/examples/restricted-view/docs/index.md @@ -231,7 +231,7 @@ If we try to access the view's restricted resource through the resource's href i 401 Unauthorized -To grant privileges to access the restricted resource we can create a privilege sub-resource for the view instance. The following API will grant RESTICTED permission to the user 'bob' for the view instance 'INSTANCE_1' of the 'RESTRICTED' view. +To grant privileges to access the restricted resource we can create a privilege sub-resource for the view instance. The following API will grant RESTRICTED permission to the user 'bob' for the view instance 'INSTANCE_1' of the 'RESTRICTED' view. POST http:///api/v1/views/RESTRICTED/versions/1.0.0/instances/INSTANCE_1 diff --git a/dev-support/docker/centos7/README.md b/dev-support/docker/centos7/README.md index c976c0b4c4f..494726b2e9d 100644 --- a/dev-support/docker/centos7/README.md +++ b/dev-support/docker/centos7/README.md @@ -31,7 +31,7 @@ git clone https://github.com/apache/ambari.git cd ambari/dev-support/docker/centos7/ ``` ### **Step 4**: Build develop basic image -Run the setup command, you will get `ambari/develop:trunk-centos-7` image. It has the enviroment needed to compile Ambari and run servers such as Ambari Server, Ambari Agent, Mysql, etc. +Run the setup command, you will get `ambari/develop:trunk-centos-7` image. It has the environment needed to compile Ambari and run servers such as Ambari Server, Ambari Agent, Mysql, etc. **RHEL (CentOS 7) :** ```shell From 23e64e5931cb2542bdad25afb62f3f6356d16932 Mon Sep 17 00:00:00 2001 From: Rich Bowen Date: Wed, 31 Jul 2024 02:34:49 -0400 Subject: [PATCH 4/5] AMBARI-26103: Remove google analytics, as per ASF Privacy Policy. --- docs/src/site/site.xml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/docs/src/site/site.xml b/docs/src/site/site.xml index fcb0b5fe8ab..dc9f2eb0c1f 100644 --- a/docs/src/site/site.xml +++ b/docs/src/site/site.xml @@ -44,23 +44,6 @@ - - -