Apache Ambari Interview Questions and Answers

The Apache Ambari project is aimed at making Hadoop management simpler by developing software for provisioning, managing, and monitoring Apache Hadoop clusters. Ambari provides an intuitive, easy-to-use Hadoop management web UI backed by its RESTful APIs.

Ambari enables System Administrators to:

Provision a Hadoop Cluster

Ambari provides a step-by-step wizard for installing Hadoop services across any number of hosts. Ambari handles configuration of Hadoop services for the cluster.

Manage a Hadoop Cluster

Ambari provides central management for starting, stopping, and reconfiguring Hadoop services across the entire cluster.

Monitor a Hadoop Cluster

Ambari provides a dashboard for monitoring health and status of the Hadoop cluster.

Ambari leverages Ambari Metrics System for metrics collection.

Ambari leverages Ambari Alert Framework for system alerting and will notify you when your attention is needed (e.g., a node goes down, remaining disk space is low, etc).


1) What is Apache Ambari?


Answer)Apache Ambari is an open-source software to install, manage and monitor Apache Hadoop family of components. It automates many of the basic actions performed and provides a simple and easy to use UI.


2) How does Ambari work?


Answer) Hadoop and its ecosystem of software are typically installed as a multi-node deployment. Ambari has a two level architecture of an Ambari Server and an Ambari agent. Ambari Server centrally manages all the agents and sends out operations to be performed on individual agents. Agents are installed by the server on each node (host) which in turn installs, configures and manages services in the agent


3) What are Services?


Answer) Services are the various components of the Hadoop ecosystem such as HDFS, YARN, Hive, HBase, Oozie, Druid, etc. One of the most popular open-source Hadoop distributions is the Hortonworks Data Platform (HDP)


4) How is a stack like HDP installed by Ambari?


Answer) Each version of HDP corresponds to a version of Ambari which supports the HDP version.

The latest Ambari version can be ascertained from docs.hortonworks.com

Once the Ambari repository is downloaded and installed, Ambari shows the list of HDP versions it supports.

Ambari also guides the users through an installation wizard which requests the users for details like the services to be installed, on which node, etc.


5) Ok, Ambari installed HDP. What else can it do?


Answer) Ambari can also monitor and manage various services on Hadoop. For example, Ambari can start/stop services it manages, a user can add additional services, delete services, etc.

The user can also get metrics/data about the health of the various services managed by Ambari

Ambari also provides Views into some of the components like Hive, HBase, Pig, HDFS, etc., where a user can run queries and various jobs.

Ambari also provides the users to edit their the service configurations and version those configurations so that at a later point in time, they can be restored if the changed configuration causes issues.


6) Where do I download the latest repositories for Ambari?


Answer)For obtaining Ambari package with HDP cluster definitions, go to https://docs.hortonworks.com/ - select version - Apache Ambari Installation - Obtaining Public Repositories - Ambari Repositories Get the appropriate repository for the OS required


7) Can Ambari upgrade HDP? How do I decide when to upgrade? Can I upgrade only specific service?


Answer) Yes Ambari can upgrade HDP. You can upgrade when a new release of HDP is announced by Hortonworks or if you’re looking for a specific feature which has landed in a new version of HDP. Upgrading only 1 service as part of cluster upgrade is not supported, however you can apply patch or maintenance upgrades to 2.6.4.x stack to a specific service.


8)Does Ambari support other stacks like HDF?


Answer)Yes. Other than HDP, Ambari paackage from Hortonworks supports other stacks like HCP.


9)How do I secure my cluster using Ambari?


Answer)Kerberos authentication can be enabled from Ambari for network security

Install Ranger and Configure basic authorization in Ranger from Ambari

Ambari can be configured to use Knox SSO

You can setup SSL for Ambari


10)Does Ambari support HA?


Answer) Not as of now. However, one can setup an active-passive ambari-server instance. Refer to the article for more details. Ambari Server HA is planned in a future release of Ambari: AMBARI-17126


11)Where is the Ambari codebase? I heard its open source


Answer)Apache Ambari is completely open source with an Apache license. The code base is available in github.


12) How can I contribute to Ambari?


Answer) This wiki document explains how to contribute to Ambari


13) I want to perform scheduled maintenance on some of my cluster nodes? How will Ambari react to it? Stuff like adding a disk, replacing a node etc.


Answer)In Ambari, there is a maintenance mode option for all the services/hosts managed by it. One can switch on maintenance mode for the host/service affected by the maintenance which suppresses the alerts, and safely perform the maintenance operations.


14) How does Ambari decide the order in which various components should be installed on respective nodes?


Answer)Within Ambari, there is a finite state machine and a command orchestrator which manages all the dependencies of various components within it.


15)What is the significance of “ambari-qa” user?


Answer)'ambari-qa' user account is created by Ambari on all nodes in the cluster. This user performs a service check against cluster services as part of the install process. You can refer to the list of other users created while cluster installation.


16)I changed a config in a service and Ambari provided some recommendations for changes in other services, where are such recommendations coming from?


Answer)These recommendations are provided by a component called StackAdvisor. It is responsible for recommending various configurations at installation time and also maintaining the dependencies for the various services managed by Ambari.


17)How do I customize the configurations in Ambari Server?


Answer) ambari.properties is located at /etc/conf/ambari-server/ambari.properties

There are a set of properties with jdbc in the key. This is to configure the ambari database.

There are another set of properties related to jdk and configuring the java version for ambari

Another set of properties starting with “views” for configuring behaviour of ambari views.

Security related configurations appear with the keyword “kerberos”, “security”, “jce”, etc

You can run the ambari-server as a non-root user by specifying the username in “ambari-server.user”

You can also specify timeouts for the common ambari installation tasks, e.g.: agent.package.install.task.timeout, agent.service.check.task.timeout, agent.task.timeout, server.task.timeout

One can also set the time an Ambari login can be active by specifying the time in server.http.session.inactive_timeout


18)Can Ambari manage more than one cluster?


Answer)As of now, an Ambari instance can manage only one cluster. However, you can remotely view the “views” of another cluster in the same instance. You can read this blog post for more information


19)I have a Hadoop cluster. How can I start managing under Ambari ?


Answer)If the cluster is not yet in production, clean up the cluster and install the cluster from scratch using Ambari, (after backing up the data, of course).

If it production critical, then:

Setup ambari-server and ambari database

Install Update ambari-agents to point to the ambari-server

Use Ambari APIs to perform cluster takeover i.e. add cluster, add hosts, register services and components, register host components. Refer here for Ambari APIs

An alternative is to create an Ambari blueprint based on the current configuration and install the Cluster on Ambari using the blueprint.


20)Does Ambari authentication work with SSO?


Answer)Yes. You can use Knox SSO for connecting to an IDP for Ambari authentication.


21)What is first place to start troubleshooting an Ambari issue?


Answer)Verify if ambari-server is up and running and ambari-server is able to communicate to all the ambari-agents.

Perform a ambari database consistency check to make sure there are no database consistency errors. Run the following command on the ambari-server: ambari-server check-database

Ambari server logs available at /var/log/ambari-server/ambari-server.log

Ambari agent logs available at /var/log/ambari-agent/ambari-agent.log

Ambari Agent task logs on any host with an Ambari Agent: /var/lib/ambari-agent/data/

This location contains logs for all tasks executed on an Ambari Agent host. Each log name includes:

command-N.json - the command file corresponding to a specific task.

output-N.txt - the output from the command execution.

errors-N.txt - error messages.

You can configure the logging level for ambari-server.log by modifying /etc/ambari-server/conf/log4j.properties on the Ambari Server host. For the Ambari Agents, you can set the loglevel in/etc/ambari-agent/conf/ambari-agent.ini on each host running an Ambari Agent.

You could also take a look at the troubleshooting guide for specific issues while installation, usage/upgrading a cluster using Ambari


22)HDP installation via Ambari failed. What options do I have?


Answer)Try to re-run the steps from the Ambari console

Restore to a previous snapshot, if available

If your issue is not yet resolved, raise a support case if you’re a Hortonworks customer or post a question on HCC for further help


23)What if Ambari server host crashes? Recovery options?


Answer)Maintaining a backup of Ambari Database for any changes to the cluster configuration is always recommended.

If a backup is maintained, you can recover the host and install ambari-server afresh by pointing to the recovered database.

If there is no backup, Ambari takeover can be performed by manually adding the hosts, cluster and services installed via Ambari APIs. Refer here for list of Ambari APIs and their functions


24)What happens when a node in a cluster running a master service component crashes?


Answer)One can attempt to recover the host via the ‘Recover Host’ option from the Ambari Web UI.


25)What happens when a node in a cluster running a slave service component crashes?


Answer)One can attempt to recover the node (after recovering it manually) by performing the action ‘Recover Host’ from the Ambari UI.

If the above action does not restore the cluster to its original state, follow the following steps:

Clean up the ambari-agent and all other files on the node.

Perform the ‘Add Host’ operation via Ambari UI to register the node as a new Node

Select the master/slave components to be installed as part of the ‘Add Host’ wizard


Launch your GraphyLaunch your Graphy
100K+ creators trust Graphy to teach online
Learn Bigdata, Spark & Machine Learning | SmartDataCamp 2024 Privacy policy Terms of use Contact us Refund policy