Showing posts with label server. Show all posts
Showing posts with label server. Show all posts

January 03, 2022

Top 20 Apache Tomcat Interview Questions and Answers


       Tomcat is a Java Servlet container and web server developed by the Apache Software Foundation's Jakarta project. Client browsers send queries to a web server, which the server answers to with web pages. Web servers can generate dynamic content based on the user's requests. Because it supports both Java servlet and JavaServerPages (JSP) technologies, Tomcat excels at this. Even if a free servlet and JSP engine is required, Tomcat can be utilised as a web server for a variety of applications. It can run on its own or alongside standard web servers like Apache httpd, delivering static pages while Tomcat handles dynamic servlet and JSP queries.

    Apache Tomcat is an open source Java Servlet, JavaServer Pages, Java Expression Language, and Java WebSocket implementation platform. Many firms are hiring Devops engineers, Apache Tomcat administrators, Linux Apache Tomcat jobs, and Hadoop developers at varying levels of experience. The most popular Web server is Apache, and you must be familiar with it if you plan to work as a Middleware/System/Web administrator. Apache HTTP is a free and open-source web server that runs on Windows and Linux.

 Apache Kafka Interview Questions and Answers

Ques. 1): Who is in charge of Tomcat?


The Apache Software Foundation is the correct answer. The Apache Software Foundation is a non-profit organisation that oversees several Open Source projects.

The Apache Software Foundation's Java-based projects are referred to as Jakarta.

Tomcat is an Apache Jakarta project that manages server-side Java (in the form of Servlets and JSPs). Tomcat is the "reference" implementation of the Servlet and JSP specifications, which means that anything that runs in Tomcat should run in any compliant Servlet / JSP container.

 Apache Tapestry Interview Questions and Answers

Ques. 2): Difference between apache and apache-tomcat server?


Apache: Apache is mostly used to serve static content, but there are numerous add-on modules (some of which are included with Apache) that allow it to modify the content and serve dynamic content written in Perl, PHP, Python, Ruby, and other languages.

Apache is an HTTP server that serves HTTP requests.

Tomcat is a servlet/JSP container developed by Apache. It's written in the Java programming language. Although it can provide static information, its primary function is to host servlets and JSPs.

JSP files (which are comparable to PHP and older ASP files) are converted into Java code (HttpServlet), which is then compiled into.class files and run by the Java virtual machine by the server.

Apache Tomcat is used to deploy your Java Servlets and JSPs. So in your Java project, you can build your WAR (short for Web ARchive) file, and just drop it in the deploy directory in Tomcat.

Although it is possible to get Tomcat to run Perl scripts and the like, you wouldn’t use Tomcat unless most of your content was Java.

Tomcat is a Servlet and JSP Server serving Java technologies

 Apache Ambari interview Questions & Answers

Ques. 3):  What exactly is Coyote?


Coyote is a Tomcat Connector component that acts as a web server and supports the HTTP 1.1 protocol. This enables Catalina, which is ostensibly a Java Servlet or JSP container, to additionally serve local files as HTTP documents.

Coyote monitors a specific TCP port for incoming connections to the server and transmits the request to the Tomcat Engine, which processes the request and returns a response to the requesting client.

Coyote is Tomcat's HTTP connector, which offers an interface for browsers to connect to.

 Apache Hive Interview Questions & Answers

Ques. 4): What is a servlet container?


A servlet container is a web server component that communicates with Java servlets. The servlet container is in charge of managing servlet lifecycles, mapping URLs to specific servlets, and ensuring that the URL requester has the appropriate access privileges.

Requests to servlets, JavaServer Pages (JSP) files, and other types of files containing server-side code are handled by the servlet container. The Web container generates servlet instances, loads and unloads servlets, creates and manages request and response objects, and handles other servlet-related operations.

The web component contract of the Java EE architecture is implemented by the servlet container, which defines a runtime environment for web components that includes security, concurrency, lifecycle management, transaction, deployment, and other services.

Apache Spark Interview Questions & Answers 

Ques. 5): How Do I Can Change The Default Home Page Loaded By Tomcat?

Answer :

We can easily override home page via adding welcome-file-list in application $TOMCAT_HOME/webapps//WEB-INF /web.xml file or by editing in container $TOMCAT_HOME/conf/web.xml

In $TOMCAT_HOME/conf/web.xml, it may look like this:




Request URI refers to a directory, the default servlet looks for a "welcome file" within that directory in following order: index.html, index.htm and index.jsp

Apache NiFi Interview Questions & Answers 

Ques. 6): what is a difference between Apache and Nginx web server?


Both are classified as Web Servers, but there are a few key differences. Nginx is an event-driven web server, whereas Apache is a process-driven web server.

Nginx has a reputation for being faster than Apache.

Whereas Nginx does not support OpenVMS or IBMi, Apache supports a wide range of operating systems.

Nginx is still catching up to Apache in terms of module interoperability with backend application servers.

Nginx is a lightweight web server that is rapidly gaining market share. If you're new to Nginx, you might be interested in reading some of my Nginx articles.

 Apache Ant Interview Questions and Answers

Ques. 7): How Do You Create Multiple Virtual Hosts?

Answer :

If you want tomcat to accept requests for different hosts e.g. then you must

Create ${catalina.home}/www/appBase , ${catalina.home}/www/deploy, and ${catalina.home}/conf/Catalina/

Add a host entry in the server.xml file

Create the the following file under conf/Catalina/

Add any parameters specific to this hosts webapp to this context file

Put your war file in ${catalina.home}/www/deploy

When tomcat starts, it finds the host entry, then looks for any context files and will start any apps with a context.


Ques. 8): In Apache Tomcat, what is Catalina?


Once Jasper has completed the compilation, it turns JSP into a servlet, which Catalina can then manage. Catalina is a servlet container for Tomcat. It also implements all of the Java server page and servlet specs. Catalina is a Java engine embedded into Tomcat that provides an efficient environment for servlets to execute in.


Ques. 9): What exactly do you mean by Tomcat's default port, and can it be used with SSL?


Tomcat uses port 8080 as its default port. Well, you can change it by editing the server.xml file in the Tomcat install directory's conf folder. By adjusting the property to the desired port connection port="8080" and then restarting Tomcat, the modifications will take effect.

Tomcat can use SSL, but it will require some configuration. You must complete the following tasks:

Generate a keystore

Then add a connector in server.xml

Restart Tomcat


Ques. 10): What is a mod_evasive module, and what does it do?


Mod_evasive is a third-party module that accomplishes one simple task really well. It identifies when your site is under attack by a Denial of Service (DoS) attack and mitigates the harm that the attack causes. When a single client makes repeated requests in a short period of time, mod evasive recognises this and refuses additional requests from that client. The ban can last for a very short time because it is simply reissued the following time a request is discovered from that same host.


Ques. 11): Explain Directory Structure Of Tomcat?

Answer :

Directory structure of Tomcat are:

bin - contain startup, shutdown, and other scripts (*.sh for UNIX and *.bat for Windows systems) and some jar files also there.

conf - Server configuration files (including server.xml) and related DTDs. The most important file in here is server.xml. It is the main configuration file for the container.

lib - contains JARs those are used by container and Servlet and JSP application programming interfaces (APIs).

logs - Log and output files.

webapps – deployed web applications reside in it .

work - Temporary working directories for web applications and mostly used during in JSP compilation where JSP is converted to a Java servlet.

temp - Directory used by the JVM for temporary files .


Ques. 12): Explain How Running Tomcat As A Windows Service Provides Benefits?

Answer :

Running Tomcat as a windows service provides benefits like:

Automatic startup: It is crucial for environment where you may want to remotely re-start a system after maintenance

Server startup without active user login: Tomcat is run oftenly on blade servers that may not even have an active monitor attached to them. Windows services can be started without an active user

Security: Tomcat under window service enables you to run it under a special system account, which is protected from the rest of the user accounts


Ques. 13): How Do Servlet Life Cycles Work?


The life-cycle of a typical Tomcat servlet is as follows:

Through one of its connectors, Tom-cat receives a request from a client.

This request will be processed. This request is routed through Tomcat to the proper server.

Tomcat checks that the servlet class has been loaded after the request has been forwarded to the proper servlet. If it isn't, Tomcat wraps the servlet in Java Bytecode, which is executed by the JVM and creates a servlet instance.

The servlet is started by Tomcat by invoking its init method. The servlet includes code that can inspect Tomcat configuration files and take appropriate action, as well as declare any resources it might need.

Once the servlet has been started, Tomcat can call the servlet’s service method to proceed the request

Tomcat and the servlet can co-ordinate or communicate through the use of listener classes during the servlet’s lifecycle, which tracks the servlet for a variety of state changes.

To remove the servlet, Tomcat calls the servlets destroy method.


Ques. 14): In Tomcat, what is the difference between a host and a context?


In Tomcat, the host is a component. It's a network name association for the server. On the other hand, context is an element that indicates a web application that is running on a certain virtual host. Web applications are built on top of a Web Application Archive (WAR) file or a corresponding directory that contains all of the unpacked content indicated in the servlet description.


Ques. 15): What Is The Distinction Between A Webserver And An Application Server?


The main distinction between a web server and an application server is that a web server can only execute web applications, such as servlets and JSPs, and has just one container, the Web container, that is used to understand and execute web applications. The application server has the ability to run Enterprise applications, i.e. (servlets, jsps, and EJBs)

it is having two containers:

Web Container(for interpreting/executing servlets and jsps)

EJB container(for executing EJBs).

it can perform operations like load balancing , transaction demarcation etc.


Ques. 16): Apart from Apache Tomcat, what are the different kinds of Web Servers?


There are many web servers as mentioned below:

LiteSpeed Web Server

GWS Web Server

Microsoft IIS Web Server

Nginx Web Server

Jigsaw Web Server

Sun Java System Web Server

Lighttpd Web Server


Ques. 17): How to limit upload size?


I have a web application that allows users to upload files such as word documents, pdf and so on.  How do I limit file upload by users?

You can make use of the LimitRequestBody directive to limit upload file size.

<Directory "usr/local/apache2/uploads">

LimitRequestBody 9000


The value assigned to the LimitRequestBody allows Apache to accept and store file uploads of 9000 bytes by users. You can adjust the value based on the requirement.


Ques. 18): Explain how to use WAR files to deploy a web application.


JSPs, servlets, and their associated files are placed under Tomcat's web applications directory in the appropriate subdirectories. You can combine all of the files in the web apps directory into a single compressed file with the extension.war. A web application can be run by placing a WAR file in the webapps directory. When a web server starts up, it extracts the contents of the WAR file and places them in the proper webapps sub-directories.


Ques. 19): How can an Apache Service be stopped by its control script?


The Apache Service is controlled using a script called the apachectl.

So, to stop the service, we need to run the below-mentioned commands.

#apachectl stop [for Ubuntu based system]

# /etc/inid.t/httpd.stop [for red hat based system]


Ques. 20): What is the purpose of the Listen property in Apache Tomcat?

Listening is very important for Apache Tomcat and the developers.

If a developer has numerous IPs on the server, we must explicitly indicate IP and PORT in the Listen Drive if we want Apache to evaluate only one of them.

For example:



November 22, 2021

Top 20 Aws Cloud Support Engineer Interview Question & Answers


Ques: 1). What is the purpose of Amazon Web Services (AWS) cloud services?


"Storage," as this is the primary purpose of AWS cloud services. Customers can store several types of material on the Amazon online service, including videos, music files, movies, images, files, and documents. This is a common AWS cloud support engineer interview question that can be asked during the main portion of your interview.


BlockChain Interview Question and Answers

Ques: 2). In what way does Amazon Web Services appear to be ideal?


This is a very basic but common AWS Cloud Support Engineer interview question, and the candidate's response can be stated as follows:

The Amazon Web Servers are capable of performing a wide range of tasks. Customers can select the level of assistance and support they require from AWS based on the services they desire. Amazon Web Service (AWS) provides the following services:

  • High storage
  • Monitoring & Analytics
  • Security and safety
  • Networking
  • Databases
  • Compute power

These services will always be there for the clients of Amazon Web Services. For more details about the services, you can browse the official web page of Amazon Web Service (AWS).

AWS RedShift Interview Questions & Answers

Ques: 3). What Attracts You To This Position?


I want to help the company grow and level up by providing safe database storage, content distribution, cloud services, and computer power. I've also been keeping up with your company's recent trends, and I've seen that what you're doing is exactly what I'm interested in. I'm excited to be a part of your team. I believe this position will provide me with a tremendous opportunity to help you improve in this field.

AWS Lambda Interview Questions & Answers

Ques: 4). What networking commands do you use on a daily basis to troubleshoot problems?


When working with servers, whether real or virtual, the first command that comes to mind is traceroute, which may be used to find the request response path taken. Tracert is the corresponding command on Windows platforms.

Ping, ipconfig, and ifconfig are some other useful commands that deal with network communication, network addresses, and interface settings.

DNS commands – nslookup, Lookup of /etc/resolv.conf file in Linux systems to get details on DNS

AWS Cloudwatch interview Questions & Answers

Ques: 5). Tell us about your proudest achievement.


My most significant accomplishment was in my former work as a cloud specialist. I worked for a firm that was experiencing a shortage of cloud professionals at the time. Adding more cloud professionals to the tea sounded expensive because the company was small. I recommended to the company's president how we could automate some tasks. I helped him because he didn't know what to do. Some operations, such as backups at specific intervals and resource pattern monitoring, become simple to automate. At the end of the day, the corporation was able to achieve its goal while spending very little money.

AWS Solution Architect Interview Questions & Answers

Ques: 6). What do you think the most difficult aspect of this job will be?


Lack of experience and resources will be one of the primary issues that businesses will encounter in the near future. Technology is rapidly advancing as firms continue to shift more workload to the cloud. It's becoming difficult to keep up with the correct tools. This has necessitated further training in order for me to be prepared to deal with these difficulties if they affect our organisation.

AWS DevOps Cloud Interview Questions & Answers

Ques: 7). What services does AWS typically provide to its customers?


Everyone knows that Amazon Web Services (AWS) is a very dependable and trusted web service. It's a safe and secure web or cloud services platform that may propel your company to new heights of success. This type of question is the most popular and falls under the category of Amazon Support Engineer interview questions. This means that you must first clear your fundamentals in order to pass or crack this interview. You can find such basic questions among AWS cloud interview questions if you are prepared for an AWS interview.

To assist its clients, AWS provides computational power, database storage, content distribution, and a variety of other related support services. Customers all around the world have already chosen the AWS platform, products, and solutions to develop dependable applications with increased flexibility and reliability. It's a fantastic IT infrastructure platform for both small and large organisations.

AWS(Amazon Web Services) Interview Questions & Answers

Ques: 8). When a person types the domain name into a web browser, how can you bring the website content back to them?


As you may be aware, every website has its own domain name system (DNS). As a result, the DNS and each website would be assigned a unique internet protocol or IP address. When entering a domain name into a web browser, the following scenarios may arise:

  • Your input or signal will be received as a request by the web server hosting services. Following that, the web server hosting firm will undoubtedly respond to your request with appropriate outcomes.
  • When you use a browser, it sends a request to the internet protocol address, which is linked to the domain name automatically.
  • The IP address is sometimes returned to the user by the domain name system.
  • To deliver back the website content to the users, the web browser will contact a domain name system.

The salary of a cloud support engineer in AWS is determined by your abilities and performance during the AWS support interview. So, if you want a higher income in your AWS work, make sure you answer the interviewer's questions properly and confidently.

AWS Database Interview Questions & Answers

Ques: 9). Give some instances of typical networking commands you've used.


It's worth noting that the AWS stack is mostly based on Linux, and its cloud design makes it extremely network-dependent. As a result, regardless of your history as a system administrator, database administrator, or bigdata administrator, your AWS interview could be about networking. Learn how to use these basic networking commands:

The first step when a system is unreachable is to ping the host to ensure it is up and functioning.

ping host – This pings the host and output results

Domain related commands as AWS has become preferred hosting for major itnernet based companies, SaaS firms

To get DNS information of the domain use – dig domain

To get whois information on domain use – whois domain

Host reverse lookup – dig -x host

Download file – wget file

To continue stopped download – wget -c file

ActiveMQ Interview Questions & Answers

Ques: 10). What does the term "fault tolerant" mean?


When a set number of failures and issues occur, the fault tolerant process is used to control or manage the faults. It's one of the AWS Cloud's most critical self-healing features. This has become a crucial Amazon AWS cloud support engineer interview question and answer because, while the question appears easy, the answer is really complex.

It is a system property that allows a system to work or continue to work in the face of numerous failures at any moment. It is a computer system capability that makes the work of users much more reliable. Such systems are intended to safeguard any present functional system against numerous failures that may occur at any given time. It ensures that any network or system maintains the needed level of continuity in order to avoid the negative effects of interruptions.


Ques: 11). What exactly is a procedure? In Linux, how do you manage processes: -


When a command is issued in a Linux/Unix based OS, a process is launched or created. In simple terms, an instance of a programme is produced while it is running in an operating system. This is how it works. Process management commands are useful in Linux for managing processes.

ps – this is the commonly used process management command to start with. ps command provides details on currently running active processes.

top – This command provides details on all running processes. ps command lists active processes whereas top lists all the processes (i.e) activity of processor in real-time. This includes details on processor and memory being used.

kill – To kill a process using the process id kill command is used. ps command provides details on process id. To kill a process issue kill pid.

killall proc – This command is same as kill command. To kill all the processes by name proc we can use this


Ques: 12). In Amazon Web Services, Emphasize The Importance Of Buffer.


An Elastic Load Balancer ensures that incoming traffic is spread as efficiently as possible across multiple AWS instances. A buffer will synchronise several components and make the setup more elastic in the event of a burst of load or traffic. The components are prone to receiving and processing requests in an unreliable manner. The buffer produces an equilibrium between diverse devices and crafts them to function at the same rate, allowing for faster service delivery.


Ques: 13). What Is An Amazon Web Services Availability Zone?


A collection of your AWS resources is made up of availability zones (within a region). For high availability and fault tolerance, properly built applications will use several availability zones. Each AZ has a low-latency direct connection to the others, and each AZ is separated from the others to ensure fault tolerance.


Ques: 14). What Happens When A User Types A Domain Name Into A Web Browser? 


A DNS server is contacted by the web browser, which requests the IP address associated with the domain name.

The IP address is returned to the Browser by the DNS server.

A request (for content) is sent by the browser to the IP address associated with the domain name.

The request is received by the web server holding web content, which then provides the web content back to the user.


Ques: 15). What are the various kinds of routing protocols?


The routing protocol is a crucial word that describes how different routers communicate. The routing protocol can be implemented by two nodes in a computer network. The following are some of the most often used routing protocols:

  • Routing information protocols (RIP)
  • Interior Gateway Protocol (IGP)
  • Open shortest path first (OSPF)
  • Exterior Gateway Protocol (EGP)
  • Border Gateway Protocol (BGP)
  • Intermediate system to intermediate system (IS-IS)

These are some of the most commonly utilised routing kinds among system users. The interviewer may pose this topic as one of the most typical AWS cloud support engineer interview questions. So, remove your doubts regarding the network, infrastructure, and other related topics before embarking on such interviews.


Ques: 16). What Does The Elasticity Concept Mean For AWS Consumers and Enterprise Users?


Elastic systems allow for the rapid addition and subtraction of servers as demand (user base) on a web application increases and drops. Getting rid of unused servers might save a lot of money.


Ques: 17). What is the primary distinction between a private and a public subnet?


A private subnet normally directs traffic to a NAT instance. In the private subnet, only private IP and internet traffic is routed. A public subnet, on the other hand, requires a public IP address to communicate. The major distinction between a private and a public subnet is this.


Ques: 18). How would you persuade a customer to switch to AWS?


These types of questions might be posed during your interview to assess your mental agility, persuasion power, and speaking ability. As a candidate, you must remain cool and optimistic under such circumstances. If this question is asked during your interview, you must respond honestly. You can state things like "I have experience dealing with such customers" and "I have knowledge and expertise dealing with such consumers," and so on in your response. You can persuade customers by describing the capabilities and advantages of using the AWS cloud. As a result, job candidates can readily respond to this question based on their degree of thinking and speaking ability.


Ques: 19). Do you understand how the internet works in your area?


There are several internet tiers and web servers available all over the world, which serve as the internet's communication path. Without the internet's ingenuity, sharing could not have progressed as quickly as it has. 

Circuit switching is a word used on the internet to describe how the internet works in your current context. Another internet technology is packet switching, which makes it much easier for the internet to communicate or distribute information. This is one of the most common AWS cloud support engineer interview questions because it gives you some fundamental internet knowledge.

Packing switching is the process of separating a single internet server into numerous servers. There is no requirement for a physical path for the computer. The internet's supporting equipment would be sufficient to enable better and more dependable internet sharing among a large number of computers.


Ques: 20). In Linux or UNIX-based operating systems, how can you easily manage processes?


When a user types a command into a Unix operating system, it starts working. When an operating system is started, an instance is created automatically. To manage processes in Linux OS, I would use the PS processing command. This command displays information about the currently running processes and activities. When running Linux, I can also use TOPIS as a process management tool. 

This command can be used to acquire statistics about the operating system's activity. To kill running processes, I would also use the Kill command. In a Linux-based operating system, press Ctrl+Alt+Del to terminate all programmes. I would use the killall command. With these commands, I would be able to take full control of the operating system and manage its processes effectively.



November 18, 2021

Top 20 MySQL Interview Questions & Answers


Ques: 1). I keep getting an error about a foreign key constraint failing when I run the DELETE statement. So, what do I do now?


This suggests that some of the data you're attempting to delete is still present in another table. For example, if you have a table for universities and a table for students, both of which contain the ID of the university they attend, deleting a university table will fail if the students table still contains people who are enrolled at that university. The proper procedure is to delete the offending data first, followed by the university in question. Running SET foreign key checks=0 before the DELETE operation and then adjusting the parameter back to 1 after the DELETE command would be a quick way.


Ques: 2). You created a search engine that should provide ten results at a time, but you also want to know how many rows there are in total. How are you going to show that to the user?


SELECT page title FROM web pages FROM SQL CALC FOUND ROWS LIMIT 1,10; 


The second query will tell you how many results there are (not that COUNT() is never utilised). the total, so you can put something like "Found 13,450,600 results, displaying 1-10" on the screen. It's worth noting that FOUND ROWS ignores the LIMITS you set and always returns the whole number of rows affected by the query.


Ques: 3). Differentiate between MyISAM Static and MyISAM Dynamic.


All fields in MyISAM static have a defined width. To handle data types of varied lengths, the Dynamic MyISAM table would have fields such as TEXT, BLOB, and so on. In the event of corruption, MyISAM Static would be easier to restore since, even if you lose some data, you know exactly where to search for the beginning of the next record.


Ques: 4). What are the benefits of MyISAM versus InnoDB?


Much more cautious disc space management - each MyISAM table is saved in its own file, which may subsequently be compressed using myisamchk if necessary. Tables in InnoDB are kept in tablespace, and there isn't much room for further optimization. Except for TEXT and BLOB, all data can only take up 8,000 bytes. InnoDB does not support full text indexing. Due to tablespace complexity, TRhe COUNT(*)s run slower than in MyISAM.


Ques: 5). What are MySQL's HEAP tables?


The HEAP tables are stored in memory. They're typically utilised for high-speed, short-term storage. Within HEAP tables, no TEXT or BLOB fields are permitted. Only the comparison operators = and => can be used. AUTO INCREMENT is not supported by HEAP tables. The indexes must not be NULL.


Ques: 6). Difference between primary key, unique key and candidate key.


Primary Key:- (i) It has unique value and it can’t accept null values.

(ii) We can have only one Primary key in a table.

Unique Key:- (i) It has unique value and it can accept only one null values.

(ii) We can have more than one unique key in a table.

Candidate Key:- candidate key full fill all the requirements of primary key which is not null and have unique records is a candidate for primary key. So thus type of key is known as candidate key. Every table must have at least one candidate key but at the same time can have several.


Ques: 7). What is the Difference Between MySQL and MySQL AB?


The term "MySQL" is used to refer to both the MySQL database management system and the corporation that created it. MySQL AB is the full name of the firm. MySQL is the database management system (DBMS) that MySQL AB owns, develops, and sells—that is, the "MySQL" database server software and related items such client applications for talking with the server and programming interfaces for creating new clients.

The "AB" in the company name is an abbreviation for the Swedish "aktiebolag," or "stock company." As a result, the company's name is "MySQL Inc." MySQL Inc. and MySQL GmbH, for example, are subsidiaries of MySQL AB.


Ques: 8). What are the features of MYSQL?


It's a pretty effective programme on its own. It can handle a significant portion of the features found in the most expensive and sophisticated database solutions.

  • It makes use of a standard version of the widely used SQL data language.
  • It's available under a free and open-source licence.
  • It is compatible with a wide range of operating systems and languages.
  • It operates swiftly and efficiently, even when dealing with massive data sets.
  • PHP has a variety of functions for working with MySQL databases.


Ques: 9). What are the steps you take in phpMyAdmin to modify a table?


From the table list on the left side of the SQL screen, choose the table you want. In the main area of the screen, the table shows in a spreadsheet-like manner. In this window, we can change the table's contents.

By clicking the appropriate button displayed near the record, you can edit or remove it.

By clicking the corresponding link near the bottom of the table, you can add a row.

Press the Enter key to exit the cell you just edited. Any modifications you make to the data in the table are automatically transformed to SQL code.


Ques: 10). What are your thoughts on TIMESTAMP?


The attributes DEFAULT CURRENT TIMESTAMP and ON UPDATE CURRENT TIMESTAMP of the TIMESTAMP data type enable for automated updating. Each table can only have one automatically updated TIMESTAMP field. That is, only one TIMESTAMP field with DEFAULT CURRENT TIMESTAMP or ON UPDATE CURRENT TIMESTAMP can be defined. On a single field, one or both attributes can be given.


Ques: 11). Is the data type DATETIME a STRING?


DATETIME data types are commonly formatted as strings, and they can also be inputted as strings. They do, however, have numerical representations, which are visible when the value is cast into a numeric data type.


Ques: 12). What is the maximum number of privilege levels that can be granted?


Privileges can be issued at five different levels.

Global - Privileges that apply to all databases on a MySQL server are known as global privileges. The mysql.user table stores these privileges.

Database - Database rights are applied to all items in a given database. The mysql.db and tables store these privileges.

Table  - Table privileges are applied to all columns in a table. The mysql.tables priv table stores these privileges. Only table level rights are granted and revoked using the GRANT ALL ON db name.table name and REVOKE ALL ON db name.table name commands.

Column - Privileges at the column level apply to one or more columns in a table. The mysql.columns priv table stores these privileges. You must specify the same columns that were given when using the REVOKE command to remove column level access. Within parenthesis, type the column or columns for which privileges are to be provided.

Routine - For stored routines, the privileges CREATE ROUTINE, ALTER ROUTINE, EXECUTE, and GRANT apply (functions and procedures). At the global and database levels, they can be granted. These privileges can also be provided at the routine level for individual routines, with the exception of CREATE ROUTINE. The privileges are kept in the table mysql.procs priv.


Ques: 13). What exactly is SQLyog?


SQLyog is perhaps the most widely used GUI tool for MySQL. The programme has been around since August 2002, and we can see how mature it is when we utilise it. This can be a very useful and practical tool for folks who come from a Windows desktop experience. There is a free community version that is somewhat limited, however it only operates on Windows desktops.


Ques: 14). Tell me how you back up a MYSQL database?


With phpMyAdmin, backing up databases is simple. By clicking the database name in the left-hand navigation bar, we can choose the database we wish to back up. After that, we select the Export button and make sure that all of the tables we want to back up are highlighted.

Then, under Export, we can define the choices we desire. Make sure we can save the output by entering a filename.


Ques: 15). What are the differences between the heap table & temporary table?


Heap Table:

  • Found in memory. It works as storage temporarily.
  • BLOB & TEXT fields aren’t allowed
  • Indexes should be “NOT NULL”
  • Doesn’t supports “AUTO_INCREMENT”
  • Can be shared among clients
  • Only comparison operators can be used (=,<,>,>=, <=)

Temporary Table:

  •  Used to store provisional data
  • Temporarily stored data is deleted after client session ends
  • Aren’t shared among clients
  • Special syntax is used; “create temporary table”


Ques: 16). Why would you want to utilise the MySQL Database Server?


The MySQL Database Server is a fast, dependable, and simple to use database server. Anyone with access to the internet can use and alter the software. Anyone can use MySQL for free by downloading it from the Internet.

MySQL Database Software is a client/server system that includes a multi-threaded SQL server that supports a variety of backends, a variety of client programmes and libraries, administrative tools, and a variety of application programming interfaces (APIs).


Ques: 17). Is the phpMyAdmin interface user-friendly?


The UI of the phpMyAdmin application is fairly user-friendly. Many administrators are at least somewhat familiar with it because it is utilised by a number of web hosting companies. Although it has a limited set of capabilities, it does offer some flexibility in that we can use a web browser to view the application from anywhere.


Ques: 18). What are the Common MYSQL Function?


CONCAT(A, B) - Concatenates two string values to create a single string output. Often used to combine two or more fields into one

FORMAT(X, D) - Formats the number X to D significant digits.

CURRDATE(), CURRTIME() - Returns the current date or time.

NOW() - Returns the current date and time as one value.

MONTH(), DAY(), YEAR(), WEEK(), WEEKDAY() - Extracts the given data from a date value.

HOUR(), MINUTE(), SECOND() - Extracts the given data from a time value.

DATEDIFF(A, B) - Determines the difference between two dates-commonly used to calculate ages

SUBTIMES(A, B) - Determines the difference between two times.

FROMDAYS(INT) - Converts an integer number of days into a date value.


Ques: 19). What are Access Control Lists and how do they work?


An Access Control List (ACL) is a set of permissions associated with a certain item. This list is the foundation of the MySQL server's security paradigm, and knowing it can immensely assist you in diagnosing problems with users being unable to connect.

The ACLs (also known as grant tables) are cached in memory by MySQL. MySQL validates the authentication information and permissions against the ACLs in a predetermined order when a user tries to authenticate or run a command.


Ques: 20). What is the "i-am-a-dummy flag" in MySQL used for?


When we want to deny or suspend "UPDATE & DELETE" instructions unless there is a WHERE clause present, we utilise the "i-am-a-dummy" flag.

November 17, 2021

Top 20 Apache Ambari interview Questions & Answers


Ques: 1). Describe Apache Ambari's main characteristics.


Apache Ambari is an Apache product that was created with the goal of making Hadoop applications easier to manage. Ambari assists in the management of the Hadoop project.

  • Provisioning is simple.
  • Project management made simple
  • Monitoring of Hadoop clusters
  • Availability of a user-friendly interface
  • Hadoop management web UI
  • RESTful API support

 Apache Tapestry Interview Questions and Answers

Ques: 2). Why do you believe Apache Ambari has a bright future?


With the growing need for big data technologies like Hadoop, we've witnessed a surge in data analysis, resulting in gigantic clusters. Companies are turning to technologies like Apache Ambari for better cluster management, increased operational efficiency, and increased visibility. Furthermore, we've noted how HortonWorks, a technology titan, is working on Ambari to make it more scalable. As a result, learning Hadoop as well as technologies like Apache Ambari is advantageous.

 Apache NiFi Interview Questions & Answers

Ques: 3). What are the core benefits for Hadoop users by using Apache Ambari?


The Apache Ambari is a great gift for individuals who use Hadoop in their day to day work life. With the use of Ambari, Hadoop users will get the core benefits:

1. The installation process is simplified
2. Configuration and overall management is simplified
3. It has a centralized security setup process
4. It gives out full visibility in terms of Cluster health
5. It is extensively extendable and has an option to customize if needed.

 Apache Spark Interview Questions & Answers

Ques: 4). What Are The Checks That Should Be Done Before Deploying A Hadoop Instance?


Before actually deploying the Hadoop instance, the following checklist should be completed:

  • Check for existing installations
  • Set up passwordless SSH
  • Enable NTP on the clusters
  • Check for DNS
  • Disable the SELinux
  • Disable iptables

 Apache Hive Interview Questions & Answers

Ques: 5 As a Hadoop user or system administrator, why should you choose Apache Ambari?


Using Apache Ambari can provide a Hadoop user with a number of advantages.

A system administrator can use Ambari to – Install Hadoop across any number of hosts using a step-by-step guide supplied by Ambari, while Ambari handles Hadoop installation setup.

Using Ambari, centrally administer Hadoop services across the cluster.

Using the Ambari metrics system, efficiently monitor the state and health of a Hadoop cluster. Furthermore, the Ambari alert framework sends out timely notifications for any system difficulties, like as disc space issues or node status.


Ques: 6). Can you explain Apache Ambari architecture?


Apache Ambari consists of following major components-

  • Ambari Server
  • Ambari Agent
  • Ambari Web

Apache Ambari Architecture

The all metadata is handled by the Ambari server, which is made up of a Postgres database instance as indicated in the diagram. The Ambari agent is installed on each computer in the cluster, and the Ambari server manages each host through it.

An Ambari agent is a member of the host that delivers heartbeats from the nodes to the Ambari server, as well as numerous operational metrics, to determine the nodes' health condition.

Ambari Web UI is a client-side JavaScript application that performs cluster operations by regularly accessing the Ambari RESTful API. Furthermore, using the RESTful API, it facilitates asynchronous communication between the application and the server.


Ques: 7). Apache Ambari supports how many layers of Hadoop components, and what are they?


Apache Ambari supports three tiers of Hadoop components, which are as follows:

1. Hadoop core components

  • Hadoop Distributed File System (HDFS)
  • MapReduce

2. Essential Hadoop components

  • Apache Pig
  • Apache Hive
  • Apache HCatalog
  • WebHCat
  • Apache HBase
  • Apache ZooKeeper

3. Components of Hadoop support

  • Apache Oozie
  • Apache Sqoop
  • Ganglia
  • Nagios


Ques: 8). What different sorts of Ambari repositories are there?


Ambari Repositories are divided into four categories, as below:

  1. Ambari: Ambari server, monitoring software packages, and Ambari agent are all stored in this repository.
  2. HDP-UTILS: The Ambari and HDP utility packages are stored in this repository.
  3. HDP: Hadoop Stack packages are stored in this repository.
  4. EPEL (Enterprise Linux Extra Packages): The Enterprise Linux repository now includes an extra set of software.


Ques: 9). How can I manually set up a local repository?


When there is no active internet connection available, this technique is used. Please follow the instructions below to create a local repository:

1. First and foremost, create an Apache httpd host.
2. Download a Tarball copy of each repository's entire contents.
3. After it has been downloaded, the contents must be extracted.


Ques: 10). What is a local repository, and when are you going to utilise one?


A local repository is a hosted place for Ambari software packages in the local environment. When the enterprise clusters have no or limited outbound Internet access, this is the method of choice.


Ques: 11). What are the benefits of setting up a local repository?


First and foremost by setting up a local repository, you can access Ambari software packages without internet access. Along with that, you can achieve benefits like –

Enhanced governance with better installation performance

Routine post-installation cluster operations like service start and restart operations


Ques: 12). What are the new additions in Ambari 2.6 versions?


Ambari 2.6.2 added the following features:

  • It will protect Zeppelin Notebook SSL credentials
  • We can set appropriate HTTP headers to use Cloud Object Stores with HDP
  • Ambari 2.6.1 added the following feature:
  • Conditional Installation of  LZO packages through Ambari
  • Ambari 2.6.0 added the following features:
  • Distributed mode of Ambari Metrics System’s (AMS) along with multiple Collectors
  • Host Recovery improvements for the restart
  • moving masters with minimum impact and scale testing
  • Improvement in Data Archival & Purging in Ambari Infra


Ques: 13). List Out The Commands That Are Used To Start, Check The Progress And Stop The Ambari Server?

Answer :

The following are the commands that are used to do the following activities:

To start the Ambari server

ambari-server start

To check the Ambari server processes

ps -ef | grep Ambari

To stop the Ambari server

ambari-server stop


Ques: 14). What all tasks you can perform for managing host using Ambari host tab?


Using Hosts tab, we can perform the following tasks:

  • Analysing Host Status
  • Searching the Hosts Page
  • Performing Host related Actions
  • Managing Host Components
  • Decommissioning a Master node or Slave node
  • Deleting a Component
  • Setting up Maintenance Mode
  • Adding or removing Hosts to a Cluster
  • Establishing Rack Awareness


Ques: 15). What all tasks you can perform for managing services using Ambari service tab?


Using Services tab, we can perform the following tasks:

  • Start and Stop of All Services
  • Display of Service Operating Summary
  • Adding a Service
  • Configuration Settings change
  • Performing Service Actions
  • Rolling Restarts
  • Background Operations monitoring
  • Service removal
  • Auditing operations
  • Using Quick Links
  • YARN Capacity Scheduler refresh
  • HDFS management
  • Atlas management in a Storm Environment


Ques: 16). Is there a relationship between the amount of free RAM and disc space required and the number of HDP cluster nodes?


Without a doubt, it has. The amount of RAM and disc required depends on the number of nodes in your cluster. In typically, 1 GB of memory and 10 GB of disc space are required for each node. Similarly, for a 100-node cluster, 4GB of memory and 100GB of disc space are required. To get all of the details, you'll need to look at a specific version.


Ques: 17). What tasks you can skill for managing services using the Ambari subsidiary bank account?


using the Services report, we can do the bearing in mind tasks:

  • Start and Stop of All Services
  • Display of Service Operating Summary
  • Adding a Service
  • Configuration Settings regulate
  • Performing Service Actions
  • Rolling Restarts
  • Background Operations monitoring
  • Service removal
  • Auditing operations
  • Using Quick Links
  • YARN Capacity Scheduler refresh
  • HDFS presidency
  • Atlas approach in a Storm Environment


Ques: 18). What is the best method for installing the Ambari agent on all 1000 hosts in the HDP cluster?


Because the cluster contains 1000 nodes, we should not manually install the Ambari agent on each node. Instead, we should set up a password-less ssh connection between the Ambari host and all of the cluster's nodes. To remotely access and install the Ambari Agent, Ambari Server hosts employ SSH public key authentication.


Ques: 19). What can I do if I have admin capabilities in Ambari?


Becoming a Hadoop Administrator is a difficult job. On, you can find all of the available Hadoop Admin training for HDP, Cloudera, and other platforms (visit now). You can create a cluster, manage the users in that cluster, and create groups if you are an Ambari Admin. All of these permissions are granted to the default admin user. You can grant the same or different permissions to another user even if you are an Amabari administrator.


Ques: 20).  How is recovery achieved in Ambari?


Recovery happens in Ambari in the moreover ways:

Based in remarks to activities

In Ambari after a restart master checks for pending undertakings and reschedules them previously all assimilation out is persisted here. Also, the master rebuilds the come clean machines at the back there is a restart, as the cluster market is persisted in the database. While lawsuit beautifies master actually catastrophe in the in front recording their take keep busy, along amid there is a race condition. The events, on the other hand, should be idempotent, which is a unique consideration. And the master restarts any behavior that has not been marked as occurring or has failed in the database. These persistent behaviors are seen in Redo Logs.

Based approaching the desired make known

While the master attempts to make the cluster flesh and blood publicise, you will be encircled by more to in as per the intended freshen appendix, as the master persists in the desired own going in savings account to for of the cluster.

February 11, 2021

Top 20 Linux Interview Questions and Answers

Ques. 1): How can Linux be differentiated from other Operating Systems?
Linux is somewhat like other operating systems you might have used before, such as OS X, iOS or the Windows. Like other operating systems, Linux too has a graphical user interface. The types of software just like other operating systems have, such as the word processing applications.
 But Linux is different from other operating systems in many ways. First and foremost, Linux is open source software. The code used to create the OS is always free and available to the public to view, contribute and edit. Secondly, although the core pieces of the Linux OS are generally common, there are quite many distributions of Linux, which include different software options, which implies Linux is incredibly customizable. Linux users can also choose core components, such as the system displays graphics and other UI components.

Ques. 2): What is the basic difference between UNIX and Linux Operating System.
Linux Operating System is Free and Open Source Software, the kernel of which is created by Linus Torvalds and community. Well you cannot say UNIX Operating System doesn’t comes under the category of Free and Open Source Software, BSD, is a variant of UNIX which comes under the category of FOSS. Moreover Big companies like Apple, IBM, Oracle, HP, etc. are contributing to UNIX Kernel.

Ques. 3): What Is Shell Script?
A shell script, as the name suggests, is a script written for the shell. Script here means a programming language used to control the application. The shell script allows different commands entered in the shell to be executed. Shell script is easy to debug, quicker as compared to writing big programs. However, the execution speed is slow because it launches a new process for every shell command executed. Examples of commands are cp, cn, cd.

Ques. 4): What Are Pipes?
A pipe is a chain of processes so that output of one process (stdout) is fed an input (stdin) to another. UNIX shell has a special syntax for creation of pipelines. The commands are written in sequence separated by |. Different filters are used for Pipes like AWK, GREP.
e.g. sort file | lpr ( sort the file and send it to printer)

Ques. 5): What Stateless Linux Server? What Feature It Offers?
A stateless Linux server is a centralized server in which no state exists on the single workstations. There may be scenarios when a state of a partilcuar system is meaningful (A snap shot is taken then) and the user wants all the other machines to be in that state. This is where the stateless Linux server comes into picture.

·       It stores the prototypes of every machine.
·       It stores snapshots taken for those systems.
·       It stores home directories for those system.

Uses LDAP containing information of all systems to assist in finding out which snapshot (of state) should be running on which system.

Ques. 6): What Is Bash Shell?
Bash is a free shell for UNIX. It is the default shell for most UNIX systems. It has a combination of the C and Korn shell features. Bash shell is not portable. any Bash-specific feature will not function on a system using the Bourne shell or one of its replacements, unless bash is installed as a secondary shell and the script begins with #!/bin/bash. It supports regular and expressions. When bash script starts, it executes commands of different scripts.

Ques. 7): What Is A Zombie?
Zombie is a process state when the child dies before the parent process. In this case the structural information of the process is still in the process table. Since this process is not alive, it cannot react to signals. Zombie state can finish when the parent dies. All resources of the zombie state process are cleared by the kernel.

Ques. 8): Explain Each System Calls Used For Process Management In Linux.
System calls used for Process management:
·       Fork () :- Used to create a new process
·       Exec() :- Execute a new program
·       Wait():- wait until the process finishes execution
·       Exit():- Exit from the process
·       Getpid():- get the unique process id of the process
·       Getppid():- get the parent process unique id
·       Nice():- to bias the existing property of process

Ques. 9): How Do You Kill A Process?
kill -9 8 (process_id 8) or kill -9 %7 (job number 7)
kill -9 -1 (Kill all processes you can kill.)
killall - kill processes by name most (useful - killall java)

Ques. 10): What Is A Filesystem?
Sum of all directories called file system. A file system is the primary means of file storage in UNIX. File systems are made of inodes and superblocks.

Ques. 11): What Are Two Subtle Differences In Using The More And The Pg Commands?
With the more command you display another screenful by pressing the spacebar, with pg you press the return key. The more command returns you automatically to the UNIX shell when completed, while pg waits until you press return.

Ques. 12): We Saw the Mention On The Linux Bios Website About One Million Devices Shipped With Linux Bios. Could You Tell Us More About These Devices?
Yes, these are internet terminals that were built in India, based on the [x86 system-on-chip] STPC chip, I am told; also, there evidently is a Turkish-built digital TV that runs Linux BIOS. I have also heard that there are routers and many other embedded devices running Linux BIOS. I think at this point that 1 million is a low number. I am in contact with other set-top box vendors that are talking about numbers in the lOs of millions for their products. These numbers actually make the OLPC numbers seem small, which is in it amazing.

Ques. 13): What's Your Goal For Your Talk At Fosdem?
I’d like to communicate the basic ideas — that Linux is a good BIOS, and why; why Linux BIOS is built the way it is; where we are going; and how people can help. Most importantly, why it all matters — and it really matters a lot. We’re on the verge of losing control of the systems we buy, and we need to make a conscious effort, as a community, to ensure this loss of control does not happen. That effort will not be without some sacrifice, but if we are to maintain our ability to use and program our machines, and have fun with them, we have to act now. Because, if the computing business stops being fun, what’s the point$

Ques. 14): What Command Would You Use To Create An Empty File Without Opening It To Edit It?
You use the touch command to create an empty file without needing to open it. Answers a and e point to invalid commands, though either of these might actually be aliased to point to a real command. Answers b and c utilize editors, and so do not satisfy the requirements of the question. actually touch is used to change the timestamps of a file if its exits, otherwise a new file with current timestamps will be created.

Ques. 15): What Do You Type To Stop A Hung Process That Resists The Standard Attempts To Shut It Down?
The kill command by itself tries to allow a process to exit cleanly. You type kill -9 PID, on the other hand, to abruptly stop a process that will not quit by any other means. Also, pressing CtrI+C works for many programs. Answers b and d are only valid in some contexts, and even in those contexts will not work on a hung process.

Ques. 16): What Are The Techniques That You Use To Handle The Collisions In Hash Tables?
We can use two major techniques to handle the collisions. They are open addressing and separate chaining. In open addressing, data items that hash to a full array cell are placed in another cell in the array. In separate chaining, each array element consists of a linked list. All data items hashing to a given array index are inserted in that list.

Ques. 17): Why You Shouldn't Use The Root Login?
The root login does not restrict you in any way. When you log in as root, you become the system. The root login is also sometimes called the super user login. With one simple command, issued either on purpose or by accident, you can destroy your entire Linux installation. For this reason, use the root login only when necessary. Avoid experimenting with commands when you do log in as root.

Ques. 18): What Can You Type At A Command Line To Determine Which Shell You Are Using?
echo $SHELL-The name and path to the shell you are using is saved to the SHELL environment variable. You can then use the echo command to print out the value of any variable by preceding the variable’s name with $. Therefore, typing echo $SHELL will display the name of your shell.

Ques. 19): Is Linux Operating system Virus free?
No! There doesn’t exist any Operating System on this earth that is virus free. However Linux is known to have least number of Viruses, till date, yes even less than UNIX OS. Linux has had about 60-100 viruses listed till date. None of them actively spreading nowadays. A rough estimate of UNIX viruses is between 85 -120 viruses reported till date.

Ques. 20): How do you change permissions under Linux?
Assuming you are the system administrator or the owner of a file or directory, you can grant permission using the chmod command. Use + symbol to add permission or – symbol to deny permission, along with any of the following letters: u (user), g (group), o (others), a (all), r (read), w (write) and x (execute). For example, the command chmod go+rw FILE1.TXT grants read and write access to the file FILE1.TXT, which is assigned to groups and others.