Thursday, 16 November 2017

Apache Kafka Interview Questions and Answers



Q1) .Mention what is Apache Kafka?
Ans: Apache Kafka is a publish-subscribe messaging system developed by Apache written in Scala. It is a distributed, partitioned and replicated log service.
Q2). Mention what is the traditional method of message transfer?
Ans: The traditional method of message transfer includes two methods
  •  Queuing:In a queuing, a pool of consumers may read message from the server and each message goes to one of them
    •  Publish-Subscribe:In this model, messages are broadcasted to all consumers
    Kafka caters single consumer abstraction that generalized both of the above- the consumer group.
Q3). Mention what is the benefits of Apache Kafka over the traditional technique?
Ans: Apache Kafka has following benefits above traditional messaging technique
  • Fast:A single Kafka broker can serve thousands of clients by handling megabytes of reads and writes per second
      Scalable: Data are partitioned and streamlined over a cluster of machines to enable larger data
      Durable: Messages are persistent and is replicated within the cluster to prevent data loss
    •  Distributed by Design: It provides fault tolerance guarantees and durability
Q4). Mention what is the meaning of broker in Kafka?
Ans: In Kafka cluster, broker term is used to refer Server.
Q5). Compare Kafka & Flume
Ans:
CriteriaKafkaFlume
Data flowPullPush
Hadoop IntegrationLooseTight
FunctionalityPublish-subscribe model messaging systemSystem for data collection, aggregation & movement
Q6). What role ZooKeeper plays in a cluster of Kafka?
Ans: Kafka is an open source system and also a distributed system is built to use Zookeeper. The basic responsibility of Zookeeper is to build coordination between different nodes in a cluster. Since Zookeeper works as periodically commit offset so that if any node fails, it will be used to recover from previously committed to offset.
The ZooKeeper is also responsible for configuration management, leader detection, detecting if any node leaves or joins the cluster, synchronization, etc.
Q7). What is Kafka?
Ans: Kafka is a message divider project coded in Scala. Kafka is originally developed by LinkedIn and developed as an open sourced in early 2011. The purpose of the project is to achieve the best stand for conducting the real-time statistics nourishment.
Q8).Why do you think the replications are dangerous in Kafka?
Ans: Duplication assures that issued messages which are available are absorbed in the case of any appliance mistake, plan fault or recurrent software promotions.
Q9).What major role a Kafka Producer API plays?
Ans: It is responsible for covering the two producers- kafka.producer.SyncProducer and the kafka.producer.async.AsyncProducer. The main aim is to disclose all the producer performance through a single API to the clients.
Q10). Distinguish between the Kafka and Flume?
Ans: Flume’s major use-case is to gulp down the data into Hadoop. The Flume is incorporated with the Hadoop’s monitoring system, file formats, file system and utilities such as Morphlines. Flume’s design of sinks, sources and channels mean that with the aid of Flume one can shift data among other systems lithely, but the main feature is its Hadoop integration.
The Flume is the best option used when you have non-relational data sources if you have a long file to stream into the Hadoop.Kafka’s major use-case is a distributed publish- subscribe messaging system. Kafka is not developed specifically for Hadoop and using Kafka to read and write data to Hadoop is considerably trickier than it is in Flume.
Kafka can be used when you particularly need a highly reliable and scalable enterprise messaging system to connect many multiple systems like Hadoop.    

Zend Framework Interview Questions and Answers

1.What is a Framework?
In software development, a framework is a defined support structure in which another software project can be organized and developed.
  • An abstract design
  •  Set of common functionality
  •  Developed for a particular domain
 2.How to disable layout from controller?
$this->_helper->layout()->disableLayout();
Disable Zend Layout from controller for Ajax call only
if($this->getRequest()->isXmlHttpRequest()){
$this->_helper->layout()->disableLayout();
}
3.How to change the View render file from controller?
function listAction(){
//call another view file file
$this->render(“anotherViewFile”);
}
4.How to protect your site from sql injection in zend when using select query?
$select = $this->select()
from(array(‘u’ => ‘users’), array(‘id’, ‘username’))
where(‘name like ?’,”%php%”)
where(‘user_id=?’,’5′)
where(‘rating<=?’,10);
5.How to check post method in zend framework?
if($this->getRequest()->isPost()){
//Post
}else{
//Not post
}
6.How to get all POST data?
$this->getRequest()->getPost();
7.How to get all GET data?
$this->getRequest()->getParams();
8.How to redirect to another page from controller?
$this->_redirect(‘/users/login’);
9.How to get variable’s value from get?
$id= $this->getRequest()->getParam(‘id’);
10.Create Model file in zend framework?
class Application_Model_Users extends Zend_Db_Table_Abstract {
protected $_name = “users”;
protected $_primary = “id”;
}

Monday, 13 November 2017

SAP GRC Interview Questions and Answers

1.What is the use of  SAP GRC?
SAP Governance, Risk and Compliance solution enables organization to manage regulations and compliance and remove any risk in managing organizations key operations. As per changing market situation organizations are growing and rapidly changing and inappropriate documents, spreadsheets are not acceptable for external auditors and regulators.
2.What are the different activities that you can perform in SAP GRC?
SAP GRC helps organization to manage their regulations and compliance and you can perform following activities
  • Easy integration of GRC activities into existing process and automating key GRC activities.
  • Low complexity and managing risk efficiently.
  • Improve risk management activities.
  • Managing fraud in business processed and audit management effectively.
  • Organizations perform better and companies can protect their values.
  • SAP GRC solution consists of three main areas: Analyze, manage and monitor.
3.What are the different GRC modules you have worked on?
  • SAP GRC Access Control
  • SAP GRC Process Control
  • SAP GRC Risk Management
  • SAP GRC Audit Management
  • SAP GRC Fraud Management
  • GRC Global Trade Services
4.What are the key activities under SAP GRC Access Control?
To mitigate risk in an organization, it is required to perform risk control as part of compliance and regulation practice. Responsibilities should be clearly defined, managing role provisioning and managing access for super user is critical for managing risk in an organization.
5.How Process Control is different from Access Control in SAP GRC?
SAP GRC Process control is used to monitor task and reports in real time and you can generate compliance status of controls in place as per business processes and aligning business processes to perform risk prevention and mitigation.
6.What is the use of GRC Risk Management?
SAP GRC Risk management allows you to manage risk management activities. You can do advance planning to identify risk in business and implement measures to manage risk and allow you to make better decision that improves the performance of business.
7.What are the different types of Risk?
Risks come in many forms −
  • Operational Risk
  • Strategic Risk
  • Compliance Risk
  • Financial Risk
8.What is SAP GRC Audit management?
This is used to improve the audit management process in an organization by documenting artifacts, organizing work papers, and creating audit reports. You can easily integrate with other governance, risk and compliance solution and enables organizations to align audit management policies with business goals.
9.What is SAP GRC Fraud Management?
SAP GRC Fraud management tool helps organizations to detect and prevent frauds at early stage and hence reducing minimizing the business loss. Scans can be performed on huge amount of data in real time with more accuracy and fraudent activities can be easily identified.
10.What are the key capabilities of Fraud management module?
SAP Fraud management software can help organizations with following capabilities
  • Easy investigation and documentation of fraud cases.
  • Increase the system alert and responsiveness to prevent fraudent activities to happen more frequently in future.
  • Easy scanning of high volumes of transactions and business data.

Django Interview Questions and Answers

Q1).Explain what is Django?
Ans1: Django is a web framework in python to develop a web application in python.
Django is a free and open source web application framework, written in Python.
Q2).Mention what are the features available in Django?
Ans2: Features available in Django are
  • Admin Interface (CRUD)
  • Templating
  • Form handling
  • Internationalization
  • Session, user management, role-based permissions
  • Object-relational mapping (ORM)
  • Testing Framework
  • Fantastic Documentation
Q3).Mention the architecture of Django architecture?
Ans3: Django architecture consists of
  • Models: It describes your database schema and your data structure
  • Views: It controls what a user sees, the view retrieves data from appropriate models and execute any calculation made to the data and pass it to the template
  • Templates: It determines how the user sees it. It describes how the data received from the views should be changed or formatted for display on the page
  • Controller: The Django framework and URL parsing
Q4).Why Django should be used for web-development?
Ans4:
  • It allows you to divide code modules into logical groups to make it flexible to change
  • To ease the website administration, it provides auto-generated web admin
  • It provides pre-packaged API for common user tasks
  • It gives you template system to define HTML template for your web page to avoid code duplication
  • It enables you to define what URL be for a given function
  • It enables you to separate business logic from the HTML
  • Everything is in python
Q5). Explain how you can create a project in Django?
Ans5: To start a project in Django, you use command $ django-admin.py and then use the command
Project
_init_.py
manage.py
settings.py
urls.py

Git interview Questions and Answers

1)What is GIT?
GIT is a distributed version control system and source code management (SCM) system with an emphasis to handle small and large projects with speed and efficiency.
2)What is a repository in GIT?
A repository contains a directory named .git, where git keeps all of its metadata for the repository. The content of the .git directory are private to git.
3)What is the command you can use to write a commit message?
The command that is used to write a commit message is “git commit –a”.  The –a on the command line instructs git to commit the new content of all tracked files that have been modified. You can use “git add<file>” before git commit –a if new files need to be committed for the first time.
4) What is the difference between GIT and SVN?
The difference between GIT and SVN is
  1. a)      Git is less preferred for handling extremely large files or frequently changing binary files while SVN can handle multiple projects stored in the same repository.
  2. b)      GIT does not support ‘commits’ across multiple branches or tags.  Subversion allows the creation of folders at any location in the repository layout.
  3. c)        Gits are unchangeable, while Subversion allows committers to treat a tag as a branch and to create multiple revisions under a tag root.
5)What are the advantages of using GIT?
  1. a)      Data redundancy and replication
  2. b)      High availability
  1. c)       Only one.git directory per repository
  2. d)      Superior disk utilization and network performance
  3. e)      Collaboration friendly
  4. f)       Any sort of projects can use GIT
6)What language is used in GIT?
GIT is fast, and ‘C’ language makes this possible by reducing the overhead of runtimes associated with higher languages.
7)What is the function of ‘GIT PUSH’ in GIT?
‘GIT PUSH’ updates remote refs along with associated objects.
8)Why GIT better than Subversion?
GIT is an open source version control system; it will allow you to run ‘versions’ of a project, which show the changes that were made to the code overtime also it allows you keep the backtrack if necessary and undo those changes.  Multiple developers can checkout, and upload changes and each change can then be attributed to a specific developer.
9)What is “Staging Area” or “Index” in GIT?
Before completing the commits, it can be formatted and reviewed in an intermediate area known as ‘Staging Area’ or ‘Index’.
10)What is GIT stash?
GIT stash takes the current state of the working directory and index and puts in on the stack for later and gives you back a clean working directory.  So in case if you are in the middle of something and need to jump over to the other job, and at the same time you don’t want to lose your current edits then you can use GIT stash.