sivasoft interview questions

sivasoft interview questions

Hadoop Interview Questions

HADOOP Interview Questions and Answers

1.What is BIG DATA?

A.Big Data is nothing but an assortment of such a huge and complex data that it becomes very tedious to capture, store, process, retrieve and analyze it with the help of on-hand database management tools or traditional data processing techniques.

2.Can you give some examples of Big Data?

A.There are many real life examples of Big Data! Facebook is generating 500+ terabytes of data per day, NYSE (New York Stock Exchange) generates about 1 terabyte of new trade data per day, a jet airline collects 10 terabytes of censor data for every 30 minutes of flying time. All these are day to day examples of Big Data!

3.Can you give a detailed overview about the Big Data being generated by Facebook?

A.As of December 31, 2012, there are 1.06 billion monthly active users on facebook and 680 million mobile users. On an average, 3.2 billion likes and comments are posted every day on Facebook. 72% of web audience is on Facebook. And why not! There are so many activities going on facebook from wall posts, sharing images, videos, writing comments and liking posts, etc. In fact, Facebook started using Hadoop in mid-2009 and was one of the initial users of Hadoop.

4.According to IBM, what are the three characteristics of Big Data?

A.According to IBM, the three characteristics of Big Data are: Volume: Facebook generating 500+ terabytes of data per day. Velocity: Analyzing 2 million records each day to identify the reason for losses. Variety: images, audio, video, sensor data, log files, etc.

5.How Big is Big Data?

A.With time, data volume is growing exponentially. Earlier we used to talk about Megabytes or Gigabytes. But time has arrived when we talk about data volume in terms of terabytes, petabytes and also zettabytes! Global data volume was around 1.8ZB in 2011 and is expected to be 7.9ZB in 2015. It is also known that the global information doubles in every two years!

6.How analysis of Big Data is useful for organizations?

A.Effective analysis of Big Data provides a lot of business advantage as organizations will learn which areas to focus on and which areas are less important. Big data analysis provides some early key indicators that can prevent the company from a huge loss or help in grasping a great opportunity with open hands! A precise analysis of Big Data helps in decision making! For instance, nowadays people rely so much on Facebook and Twitter before buying any product or service. All thanks to the Big Data explosion.

7.Who are Data Scientists?

A.Data scientists are soon replacing business analysts or data analysts. Data scientists are experts who find solutions to analyze data. Just as web analysis, we have data scientists who have good business insight as to how to handle a business challenge. Sharp data scientists are not only involved in dealing business problems, but also choosing the relevant issues that can bring value-addition to the organization.

8.What is Hadoop?

A.Hadoop is a framework that allows for distributed processing of large data sets across clusters of commodity computers using a simple programming model.

9.Why the name Hadoop?

A.Hadoop doesn't have any expanding version like oops. The charming yellow elephant you see is basically named after Dougs son's toy elephant!

10.Why do we need Hadoop?

A.Everyday a large amount of unstructured data is getting dumped into our machines. The major challenge is not to store large data sets in our systems but to retrieve and analyze the big data in the organizations, that too data present in different machines at different locations. In this situation a necessity for Hadoop arises. Hadoop has the ability to analyze the data present in different machines at different locations very quickly and in a very cost effective way. It uses the concept of MapReduce which enables it to divide the query into small parts and process them in parallel. This is also known as parallel computing.

11.What are some of the characteristics of Hadoop framework?

A.Hadoop framework is written in Java. It is designed to solve problems that involve analyzing large data (e.g. petabytes). The programming model is based on Google's MapReduce. The infrastructure is based on Google's Big Data and Distributed File System. Hadoop handles large files/data throughput and supports data intensive distributed applications. Hadoop is scalable as more nodes can be easily added to it.

12.Give a brief overview of Hadoop history.

A.In 2002, Doug Cutting created an open source, web crawler project. In 2004, Google published MapReduce, GFS papers. In 2006, Doug Cutting developed the open source, Mapreduce and HDFS project. In 2008, Yahoo ran 4,000 node Hadoop cluster and Hadoop won terabyte sort benchmark. In 2009, Facebook launched SQL support for Hadoop.

13.Give examples of some companies that are using Hadoop structure?

A.A lot of companies are using the Hadoop structure such as Cloudera, EMC, MapR, Hortonworks, Amazon, Facebook, eBay, Twitter, Google and so on.

14.What is the basic difference between traditional RDBMS and Hadoop?

A.Traditional RDBMS is used for transactional systems to report and archive the data, whereas Hadoop is an approach to store huge amount of data in the distributed file system and process it. RDBMS will be useful when you want to seek one record from Big data, whereas, Hadoop will be useful when you want Big data in one shot and perform analysis on that later.

15.What is structured and unstructured data?

A.Structured data is the data that is easily identifiable as it is organized in a structure. The most common form of structured data is a database where specific information is stored in tables, that is, rows and columns. Unstructured data refers to any data that cannot be identified easily. It could be in the form of images, videos, documents, email, logs and random text. It is not in the form of rows and columns.

16.What are the core components of Hadoop?

A.Core components of Hadoop are HDFS and MapReduce. HDFS is basically used to store large data sets and MapReduce is used to process such large data sets.

17.What is HDFS?

A.HDFS is a file system designed for storing very large files with streaming data access patterns, running clusters on commodity hardware.

18.What are the key features of HDFS?

A.HDFS is highly fault-tolerant, with high throughput, suitable for applications with large data sets, streaming access to file system data and can be built out of commodity hardware.

19.What is Fault Tolerance?

A.Suppose you have a file stored in a system, and due to some technical problem that file gets destroyed. Then there is no chance of getting the data back present in that file. To avoid such situations, Hadoop has introduced the feature of fault tolerance in HDFS. In Hadoop, when we store a file, it automatically gets replicated at two other locations also. So even if one or two of the systems collapse, the file is still available on the third system.

20.What is the difference between a Hadoop database and Relational Database?

A.Hadoop is not a database, it is an architecture with a filesystem called HDFS. The data is stored in HDFS which does not have any predefined containers. Relational database stores data in predefined containers.

21.what is MAP REDUCE?

A.Map Reduce is a set of programs used to access and manipulate large data sets over a Hadoop cluster.

22.What is the InputSplit in map reduce software?

A.An inputsplit is the slice of data to be processed by a single Mapper. It generally is of the block size which is stored on the datanode.

23.what is meaning Replication factor?

A.Replication factor defines the number of times a given data block is stored in the cluster. The default replication factor is 3. This also means that you need to have 3times the amount of storage needed to store the data. Each file is split into data blocks and spread across the cluster.

24.what is the default replication factor in HDFS?

A.The default hadoop comes with 3 replication factor. You can set the replication level individually for each file in HDFS. In addition to fault tolerance having replicas allow jobs that consume the same data to be run in parallel. Also if there are replicas of the data hadoop can attempt to run multiple copies of the same task and take which ever finishes first. This is useful if for some reason a box is being slow. Most Hadoop administrators set the default replication factor for their files to be three. The main assumption here is that if you keep three copies of the data, your data is safe. this to be true in the big clusters that we manage and operate. In addition to fault tolerance having replicas allow jobs that consume the same data to be run in parallel. Also if there are replicas of the data hadoop can attempt to run multiple copies of the same task and take which ever finishes first. This is useful if for some reason a box is being slow.

25.what is the typical block size of an HDFS block?

A.Default blocksize is 64mb. But 128mb is typical.

26.How does master slave architecture in the Hadoop?

A.Totally 5 daemons run in Hadoop Master-slave architecture . On Master Node : Name Node and Job Tracker and Secondary name node On Slave : Data Node and Task Tracker But its recommended to run Secondary name node in a separate machine which have Master node capacity.

27.What is compute and Storage nodes?

A. I do define Hadoop into 2 ways : Distributed Processing : Map - Reduce Distributed Storage : HDFS Name Node holds Meta info and Data holds exact data and its MR program.

28.Explain how input and output data format of the Hadoop framework?

A.Fileinputformat, textinputformat, keyvaluetextinputformat, sequencefileinputformat, sequencefileasinputtextformat, wholefileformat are file formats in hadoop framework

29.How can we control particular key should go in a specific reducer?

A.By using a custom partitioner.

30.What is the Reducer used for?

A. Reducer is used to combine the multiple outputs of mapper to one.

31.What are the primary phases of the Reducer?

A.Reducer has 3 primary phases: shuffle, sort and reduce.

32.What happens if number of reducers are 0?

A.It is legal to set the number of reduce-tasks to zero if no reduction is desired. In this case the outputs of the map-tasks go directly to the FileSystem, into the output path set by setOutputPath(Path). The framework does not sort the map-outputs before writing them out to the FileSystem.

33.How many instances of JobTracker can run on a Hadoop Cluser?

A.One. There can only be one JobTracker in the cluster. This can be run on the same machine running the NameNode.

34.How NameNode Handles data node failures?

A.Through checksums. every data has a record followed by a checksum. if checksum doesnot match with the original then it reports an data corrupted error.

35.Can I set the number of reducers to zero?

A.can be given as zero. So, the mapper output is an finalised output and stores in HDFS.

36.What is a SequenceFile in Hadoop?

A.A. ASequenceFilecontains a binaryencoding ofan arbitrary numberof homogeneous writable objects. B. ASequenceFilecontains a binary encoding of an arbitrary number of heterogeneous writable objects. C. ASequenceFilecontains a binary encoding of an arbitrary number of WritableComparable objects, in sorted order. D. ASequenceFilecontains a binary encoding of an arbitrary number key-value pairs. Each key must be the same type. Each value must be sametype.

37.How many states does Writable interface defines ___ in Hadoop?


38.What are sequence files and why are they important in Hadoop?

A.Sequence files are binary format files that are compressed and are splitable. They are often used in high-performance map-reduce jobs

39.What are map files and why are they important in Hadoop?

A.Map files are sorted sequence files that also have an index. The index allows fast data look up.

40.How can you use binary data in MapReduce in Hadoop?

A.Binary data can be used directly by a map-reduce job. Often binary data is added to a sequence file.

41.What is map - side join in Hadoop?

A.Map-side join is done in the map phase and done in memory

42.What is reduce - side join in Hadoop?

A. Reduce-side join is a technique for merging data from different sources based on a specific key. There are no memory restrictions

43.How can you disable the reduce step in Hadoop?

A.A developer can always set the number of the reducers to zero. That will completely disable the reduce step.

44.Why would a developer create a map-reduce without the reduce step Hadoop?

A. There is a CPU intensive step that occurs between the map and reduce steps. Disabling the reduce step speeds up data processing.

45.What is the default input format in Hadoop?

A.The default input format is TextInputFormat with byte offset as a key and entire line as a value.

46.How can you overwrite the default input format in Hadoop?

A.In order to overwrite default input format, a developer has to set new input format on job config before submitting the job to a cluster.

47.Is there a map input format in Hadoop?

A.No, but sequence file input format can read map files.

48.What happens if mapper output does not match reducer input in Hadoop?

A.A real-time exception will be thrown and map-reduce job will fail.

49.Can you provide multiple input paths to a map-reduce jobs Hadoop?

A.Yes, developers can add any number of input paths.

50.Since the data is replicated thrice in HDFS, does it mean that any calculation done on one node will also be replicated on the other two?

A.Since there are 3 nodes, when we send the MapReduce programs, calculations will be done only on the original data. The master node will know which node exactly has that particular data. In case, if one of the nodes is not responding, it is assumed to be failed. Only then, the required calculation will be done on the second replica.

51.What is throughput? How does HDFS get a good throughput?

A.hroughput is the amount of work done in a unit time. It describes how fast the data is getting accessed from the system and it is usually used to measure performance of the system. In HDFS, when we want to perform a task or an action, then the work is divided and shared among different systems. So all the systems will be executing the tasks assigned to them independently and in parallel. So the work will be completed in a very short period of time. In this way, the HDFS gives good throughput. By reading data in parallel, we decrease the actual time to read data tremendously.

52.What is streaming access?

A.As HDFS works on the principle of Write Once, Read Many, the feature of streaming access is extremely important in HDFS. HDFS focuses not so much on storing the data but how to retrieve it at the fastest possible speed, especially while analyzing logs. In HDFS, reading the complete data is more important than the time taken to fetch a single record from the data.

53.What is a commodity hardware? Does commodity hardware include RAM?

A.Commodity hardware is a non-expensive system which is not of high quality or high-availability. Hadoop can be installed in any average commodity hardware. We don't need super computers or high-end hardware to work on Hadoop. Yes, Commodity hardware includes RAM because there will be some services which will be running on RAM.

54.What is a Namenode?

A.Namenode is the master node on which job tracker runs and consists of the metadata. It maintains and manages the blocks which are present on the datanodes. It is a high-availability machine and single point of failure in HDFS.

55.What is a metadata?

A.Metadata is the information about the data stored in datanodes such as location of the file, size of the file and so on.

56.What is a Datanode?

A.Datanodes are the slaves which are deployed on each machine and provide the actual storage. These are responsible for serving read and write requests for the clients.

57.What is a daemon?

A.Daemon is a process or service that runs in background. In general, we use this word in UNIX environment. The equivalent of Daemon in Windows is services and in Dos is TSR.

58.What is a job tracker?

A.Job tracker is a daemon that runs on a namenode for submitting and tracking MapReduce jobs in Hadoop. It assigns the tasks to the different task tracker. In a Hadoop cluster, there will be only one job tracker but many task trackers. It is the single point of failure for Hadoop and MapReduce Service. If the job tracker goes down all the running jobs are halted. It receives heartbeat from task tracker based on which Job tracker decides whether the assigned task is completed or not.

59.What is a task tracker?

A.Task tracker is also a daemon that runs on datanodes. Task Trackers manage the execution of individual tasks on slave node. When a client submits a job, the job tracker will initialize the job and divide the work and assign them to different task trackers to perform MapReduce tasks. While performing this action, the task tracker will be simultaneously communicating with job tracker by sending heartbeat. If the job tracker does not receive heartbeat from task tracker within specified time, then it will assume that task tracker has crashed and assign that task to another task tracker in the cluster.

60.What are the benefits of block transfer?

A.A file can be larger than any single disk in the network. There�s nothing that requires the blocks from a file to be stored on the same disk, so they can take advantage of any of the disks in the cluster. Making the unit of abstraction a block rather than a file simplifies the storage subsystem. Blocks provide fault tolerance and availability. To insure against corrupted blocks and disk and machine failure, each block is replicated to a small number of physically separate machines (typically three). If a block becomes unavailable, a copy can be read from another location in a way that is transparent to the client.

61.How indexing is done in HDFS?

A.Hadoop has its own way of indexing. Depending upon the block size, once the data is stored, HDFS will keep on storing the last part of the data which will say where the next part of the data will be. In fact, this is the base of HDFS.

62.Is client the end user in HDFS?

A.No, Client is an application which runs on your machine, which is used to interact with the Namenode (job tracker) or datanode (task tracker).

63.When we send a data to a node, do we allow settling in time, before sending another data to that node?

A.we do.

64.Are Namenode and job tracker on the same host?

A.No, in practical environment, Namenode is on a separate host and job tracker is on a separate host.

65.What is a heartbeat in HDFS?

A.A heartbeat is a signal indicating that it is alive. A datanode sends heartbeat to Namenode and task tracker will send its heart beat to job tracker. If the Namenode or job tracker does not receive heart beat then they will decide that there is some problem in datanode or task tracker is unable to perform the assigned task.

66.If we want to copy 10 blocks from one machine to another, but another machine can copy only 8.5 blocks, can the blocks be broken at the time of replication?

A.In HDFS, blocks cannot be broken down. Before copying the blocks from one machine to another, the Master node will figure out what is the actual amount of space required, how many block are being used, how much space is available, and it will allocate the blocks accordingly.

67.Does hadoop always require digital data to process?

A.Hadoop always require digital data to be processed.

68.On what basis Namenode will decide which datanode to write on?

A.As the Namenode has the metadata (information) related to all the data nodes, it knows which datanode is free.

69.Doesn't Google have its very own version of DFS?

A.Yes, Google owns a DFS known as Google File System (GFS) developed by Google Inc. for its own use.

70.What is a rack?

A.Rack is a storage area with all the datanodes put together. These datanodes can be physically located at different places. Rack is a physical collection of datanodes which are stored at a single location. There can be multiple racks in a single location.

71.On what basis data will be stored on a rack?

A.When the client is ready to load a file into the cluster, the content of the file will be divided into blocks. Now the client consults the Namenode and gets 3 datanodes for every block of the file which indicates where the block should be stored. While placing the datanodes, the key rule followed is for every block of data, two copies will exist in one rack, third copy in a different rack. This rule is known as Replica Placement Policy.

72.Do we need to place 2nd and 3rd data in rack 2 only?

A.Yes, this is to avoid datanode failure.

73.What if rack 2 and datanode fails?

A.If both rack2 and datanode present in rack 1 fails then there is no chance of getting data from it. In order to avoid such situations, we need to replicate that data more number of times instead of replicating only thrice. This can be done by changing the value in replication factor which is set to 3 by default

74.If both rack2 and datanode present in rack 1 fails then there is no chance of getting data from it. In order to avoid such situations, we need to replicate that data more number of times instead of replicating only thrice. This can be done by changing the value in replication factor which is set to 3 by default

A.The secondary Namenode constantly reads the data from the RAM of the Namenode and writes it into the hard disk or the file system. It is not a substitute to the Namenode, so if the Namenode fails, the entire Hadoop system goes down.

75.What is the difference between Gen1 and Gen2 Hadoop with regards to the Namenode?

A.In Gen 1 Hadoop, Namenode is the single point of failure. In Gen 2 Hadoop, we have what is known as Active and Passive Namenodes kind of a structure. If the active Namenode fails, passive Namenode takes over the charge.

76.What is Key value pair in HDFS?

A.Key value pair is the intermediate data generated by maps and sent to reduces for generating the final output.

77..If a particular file is 50 mb, will the HDFS block still consume 64 mb as the default size?

A.No, not at all! 64 mb is just a unit where the data will be stored. In this particular situation, only 50 mb will be consumed by an HDFS block and 14 mb will be free to store something else. It is the MasterNode that does data allocation in an efficient manner.

78.Give examples of some companies that are using Hadoop structure?

A.A lot of companies are using the Hadoop structure such as Cloudera, EMC, MapR, Hortonworks, Amazon, Facebook, eBay, Twitter, Google and so on.

79..What are some of the characteristics of Hadoop framework?

A.Hadoop framework is written in Java. It is designed to solve problems that involve analyzing large data (e.g. petabytes). The programming model is based on Google's MapReduce. The infrastructure is based on Google's Big Data and Distributed File System. Hadoop handles large files/data throughput and supports data intensive distributed applications. Hadoop is scalable as more nodes can be easily added to it.

80.What is the meaning of speculative execution in Hadoop? Why is it important?

A.Speculative execution is a way of coping with individual Machine performance. In large clusters where hundreds or thousands of machines are involved there may be machines which are not performing as fast as others. This may result in delays in a full job due to only one machine not performaing well. To avoid this, speculative execution in hadoop can run multiple copies of same map or reduce task on different slave nodes. The results from first node to finish are used.

81.What is a IdentityMapper and IdentityReducer in MapReduce? Implements the identity function, mapping inputs directly to outputs. If MapReduce programmer does not set the Mapper Class using JobConf.setMapperClass then IdentityMapper.class is used as a default value. ◦org.apache.hadoop.mapred.lib.IdentityReducer : Performs no reduction, writing all input values directly to the output. If MapReduce programmer does not set the Reducer Class using JobConf.setReducerClass then IdentityReducer.class is used as a default value.

82.If you only had 32 megabytes of memory how would you sort one terabyte of data?

A.What Most People Say: I don't know. (In fact, most candidates either get it right or don't). What You Should Say: Take a smaller chunk of data and sort it in memory, so you partition it in lots of little data sets. Then merge those sorted lists into one big list before writing the results back to disk. Why You Should Say It: Any candidate who does Hadoop or knows it at a deep level will be able to understand the depth of what Hadoop does, Sammer believes. It's a great qualifying question. It demonstrates an understanding of how you manage data at that scale.

83.Have you ever participated in open source in any way?

A.What Most People Say: No, or, I'm familiar with open source. What You Should Say: Here's an example of a project I did for a previous employer with open source. I have also contributed code. Why You Should Say It: Passion goes a long way, says Sammer. It gives us a high level gauge of interest in what they do for a living. People who do that tend to be a much better fit for us. Generally I as well as the rest of Cloudera believe there are a lot of ways to participate. You can contribute code, devote time by answering questions or write documentation. It's so impressive to see in a candidate.

84.What is BloomMapFile used for?

A.The BloomMapFile is a class that extends MapFile. So its functionality is similar to MapFile. BloomMapFile uses dynamic Bloom filters to provide quick membership test for the keys. It is used in Hbase table format. - See more at:

85.Does ILLUSTRATE run MR job?

A.No, illustrate will not pull any MR, it will pull the internal data. On the console, illustrate will not do any job. It just shows output of each stage and not the final output. See more at:

86.Is the keyword DEFINE like a function name?

A.Yes, the keyword DEFINE is like a function name. Once you have registered, you have to define it. Whatever logic you have written in Java program, you have an exported jar and also a jar registered by you. Now the compiler will check the function in exported jar. When the function is not present in the library, it looks into your jar

87.What co-group does in Pig?

A.Co-group joins the data set by grouping one particular data set only. It groups the elements by their common field and then returns a set of records containing two separate bags. The first bag consists of the record of the first data set with the common data set and the second bag consists of the records of the second data set with the common data set.

88.Can we say cogroup is a group of more than 1 data set?

A.Cogroup is a group of one data set. But in the case of more than one data sets, cogroup will group all the data sets and join them based on the common field. Hence, we can say that cogroup is a group of more than one data set and join of that data set as well.

89.Can Reducer talk with each other?

A.No, Reducer runs in isolation

90.. How many maximum JVM can run on a slave node?

A.One or Multiple instances of Task Instance can run on each slave node. Each task instance is run as a separate JVM process. The number of Task instances can be controlled by configuration. Typically a high end machine is configured to run more task instances.

91.How many daemon processes run on a Hadoop cluster?

A.Hadoop is comprised of five separate daemons. Each of these daemons runs in its own JVM. Following 3 Daemons run on Master nodes.NameNode - This daemon stores and maintains the metadata for HDFS. Secondary NameNode - Performs housekeeping functions for the NameNode. JobTracker - Manages MapReduce jobs, distributes individual tasks to machines running the Task Tracker. Following 2 Daemons run on each Slave nodes DataNode Stores actual HDFS data blocks. PappuPass Learning Resources 11 TaskTracker It is Responsible for instantiating and monitoring individual Map and Reduce tasks.

92.What do you mean by TaskInstance?

A.Task instances are the actual MapReduce jobs which run on each slave node. The TaskTracker starts a separate JVM processes to do the actual work (called as Task Instance) this is to ensure that process failure does not take down the entire task tracker.Each Task Instance runs on its own JVM process. There can be multiple processes of task instance running on a slave node. This is based on the number of slots configured on task tracker. By default a new task instance JVM process is spawned for a task.

93.How many instances of Tasktracker run on a Hadoop cluster?

A.There is one Daemon Tasktracker process for each slave node in the Hadoop cluster.

94.How many Reducers should be configured?

A.The right number of reduces seems to be 0.95 or 1.75 multiplied by ( * mapreduce.tasktracker.reduce.tasks.maximum). With 0.95 all of the reduces can launch immediately and start transfering map outputs as the maps finish. With 1.75 the faster nodes will finish their first round of reduces and launch a second wave of reduces doing a much better job of load balancing. Increasing the number of reduces increases the framework overhead, but increases load balancing and lowers the cost of failures.

95.What does job conf class do?

A.MapReduce needs to logically separate different jobs running on the same cluster. Job conf class helps to do job level settings such as declaring a job in real environment. It is recommended that Job name should be descriptive and represent the type of job that is being executed.

96.What does conf.setMapper Class do?

A.Conf.setMapper class sets the mapper class and all the stuff related to map job such as reading a data and generating a key-value pair out of the mapper.

97.What do sorting and shuffling do?

A.Sorting and shuffling are responsible for creating a unique key and a list of values. Making similar keys at one location is known as Sorting. And the process by which the intermediate output of the mapper is sorted and sent across to the reducers is known as Shuffling.

98.Why we cannot do aggregation (addition) in a mapper? Why we require reducer for that?

A.We cannot do aggregation (addition) in a mapper because, sorting is not done in a mapper. Sorting happens only on the reducer side. Mapper method initialization depends upon each input split. While doing aggregation, we will lose the value of the previous instance. For each row, a new mapper will get initialized. For each row, input split again gets divided into mapper, thus we do not have a track of the previous row value.

99.What do you know about Nlineoutputformat?

A.Nlineoutputformat splits n lines of input as one split.

100.Who are all using Hadoop? Give some examples.

A. , Amazon, Adobe , AOL , Baidu , Cooliris , Facebook , NSF-Google , IBM , LinkedIn , Ning , PARC , Rackspace , StumbleUpon , Twitter , Yahoo!

101. What is Thrift in HDFS?

A.The Thrift API in the thriftfs contrib module exposes Hadoop filesystems as an Apache Thrift service, making it easy for any language that has Thrift bindings to interact with a Hadoop filesystem, such as HDFS. To use the Thrift API, run a Java server that exposes the Thrift service, and acts as a proxy to the Hadoop filesystem. Your application accesses the Thrift service, which is typically running on the same machine as your application.

102.How Hadoop interacts with C?

A.Hadoop provides a C library called libhdfs that mirrors the Java FileSystem interface. It works using the Java Native Interface (JNI) to call a Java filesystem client. The C API is very similar to the Java one, but it typically lags the Java one, so newer features may not be supported. You can find the generated documentation for the C API in the libhdfs/docs/api directory of the Hadoop distribution.

103. What is FUSE in HDFS Hadoop?

A.Filesystem in Userspace (FUSE) allows filesystems that are implemented in user space to be integrated as a Unix filesystem. Hadoop's Fuse-DFS contrib module allows any Hadoop filesystem (but typically HDFS) to be mounted as a standard filesystem. You can then use Unix utilities (such as ls and cat) to interact with the filesystem. Fuse-DFS is implemented in C using libhdfs as the interface to HDFS. Documentation for compiling and running Fuse-DFS is located in the src/contrib/fuse-dfs directory of the Hadoop distribution.

No comments:

Post a Comment