ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
Apache Ambari ??? ??
???
filfal2001@gmail.com
INDEX
01
02
03
04
05
06
Dashboard
Alerts
Hosts
Services
View
Manage
Ambari page? http://[AMBARI_SERVER_HOST_NAME]:8080 ?? ??? ? ????. Admin ??? ?? ???
ID : admin, PASS : admin ???.
1) Ambari Dashboard UI
1. Ambari Dashboard
3
* Ambari server Port ??? /etc/ambari-server/conf/ambari.properties? client.api.port ??? ?? ?? ??
4
Ambari UI ???? ??? ?? ?? ?? ????. ? ????? ?? ?? ? ???? ???? ????.
2) Status Bar
1. Ambari Dashboard
?Ambari ?? - ????? ?????? ? ??? ? ?? ????? ???.
????? ?? # ops - ?? ?? Ambari ?? ?? ?????. ???? ??
?? # ops? ???? ????? ?? ??? ?????.
?# alerts - ????? ?? ?? ?? ??? ??(?? ??)? ?????.
?Dashboard - ????? ?????.
?Services - ????? ???? ?? ?? ? ?? ?????.
?Hosts - ????? ??? ?? ?? ? ?? ?????.
?Alerts - ??, ?? ? ??? ??? ?? ?????.
?Admin - ????? ??? ????? ??/???, ??? ?? ?? ?
Kerberos ?? ??? ?????.
?Admin ?? - Ambari ??, ??? ?? ? ?? ?????.
????? Metrics ?? ????? ??? ? ?? ?? ???? ? ?? ??? ??? ?????. CPU
Usage? ?? ?? ??? ???? ?? ??? ?????.
1) Ambari Dashboard UI
1. Ambari Dashboard
5
Heatmaps ?? ???? ????? ??? ????? ???? ?????.
1) Ambari Dashboard UI
1. Ambari Dashboard
6
7
Alerts ??? Ambari?? ???? ???? ?? ??? ?????.
1) Alerts UI
2. Alerts
? OK
? Warning
? CRITICAL
? UNKNOWN
8
Action ??? ???? Manage Alert Groups? ???? Alert ??? ??? ? ????.
2) Manage Alert Group
2. Alerts
9
Action ???? ?? ??? ???? ?? ??? ?? ?? ????. ?? ??? ???? e-mail ?? SNMP?
?? ??? ?? ? ????.
3) Create Alert Notification
2. Alerts
10
???? ?? ??? ?? ??? ??? ???? ?????. ?? ?? ?? ?? ?? ??? ???? ???
?? ?? ??, component ???, component ?? ?? ??? ? ? ????.
1) Hosts UI
3. Hosts
11
Hosts ???? ??? ?? ??? ??? ? ????.
2) Host Actions
3. Hosts
Actions ??? ???? ??? ??? ?????.
? Start all components - ????? ?? ?? ???
?????.
? Stop all components - ????? ?? ?? ???
?????.
? Restart all components - ????? ?? ?? ??
? ???? ?????.
? Turn on maintenance mode - ???? ?? ???
???? ????. ??? ???? ??? ????
?? ? ??? ????? ???. ?? ?? ????
???? ?????.
? Turn off maintenance mode - ???? ?? ?? ?
?? ?????.
? Stop - ????? DataNode ?? NodeManagers?
?????.
? Start - ????? DataNode ?? NodeManagers?
?????.
? Restart - ????? DataNode ?? NodeManagers
? ???? ?????.
? Decommission - ???? ?????? ?????.
? Recommission - ??? ???? ??? ????
????? ?????.
12
????? Services ?? ??? ?????? ???? ??? ??? ?? ?? ??? ?????. ???
???? ???? ?? ?? ?? ??? ???? ? ?????.
1) Services UI
4. Services
13
????? Services ?? ??? ?????? ???? ??? ??? ?? ?? ??? ?????. ???
???? ???? ?? ?? ?? ??? ???? ? ?????.
1) Services UI
4. Services
???? ?? ??? ????? ??? ??
???? ?? ??? ???? ?? ????
???? ?????.
14
?? ???? ???? ?? ???? ?? ??? ??? ?????.
1) Services UI
4. Services
15
Actions ??? ?? ???? ?? ??? ? ?? ??, ?? ???? ????? ??, ?? ????? ???
????. ?? ??? ???? ?? ????? ??? ??? ? ????.
2) Service Actions
4. Services
1. Dashboard ?
? Services ?????
???? ?????.
2. Summary ? ???
? Service Actions ?
?? ???? ???
??? ?????. ?
? ??? ???? ?
? ?????.
16
?? ???? ???? ??? Quick Links ??? ?????. ?? ???? ??? ?? ? UI? ???? ?
????.
3) Services Quick Links
4. Services
? Job History - MapReduce ?? ??
? Resource Manager - YARN ResourceManager UI
? NameNode - HDFS(Hadoop Distributed File System) NameNode UI
? Oozie Web UI - Oozie UI
17
View? 3rd Party API ? UI? ?? ?????? Ambari? ???? ?????. Hortonworks Ambari???
????? HDFS, YARN, HIVE ?? ?? View? ?????.
1) View UI
5. View
? Yarn ? ???: ? ???? YARN ?? ?? ???? ?? ??? UI?
?????.
? Hive ?: Hive ?? ???? ? ?????? ?? Hive ??? ??? ?
????. ??? ???? ?? ???? ???? ???? ??? ??
??? ?? ???? ????? ? ????.
18
Manage ???? Cluster? ????, Group & Role ??, View ?? ?? ??? ??? ? ????.
1) Manage UI
6. Manage
19
User + Group Management ???? Ambari? Group & Role ?? ??? ??? ? ????.
2) User + Group Management UI
6. Manage
20
Versions ???? Hadoop Cluster? ?? ?? ?? ? Repository ??? ? ? ????.
3) Versions
6. Manage
21
1) Ambari Server ??? & postgresql ???
[??] Ambari ??? ???
1. Ambari Server ???
# ssh hdm1
# su - root
# ambari-server restart
Using python /usr/bin/python
Restarting ambari-server
Waiting for server stop...
Ambari Server stopped
Ambari Server running with administrator privileges.
Organizing resource files at /var/lib/ambari-server/resources...
Ambari database consistency check started...
Server PID at: /var/run/ambari-server/ambari-server.pid
Server out at: /var/log/ambari-server/ambari-server.out
Server log at: /var/log/ambari-server/ambari-server.log
Waiting for server start.................................................
Server started listening on 8080
2. postgresql ???
# ssh hdm1
# su - root
# service postgresql restart
22
2) Ambari Agent ???
[??] Ambari ??? ???
## ?? ???? ????? ??
# su - root
>> ambari-agent restart
[hdm1] Restarting ambari-agent
[hdm1] Verifying Python version compatibility...
[hdm1] Using python /usr/bin/python
[hdm1] Found ambari-agent PID: 50225
[hdm1] Stopping ambari-agent
[hdm1] Removing PID file at /run/ambari-agent/ambari-agent.pid
[hdm1] ambari-agent successfully stopped
[hdm1] Verifying Python version compatibility...
[hdm1] Using python /usr/bin/python
[hdm1] Checking for previously running Ambari Agent...
[hdm1] Starting ambari-agent
[hdm1] Verifying ambari-agent process status...
[hdm1] Ambari Agent successfully started
[hdm1] Agent PID at: /run/ambari-agent/ambari-agent.pid
[hdm1] Agent out at: /var/log/ambari-agent/ambari-agent.out
[hdm1] Agent log at: /var/log/ambari-agent/ambari-agent.log
Service ?? ??
# curl -u admin:admin -X GET http://[SERVER_HOSTNAME]:8080/api/v1/clusters/ [CLUSTER_NAME] /services/[SERVICE_NAME]
# curl -u admin:admin -X GET http://192.168.11.148:8080/api/v1/clusters/prum/services/HAWQ
Service ??
# curl -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '{"RequestInfo":{"context":"Stop Service via REST
"},"Body":{"ServiceInfo":{"state":"INSTALLED"}}}' http:// [SERVER_HOSTNAME] :8080/api/v1/clusters/[CLUSTER_NAME]/services/ [SERVICE_NAME]
curl -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '{"RequestInfo":{"context":"Stop Service via REST
"},"Body":{"ServiceInfo":{"state":"INSTALLED"}}}' http://192.168.11.148:8080/api/v1/clusters/prum/services/HAWQ
Service ??
# curl -u admin:admin -i -H 'X-Requested-By: ambari' -X PUT -d '{"RequestInfo": {"context" :"Start Service via REST"}, "Body": {"ServiceInfo": {"state":
"STARTED"}}}' http:// [SERVER_HOSTNAME] :8080/api/v1/clusters/[CLUSTER_NAME]/services/ [SERVICE_NAME]
# curl -u admin:admin -i -H 'X-Requested-By: ambari' -X PUT -d '{"RequestInfo": {"context" :"Start Service via REST"}, "Body": {"ServiceInfo": {"state":
"STARTED"}}}' http://hdm1.gphd.local:8080/api/v1/clusters/sdi/services/HDFS
Configuration ??
- ??? : delete ? Ambari UI ??? ?? ?? ?, set? ???? ?? ?? ??
- set? ???? ?? ? Advanced? ???? ?? ?? Custom?? ?? ?, ?? ??? Advanced ?? ????
# /var/lib/ambari-server/resources/scripts/configs.sh [set|get|delete] [hostname] [clustername] [config_file_name] [config_key] [config_value]
# /var/lib/ambari-server/resources/scripts/configs.sh set localhost sdi mapred-site "mapreduce.map.memory.mb" "512"
# /var/lib/ambari-server/resources/scripts/configs.sh get localhost sdi mapred-site
# /var/lib/ambari-server/resources/scripts/configs.sh delete localhost sdi mapred-site "mapreduce.map.memory.mb¡°
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=41812517
23
Apache Ambari? REST API? ?? ???? ??? ?? ?????.
1) Ambari REST API
[??] Ambari REST API

More Related Content

Apaceh Ambari Overview

  • 1. Apache Ambari ??? ?? ??? filfal2001@gmail.com
  • 3. Ambari page? http://[AMBARI_SERVER_HOST_NAME]:8080 ?? ??? ? ????. Admin ??? ?? ??? ID : admin, PASS : admin ???. 1) Ambari Dashboard UI 1. Ambari Dashboard 3 * Ambari server Port ??? /etc/ambari-server/conf/ambari.properties? client.api.port ??? ?? ?? ??
  • 4. 4 Ambari UI ???? ??? ?? ?? ?? ????. ? ????? ?? ?? ? ???? ???? ????. 2) Status Bar 1. Ambari Dashboard ?Ambari ?? - ????? ?????? ? ??? ? ?? ????? ???. ????? ?? # ops - ?? ?? Ambari ?? ?? ?????. ???? ?? ?? # ops? ???? ????? ?? ??? ?????. ?# alerts - ????? ?? ?? ?? ??? ??(?? ??)? ?????. ?Dashboard - ????? ?????. ?Services - ????? ???? ?? ?? ? ?? ?????. ?Hosts - ????? ??? ?? ?? ? ?? ?????. ?Alerts - ??, ?? ? ??? ??? ?? ?????. ?Admin - ????? ??? ????? ??/???, ??? ?? ?? ? Kerberos ?? ??? ?????. ?Admin ?? - Ambari ??, ??? ?? ? ?? ?????.
  • 5. ????? Metrics ?? ????? ??? ? ?? ?? ???? ? ?? ??? ??? ?????. CPU Usage? ?? ?? ??? ???? ?? ??? ?????. 1) Ambari Dashboard UI 1. Ambari Dashboard 5
  • 6. Heatmaps ?? ???? ????? ??? ????? ???? ?????. 1) Ambari Dashboard UI 1. Ambari Dashboard 6
  • 7. 7 Alerts ??? Ambari?? ???? ???? ?? ??? ?????. 1) Alerts UI 2. Alerts ? OK ? Warning ? CRITICAL ? UNKNOWN
  • 8. 8 Action ??? ???? Manage Alert Groups? ???? Alert ??? ??? ? ????. 2) Manage Alert Group 2. Alerts
  • 9. 9 Action ???? ?? ??? ???? ?? ??? ?? ?? ????. ?? ??? ???? e-mail ?? SNMP? ?? ??? ?? ? ????. 3) Create Alert Notification 2. Alerts
  • 10. 10 ???? ?? ??? ?? ??? ??? ???? ?????. ?? ?? ?? ?? ?? ??? ???? ??? ?? ?? ??, component ???, component ?? ?? ??? ? ? ????. 1) Hosts UI 3. Hosts
  • 11. 11 Hosts ???? ??? ?? ??? ??? ? ????. 2) Host Actions 3. Hosts Actions ??? ???? ??? ??? ?????. ? Start all components - ????? ?? ?? ??? ?????. ? Stop all components - ????? ?? ?? ??? ?????. ? Restart all components - ????? ?? ?? ?? ? ???? ?????. ? Turn on maintenance mode - ???? ?? ??? ???? ????. ??? ???? ??? ???? ?? ? ??? ????? ???. ?? ?? ???? ???? ?????. ? Turn off maintenance mode - ???? ?? ?? ? ?? ?????. ? Stop - ????? DataNode ?? NodeManagers? ?????. ? Start - ????? DataNode ?? NodeManagers? ?????. ? Restart - ????? DataNode ?? NodeManagers ? ???? ?????. ? Decommission - ???? ?????? ?????. ? Recommission - ??? ???? ??? ???? ????? ?????.
  • 12. 12 ????? Services ?? ??? ?????? ???? ??? ??? ?? ?? ??? ?????. ??? ???? ???? ?? ?? ?? ??? ???? ? ?????. 1) Services UI 4. Services
  • 13. 13 ????? Services ?? ??? ?????? ???? ??? ??? ?? ?? ??? ?????. ??? ???? ???? ?? ?? ?? ??? ???? ? ?????. 1) Services UI 4. Services ???? ?? ??? ????? ??? ?? ???? ?? ??? ???? ?? ???? ???? ?????.
  • 14. 14 ?? ???? ???? ?? ???? ?? ??? ??? ?????. 1) Services UI 4. Services
  • 15. 15 Actions ??? ?? ???? ?? ??? ? ?? ??, ?? ???? ????? ??, ?? ????? ??? ????. ?? ??? ???? ?? ????? ??? ??? ? ????. 2) Service Actions 4. Services 1. Dashboard ? ? Services ????? ???? ?????. 2. Summary ? ??? ? Service Actions ? ?? ???? ??? ??? ?????. ? ? ??? ???? ? ? ?????.
  • 16. 16 ?? ???? ???? ??? Quick Links ??? ?????. ?? ???? ??? ?? ? UI? ???? ? ????. 3) Services Quick Links 4. Services ? Job History - MapReduce ?? ?? ? Resource Manager - YARN ResourceManager UI ? NameNode - HDFS(Hadoop Distributed File System) NameNode UI ? Oozie Web UI - Oozie UI
  • 17. 17 View? 3rd Party API ? UI? ?? ?????? Ambari? ???? ?????. Hortonworks Ambari??? ????? HDFS, YARN, HIVE ?? ?? View? ?????. 1) View UI 5. View ? Yarn ? ???: ? ???? YARN ?? ?? ???? ?? ??? UI? ?????. ? Hive ?: Hive ?? ???? ? ?????? ?? Hive ??? ??? ? ????. ??? ???? ?? ???? ???? ???? ??? ?? ??? ?? ???? ????? ? ????.
  • 18. 18 Manage ???? Cluster? ????, Group & Role ??, View ?? ?? ??? ??? ? ????. 1) Manage UI 6. Manage
  • 19. 19 User + Group Management ???? Ambari? Group & Role ?? ??? ??? ? ????. 2) User + Group Management UI 6. Manage
  • 20. 20 Versions ???? Hadoop Cluster? ?? ?? ?? ? Repository ??? ? ? ????. 3) Versions 6. Manage
  • 21. 21 1) Ambari Server ??? & postgresql ??? [??] Ambari ??? ??? 1. Ambari Server ??? # ssh hdm1 # su - root # ambari-server restart Using python /usr/bin/python Restarting ambari-server Waiting for server stop... Ambari Server stopped Ambari Server running with administrator privileges. Organizing resource files at /var/lib/ambari-server/resources... Ambari database consistency check started... Server PID at: /var/run/ambari-server/ambari-server.pid Server out at: /var/log/ambari-server/ambari-server.out Server log at: /var/log/ambari-server/ambari-server.log Waiting for server start................................................. Server started listening on 8080 2. postgresql ??? # ssh hdm1 # su - root # service postgresql restart
  • 22. 22 2) Ambari Agent ??? [??] Ambari ??? ??? ## ?? ???? ????? ?? # su - root >> ambari-agent restart [hdm1] Restarting ambari-agent [hdm1] Verifying Python version compatibility... [hdm1] Using python /usr/bin/python [hdm1] Found ambari-agent PID: 50225 [hdm1] Stopping ambari-agent [hdm1] Removing PID file at /run/ambari-agent/ambari-agent.pid [hdm1] ambari-agent successfully stopped [hdm1] Verifying Python version compatibility... [hdm1] Using python /usr/bin/python [hdm1] Checking for previously running Ambari Agent... [hdm1] Starting ambari-agent [hdm1] Verifying ambari-agent process status... [hdm1] Ambari Agent successfully started [hdm1] Agent PID at: /run/ambari-agent/ambari-agent.pid [hdm1] Agent out at: /var/log/ambari-agent/ambari-agent.out [hdm1] Agent log at: /var/log/ambari-agent/ambari-agent.log
  • 23. Service ?? ?? # curl -u admin:admin -X GET http://[SERVER_HOSTNAME]:8080/api/v1/clusters/ [CLUSTER_NAME] /services/[SERVICE_NAME] # curl -u admin:admin -X GET http://192.168.11.148:8080/api/v1/clusters/prum/services/HAWQ Service ?? # curl -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '{"RequestInfo":{"context":"Stop Service via REST "},"Body":{"ServiceInfo":{"state":"INSTALLED"}}}' http:// [SERVER_HOSTNAME] :8080/api/v1/clusters/[CLUSTER_NAME]/services/ [SERVICE_NAME] curl -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '{"RequestInfo":{"context":"Stop Service via REST "},"Body":{"ServiceInfo":{"state":"INSTALLED"}}}' http://192.168.11.148:8080/api/v1/clusters/prum/services/HAWQ Service ?? # curl -u admin:admin -i -H 'X-Requested-By: ambari' -X PUT -d '{"RequestInfo": {"context" :"Start Service via REST"}, "Body": {"ServiceInfo": {"state": "STARTED"}}}' http:// [SERVER_HOSTNAME] :8080/api/v1/clusters/[CLUSTER_NAME]/services/ [SERVICE_NAME] # curl -u admin:admin -i -H 'X-Requested-By: ambari' -X PUT -d '{"RequestInfo": {"context" :"Start Service via REST"}, "Body": {"ServiceInfo": {"state": "STARTED"}}}' http://hdm1.gphd.local:8080/api/v1/clusters/sdi/services/HDFS Configuration ?? - ??? : delete ? Ambari UI ??? ?? ?? ?, set? ???? ?? ?? ?? - set? ???? ?? ? Advanced? ???? ?? ?? Custom?? ?? ?, ?? ??? Advanced ?? ???? # /var/lib/ambari-server/resources/scripts/configs.sh [set|get|delete] [hostname] [clustername] [config_file_name] [config_key] [config_value] # /var/lib/ambari-server/resources/scripts/configs.sh set localhost sdi mapred-site "mapreduce.map.memory.mb" "512" # /var/lib/ambari-server/resources/scripts/configs.sh get localhost sdi mapred-site # /var/lib/ambari-server/resources/scripts/configs.sh delete localhost sdi mapred-site "mapreduce.map.memory.mb¡° https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=41812517 23 Apache Ambari? REST API? ?? ???? ??? ?? ?????. 1) Ambari REST API [??] Ambari REST API