Top 50 Flume Interview Questions

raju2006
July 01, 2016 0 Comments

Q1 Explain about the core components of Flume.

Answer: The core components of Flume are –

  • Event- The single log entry or unit of data that is transported.
  • Source- This is the component through which data enters Flume workflows.
  • Sink-It is responsible for transporting data to the desired destination.
  • Channel- it is the duct between the Sink and Source.
  • Agent- Any JVM that runs Flume.
  • Client- The component that transmits event to the source that operates with the agent.

 

Q2 What is Flume?

Answer: Flume is a distributed service for collecting, aggregating, and moving large amounts of log data.

 

Q3 Which is the reliable channel in Flume to ensure that there is no data loss?

Answer: FILE Channel is the most reliable channel among the 3 channels JDBC, FILE and MEMORY.

 

Q4 How can Flume be used with HBase?

Answer: Apache Flume can be used with HBase using one of the two HBase sinks –

  • HBaseSink (org.apache.flume.sink.hbase.HBaseSink) supports secure HBase clusters and also the novel HBase IPC that was introduced in the version HBase 0.96.
  • AsyncHBaseSink (org.apache.flume.sink.hbase.AsyncHBaseSink) has better performance than HBase sink as it can easily make non-blocking calls to HBase.

Working of the HBaseSink –

In HBaseSink, a Flume Event is converted into HBase Increments or Puts. Serializer implements the HBaseEventSerializer which is then instantiated when the sink starts. For every event, sink calls the initialize method in the serializer which then translates the Flume Event into HBase increments and puts to be sent to HBase cluster.

Working of the AsyncHBaseSink 

AsyncHBaseSink implements the AsyncHBaseEventSerializer. The initialize method is called only once by the sink when it starts. Sink invokes the setEvent method and then makes calls to the getIncrements and getActions methods just similar to HBase sink. When the sink stops, the cleanUp method is called by the serializer.

 

Q5 What is an Agent?

Answer: A process that hosts flume components such as sources, channels and sinks, and thus has the ability to receive, store and forward events to their destination.

 

Q6 Is it possible to leverage real time analysis on the big data collected by Flume directly? If yes, then explain how?

Answer: Data from Flume can be extracted, transformed and loaded in real-time into Apache Solr servers using MorphlineSolrSink.

 

Q7 Is it possible to leverage real time analysis on the big data collected by Flume directly? If yes, then explain how.

Answer: Data from Flume can be extracted, transformed and loaded in real-time into Apache Solr servers using MorphlineSolrSink.

 

Q8 What is a channel?

Answer: It stores events,events are delivered to the channel via sources operating within the agent.An event stays in the channel until a sink removes it for further transport.

 

Q9 Explain about the different channel types in Flume. Which channel type is faster?

Answer:

The 3 different built in channel types available in Flume are-

  • MEMORY Channel – Events are read from the source into memory and passed to the sink.
  • JDBC Channel – JDBC Channel stores the events in an embedded Derby database.
  • FILE Channel –File Channel writes the contents to a file on the file system after reading the event from a source. The file is deleted only  after the contents are successfully delivered to the sink.
  • MEMORY Channel is the fastest channel among the three however has the risk of data loss. The channel that you choose completely depends on the nature of the big data application and the value of each event.

 

Q10 What is Interceptor?

Answer: An interceptor can modify or even drop events based on any criteria chosen by the developer.

 

Q11 Explain about the replication and multiplexing selectors in Flume.

Answer: Channel Selectors are used to handle multiple channels. Based on the Flume header value, an event can be written just to a single channel or to multiple channels. If a channel selector is not specified to the source then by default it is the Replicating selector. Using the replicating selector, the same event is written to all the channels in the source’s channels list. Multiplexing channel selector is used when the application has to send different events to different channels.

 

Q12 Does Apache Flume provide support for third party plug-ins?

Answer: Most of the data analysts use Apache Flume has plug-in based architecture as it can load data from external sources and transfer it to external destinations.

 

Q13 Apache Flume support third-party plugins also?

Yes, Flume has 100% plugin-based architecture, it can load and ships data from external sources to external destination which seperately from Flume. SO that most of the bidata analysis use this tool for sreaming data.

 

Q14 Differentiate between FileSink and FileRollSink

Answer: The major difference between HDFS FileSink and FileRollSink is that HDFS File Sink writes the events into the Hadoop Distributed File System (HDFS) whereas File Roll Sink stores the events into the local file system.

 

Q15 How can Flume be used with HBase?

Answer: Apache Flume can be used with HBase using one of the two HBase sinks –

  • HBaseSink (org.apache.flume.sink.hbase.HBaseSink) supports secure HBase clusters and also the novel HBase IPC that was introduced in the version HBase 0.96.
  • AsyncHBaseSink (org.apache.flume.sink.hbase.AsyncHBaseSink) has better performance than HBase sink as it can easily make non-blocking calls to HBase.

Working of the HBaseSink –

In HBaseSink, a Flume Event is converted into HBase Increments or Puts. Serializer implements the HBaseEventSerializer which is then instantiated when the sink starts. For every event, sink calls the initialize method in the serializer which then translates the Flume Event into HBase increments and puts to be sent to HBase cluster.

Working of the AsyncHBaseSink –

AsyncHBaseSink implements the AsyncHBaseEventSerializer. The initialize method is called only once by the sink when it starts. Sink invokes the setEvent method and then makes calls to the getIncrements and getActions methods just similar to HBase sink. When the sink stops, the cleanUp method is called by the serializer.

 

Q16 Can Flume can distribute data to multiple destinations?

Answer:  Yes. It support multiplexing flow. The event flows from one source to multiple channel and multiple destionations, It is acheived by defining a flow multiplexer.

 

Q17 How multi-hop agent can be setup in Flume?

Answer: Avro RPC Bridge mechanism is used to setup Multi-hop agent in Apache Flume.

 

Q18 Why we are using Flume?

Answer: Most often Hadoop developer use this too to get lig data from social media sites. Its developed by Cloudera for aggregating and moving very large amount if data. The primary use is to gather log files from different sources and asynchronously persist in the hadoop cluster.

 

Q19 What is FlumeNG

Answer: A real time loader for streaming your data into Hadoop. It stores data in HDFS and HBase. You’ll want to get started with FlumeNG, which improves on the original flume.

 

Q20 Can fume provides 100% reliablity to the data flow?

Answer: Yes, it provide ene-to-end reliablity of the flow. By default uses a transactional approach in the dara flow.

Source and sink encapsulate in a transactional repository provides by the channels. This channels responsible to pass reliably from end to end flow. so it provides 100% reliablity to the data flow.

 

Q21 What is sink processors?

Answer: Sinc processors is mechanism by which you can create a fail-over task and load balancing.

 

Q22 Explain what are the tools used in Big Data?

Tools used in Big Data includes

  • Hadoop
  • Hive
  • Pig
  • Flume
  • Mahout
  • Sqoop

 

Q23 Agent communicate with other Agents?

Answer: NO each agent runs independently. Flume can easily horizontally. As a result ther is no single point of failure.

 

Q24 Does Apache Flume provide support for third party plug-ins?

Answer: Most of the data analysts use Apache Flume has plug-in based architecture as it can load data from external sources and transfer it to external destinations.

 

Q25 what are the complicated steps in Flume configurations?

Answer: Flume can processing straming data. so if started once, there is no stop/end to the process. asynchronously it can flows data from source to HDFS via agent. First of all agent should know individual components how they are connecto to load data. so configuraton is trigger to load streaming data. for example consumerkey, consumersecret accessToken and accessTokenSecret are key factor to download data from twitter.

 

Q26 Which is the reliable channel in Flume to ensure that there is no data loss?

Answer: FILE Channel is the most reliable channel among the 3 channels JDBC, FILE and MEMORY.

 

Q27 What are Flume core components

Answer: Cource, Channels and sink are core components in Apache Flume.

  • When Flume source recieves event from externalsource, it stores the event in one or multiple channels.
  • Flume channel is temporarily store and keep the event until’s consumed by the Flume sink. It act as Flume repository.
  • Flume Sink removes the event from channel and put into an external repository like HDFS or Move to the next flume.

 

Q28 What are the Data extraction tools in Hadoop?

Answer: Sqoop can be used to transfer data between RDBMS and HDFS. Flume can be used to extract the streaming data from social media, web log etc and store it on HDFS.

 

Q29 What are the important steps in the configuration?

Answer:  Configuration file is the heart of the Apache Flume’s agents.

  • Every Source must have atleast one channel.
  • Every Sink must have only one channel
  • Every Components must have a specific type.

 

Q30 Differentiate between FileSink and FileRollSink?

Answer: The major difference between HDFS FileSink and FileRollSink is that HDFS File Sink writes the events into the Hadoop Distributed File System (HDFS) whereas File Roll Sink stores the events into the local file system.

 

Q31 What is Apache Spark?

Answer: Spark is a fast, easy-to-use and flexible data processing framework. It has an advanced execution engine supporting cyclic data  flow and in-memory computing. Spark can run on Hadoop, standalone or in the cloud and is capable of accessing diverse data sources including HDFS, HBase, Cassandra and others.

 

Q32 What is Apache Flume?

Answer: Apache Flume is a distributed, reliable, and available system for efficiently collecting, aggregating and moving large amounts of log data from many different sources to a centralized data source. Review this Flume use case to learn how Mozilla collects and Analyse the Logs using Flume and Hive.

Flume is a framework for populating Hadoop with data. Agents are populated throughout ones IT infrastructure – inside web servers, application servers and mobile devices, for example – to collect data and integrate it into Hadoop.

 

Q33 What is flume agent?

Answer: A flume agent is JVM holds the flume core components(source, channel, sink) through which events flow from an external source like web-servers to destination like HDFS. Agent is heart of the Apache Flime.

 

Q34 What is Flume event?

Answer: A unit of data with set of string attribute called Flume event. The external source like web-server send events to the source. Internally Flume has inbuilt functionality to understand the source format.

Each log file is consider as an event. Each event has header and value sectors, which has header information and appropriate value that assign to articular header.

 

Q35 What are the Data extraction tools in Hadoop?

Answer: Sqoop can be used to transfer data between RDBMS and HDFS. Flume can be used to extract the streaming data from social media, web log etc and store it on HDFS.

 

Q36 Does Flume provide 100% reliability to the data flow?

Answer: Yes, Apache Flume provides end to end reliability because of its transactional approach in data flow.

 

Q37 Why Flume.?

Answer: Flume is not limited to collect logs from distributed systems, but it is capable of performing other use cases such as:

  • Collecting readings from array of sensors.
  • Collecting impressions from custom apps for an ad network
  • Collecting readings from network devices in order to monitor their performance.
  • Flume is targeted to preserve the reliability, scalability, manageability and extensibility while it serves maximum number of clients with higher QoS.

 

Q38 can you explain about configuration files?

Answer: The agent configuration is stored in local configuration file. it  comprises of each agents source,  sink and channel information.

Each core components such as source, sink and channel has properties such as name, type and set properties.

 

Q39 Tell any two feature Flume?

Fume collects data eficiently, aggrgate and moves large amount of log data from many different sources to centralized data store.

Flume is not restricted to log data aggregation and it can transport massive quantity of event data including but not limited to network traffice data, social-media generated data , email message na pretty much any data storage.

*************All The Best*************