Bigdata - Interview Questions and Answers for 'At' | Search Java Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com
Share

Search Interview Questions


 2679 questions in repository.
 There are more than 200 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Bigdata - Interview Questions and Answers for 'At' - 56 question(s) found - Order By Newest

Very frequently asked in HCL Tech ( Based of 4 inputs )
  Q1. Write a Program to reverse a string iteratively and recursivelyCore Java

Ans. Using String method -

new StringBuffer(str).reverse().toString();

Iterative -

Strategy - Loop through each character of a String from last to first and append the character to StringBuilder / StringBuffer

public static String getReverseString(String str){
StringBuffer strBuffer = new StringBuffer(str.length);
for(int counter=str.length -1 ; counter>=0;counter--){
strBuffer.append(str.charAt(counter));
}
return strBuffer;
}

Recursive -

Strategy - Call the method with substring starting from 2nd character recursively till we have just 1 character.

public static String getReverseString(String str){
if(str.length <= 1){
return str;
}
return (getReverseString(str.subString(1)) + str.charAt(0);
}

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     string  StringBuffer  recursion  for loop  stringbuffer.append  java.lang.String  java.lang.StringBuffer  String Manipulation     HCL Technologies  Ocado  BlackRock  Oracle  FINRA  Arezzo Sky  Zalando  Boeing        frequent


 Q2. What is the difference between namenode and datanode in Hadoop? BigData
Admin
info@buggybread.com
Ans. NameNode stores MetaData (No of Blocks, On Which Rack which DataNode is stored etc) whereas the DataNode stores the actual Data.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     hadoop   at&t     Barclays  AT&T


 Q3. What is Apache Kafka ?BigData
admin
info@buggybread.com
Ans. Kafka is a distributed, partitioned, replicated commit log service. It provides the functionality of a messaging system through messages being written to logs.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     kafka   bigdata   message queue     American Express  Digital Reasoning  HMS Holdings  MarkMonitor


 Q4. What is a broker in Apache Kafka ?
admin
info@buggybread.com
Ans. Kafka is run as a cluster comprised of one or more servers each of which is called a broker

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     kafka   bigdata   message queue


 Q5. What is a Topic in Apache Kafka ?
admin
info@buggybread.com
Ans. A topic is a category or feed name to which messages are published

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     kafka   bigdata   message queue


 Q6. Have you used Kafka in your project ? If Yes, for what ?
admin
info@buggybread.com
Ans. We were using Kafka as a replacement for JMS Message Queue for better throughput. We were just using a simple Java multi threaded client as order of message consumption didn't matter to us.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     kafka   bigdata   message queue   java


 Q7. Does Kafka uses ZooKeeper ?
admin
info@buggybread.com
Ans. Yes

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     kafka   bigdata   yes-no   yes no


 Q8. What is a Sequence File?

a. A Sequence File contains a binary encoding of an arbitrary number of homogeneous writable objects.
b. A Sequence File contains a binary encoding of an arbitrary number key-value pairs. Each key must be the same type. Each value must be of same type.
c. A Sequence File contains a binary encoding of an arbitrary number of heterogeneous writeable objects.
d. A Sequence File contains a binary encoding of an arbitrary number of Writable Comparable objects, in sorted order.
Anonymous
Ans. A Sequence File contains a binary encoding of an arbitrary number key-value pairs. Each key must be the same type. Each value must be of same type.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     hadoop   bigdata   big data


 Q9. What is the input to the Reduce function ?

a. One Key and One Value
b. Multiple Keys and Multiple associated Values
c. Multiple Keys and One associated values with each
d. One key and associated values.
Anonymous
Ans. One key and associated values.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     hadoop   bigdata   big data   map-reduce   map reduce   reduce function



Do you think these are the Best Java Frameworks ?

OpenXavaSPRING MVCApache StripesCheck everything
that is Best in Java

Click Here



 Q10. Which of the following is the implementation language for Map Reduce Framework ?

a. Big Data
b. Hadoop
c. Java
d. C++
Anonymous
Ans. Java

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     hadoop   bigdata   big data   map-reduce   map reduce framework


 Q11. Can we have multiple threads consuming message stream from a single partition ?

Ans. Yes, by having multiple Consumer Groups.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     apache kafka  kafka  kafka consumer  kafka topic partitions  bigdata  consumer group


 Q12. Can we have multiple threads consuming messages from a single partition if we have single Consumer Group ?

Ans. No, we can only have max 1 thread per partition in a single Consumer Group.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     apache kafka  kafka  kafka consumer  kafka topic partitions  bigdata  consumer group


 Q13. If we have more threads than partitions in a kafka consumer, How can we model it efficiently ?

Ans. We will have to use multiple consumer groups in that case as threads will remain idle if we use single consumer group. A more sophisticated algorithm could be required with multiple groups if we have to ensure the order of consumption.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     apache kafka  kafka  kafka consumer  kafka topic partitions  bigdata  consumer group


 Q14. What are the two main components of Hadoop System ?BigData2016-10-17 09:56:41

Ans. Distributed file system and Map Reduce system.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     hadoop  bigdata  hadoop system components        frequent


 Q15. What is Hadoop Framework ?BigData2016-10-17 09:58:36

Ans. Hadoop is an open source framework , written in java by apche software foundation. This framework is used to write applications to process vast amount of data. Processing happens in parallel on large clusters which could have 1000 of computers. It processes data in a very reliable and fault tolerant manner.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     Hadoop framework  BigData


 Q16. Can you narrate some sample usage for Bigdata ?BigData2016-10-17 10:02:43

Ans. One common usage is predictive analytic using huge current or past data. For example - Using recent medical data ( diagnosis and procedure ), one can identify the pattern of diseases or the procedures that has to eventually applied upon certain diagnosis. This analysis might help in predicting the diseases that might occur to a patient. the other usage could be to identify the future spending patterns of the population by analyzing the past and current habits.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     BigData


 Q17. What is the use of Combiners ?BigData2016-10-17 10:03:41

Ans. Combiners are used to increase the efficiency of a Map Reduce program. They are used to aggregate intermediate map output locally on individual mapper outputs. Combiners can help you reduce the amount of data that needs to be transferred across to the reducers.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     Hadoop Systems  BigData   hadoop combiners     Barclays


 Q18. How would you process a 20 gb file with an application only having access to 4gb memory ?BigData2016-12-13 11:07:23

Ans. Load the file in chunks and then process. If we need to do analytic, we can process analytic information for those chunks and then reprocess the processed information from each chunk.

For example - we need to average all marks in the file. We can divide the file and load into 5 chunks and calculate average for each chunk. Then we can collect averages for all 5 chunks and then calculate the final average.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     bigdata  processing big data     Alibaba


 Q19. how many reducer task runs on a hadoop cluster ?BigData2017-03-03 07:45:50

Ans. Generally one reducer runs for all mappers, but it can be increased as per requirements.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     Hadoop  BigData     Wipro



Do you think these are the Best Java Frameworks ?

OpenXavaSPRING MVCApache StripesCheck everything
that is Best in Java

Click Here



 Q20. Have you ever heard of Kafka connect ?BigData2017-04-20 08:57:40

Ans. Yes, it's a project by confluent that provides in built mechanism for streaming records from bigdata data source to apache kafka message queues and vice versa. It provides a variety of source and sink connectors to achieve this.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     kafka  kafka connect


 Q21. What are the source and sink connectors in Kafka connect ? BigData2017-04-20 08:59:40

Ans. Source connectors are the connectors that are used to get information from the source whereas sink connectors are used to deploy information to the destination.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     kafka connect


 Q22. Is there any schema in mongo DB ?MongoDB2017-08-27 20:30:13

Ans. No It's schema less

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     mongodb  nosql  bigdata     Tapp Me


 Q23. Can an In Memory Data Management play a significant role for Big Data Analytics? BigData2018-07-16 09:23:24

 This question was recently asked at 'Jean Martin'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve          Jean Martin


Asked in General Electric online assignment.
 Q24. Write a Program for coin changer application. The program should set the cash box with available currency and then should render the exact change. If enough cash is not available , it should present the appropriate message.Core Java

Ans. import java.util.Map;
import java.util.Map.Entry;
import java.util.TreeMap;


public class CoinChanger {

enum Currency {
DOLLAR(1),QUARTER(.25),DIME(.10),NICKEL(.05),PENNY(.01);

private double currencyValue;

Currency(double value){
currencyValue = value;
}

double getCurrencyValue(){
return this.currencyValue;
}
}

private static Map<Currency, Integer> cashBox;
private static Map<Currency, Integer> change;

static {
cashBox = new TreeMap<Currency, Integer>();
change = new TreeMap<Currency, Integer>();
initializeCashBox();
}



public static void main(String[] args) {
double amountToReturn = 18.79f; // Set the amount to be changed here

for(Entry<Currency, Integer> entry:cashBox.entrySet()){
Currency currency = (Currency)entry.getKey();
int coinCount = (int)(amountToReturn/(entry.getKey().getCurrencyValue()));
int availableCurrency = (int)(entry.getValue());

if(coinCount > availableCurrency){
coinCount = availableCurrency;
}

change.put(currency, coinCount);
if(coinCount > 0){
amountToReturn = amountToReturn - (coinCount * entry.getKey().getCurrencyValue());
}
}

System.out.println(change);

if(amountToReturn > .1){
System.out.println("Not enough cash");
}
}

private static void initializeCashBox(){
//set the cash box
cashBox.put(Currency.DOLLAR, 50);
cashBox.put(Currency.QUARTER, 0);
cashBox.put(Currency.DIME, 50);
cashBox.put(Currency.NICKEL, 50);
cashBox.put(Currency.PENNY, 50);

}
}

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     coin changer application  coin changer app     General Electric


 Q25. Write a Program to right shift single character in a string2017-08-24 20:12:56

Ans. public class RightShiftCharacter {
   public static void main(String args[]) {
      String str = "Hello";
      
      char[] charArray = str.toCharArray();
      
      for(int count=charArray.length-1;count>0;count--){
         charArray[count] = charArray[count-1];
      }
      
      String newString = new StringBuilder().append(charArray).toString();
      
      System.out.println(newString);      
   }
}

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     string manipulation.right shift character


 Q26. How can we create objects if we make the constructor private ?Core Java
a. We can't create objects if constructor is private
b. We can only create objects if we follow singleton pattern
c. We can only create one object
d. We can create new object through static method or static block

Ans.d. We can create new object through static method or static block

 Q27. What will be the output of executing following class ?

public class BuggyBread {

static {
System.out.println("Static Block");
}

{
System.out.println("Initialization Block");
}

BuggyBread(){
System.out.println("Constructor");
}

public static void main(String[] args){
System.out.println("Main Method");
}
}
Core Java
a. Static Block
Main Method
b. Static Block
Instance Initialization Block
Main Method
c. Static Block
Constructor
Main Method
d. Static Block
Instance Initialization Block
Constructor
Main Method

Ans.a. Static Block
Main Method

 Q28. What will be the output upon executing following class ?

public class BuggyBread {

static {
System.out.println("Static Block");
}

{
System.out.println("Instance Initialization Block");
}

BuggyBread(){
System.out.println("Constructor");
}

public static void main(String[] args){
System.out.println("Main Method");
new BuggyBread();
}
}
Core Java
a. Instance Initialization Block
Constructor
Static Block
Main Method
b. Static Block
Instance Initialization Block
Constructor
Main Method
c. Main Method
Static Block
Instance Initialization Block
Constructor
d. Static Block
Main Method
Instance Initialization Block
Constructor

Ans.d. Static Block
Main Method
Instance Initialization Block
Constructor

 Q29. With the following code, Which is a valid way to initialize ?
public class BuggyBread {

   private String element1;

   private String element2;

   private BuggyBread(String element1, String element2){
      this.element1 = element1;
      this.element2 = element2;
   }

   public static class Builder {
   
      private String element1;

      private String element2;

      Builder(BuggyBread buggybread){
         element1 = buggybread.element1;
         element2 = buggybread.element2;
      }

      Builder withElement1(String element1){
         this.element1 = element1;
         return this;
      }

      Builder withElement2(String element2){
         this.element2 = element2;
         return this;
      }

      BuggyBread build(){
         BuggyBread buggybread = new BuggyBread(element1,element2);
         return buggybread;
      }
   }
}
Core Java
a. BuggyBread buggybread = new BuggyBread();
b. BuggyBread buggybread = new BuggyBread("element1","element2");
c. BuggyBread.Builder builder = new BuggyBread.Builder();
d. BuggyBread.Builder builder = new BuggyBread.Builder("element1","element2");

Ans.d. BuggyBread.Builder builder = new BuggyBread.Builder("element1","element2");

 Q30. What will be the output of following ?

public class BuggyBread {

   private int x;
   private Integer y;

   BuggyBread(int x,int y){};

   public static void main(String[] args){
      BuggyBread buggybread = new BuggyBread(1,2);
      System.out.println(buggybread.x);
      System.out.println(buggybread.y);
   }
}
Core Java
a. 0 0
b. 0 null
c. null 0
d. null null

Ans.b. 0 null

 Q31. Which of the following is true for == operator ?Core Java
a. For primitives, == checks if the variables on left and right have same data type
b. For primitives, == checks if the variables on left and right have same value
c. For Objects, == checks if the references on left and right have same data type
d. For Objects, == checks if the references on left and right have same value

Ans.b. For primitives, == checks if the variables on left and right have same value

 Q32. Which of the following is equivalent to following logic ?

Not X && Not Y
Core Java
a. x || Y
b. Not(X || Y)
c. Not(X && Y)
d. Not X && Y

Ans.b. Not(X || Y)

 Q33. Which of the following http response means the resource is not found ?Java EE
a. 500
b. 200
c. 404
d. 400

Ans.c. 404

 Q34. What is Dirty Read in Database Transactions ?Database
a. Data Read by Transaction 2 which hasn't yet updated by Transaction 1
b. Data Read by Transaction 2 which has been updated and commited by Transaction 1
c. Data Read by Transaction 2 which has been updated but not commited by Transaction 1
d. Inability of Transaction 2 to read Data when Transaction 1 is updating.

Ans.c. Data Read by Transaction 2 which has been updated but not commited by Transaction 1

 Q35. Which of following annotation is used to initialize objects before executing set of tests ?Junit
a. @Test
b. @Ignore
c. @After
d. @Before

Ans.d. @Before

 Q36. Which of the following is not true for static keyword ?Core Java
a. Static members are shared by all objects of the class.
b. We can override static methods.
c. Static methods operate on static variables only.
d. Static Elements are accessed using class name.

Ans.b. We can override static methods.

 Q37. What is Lazy Initialization in Hibernate ?Hibernate
a. Feature to load the dependencies from Cache
b. Feature to load all objects and relationships in advance before they can be used
c. Feature to not load dependencies and relationship in advance and load when required
d. Feature to not load the dependencies and relationships at all

Ans.c. Feature to not load dependencies and relationship in advance and load when required

 Q38. Which of the following is not the benefit of Lazy Initialization in Hibernate ?Hibernate
a. Laod When required provides better performance
b. Object stays lighter
c. Less number of Database calls
d. Less load on Database

Ans.c. Less number of Database calls

 Q39. The use of volatile keyword facilitates ..Core Java
a. Making Use of Cache for better Performance
b. Avoiding use of Cache
c. Making use of Backward as well as Forward Cache
d. Keeping only one copy of variable in Cache

Ans.b. Avoiding use of Cache

 Q40. Static Polymorphic in Java is achieved through .. Core Java
a. Method Overloading
b. Method Overriding
c. Variable Overloading
d. Variable Overriding

Ans.a. Method Overloading



Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner



comments powered by Disqus
 

Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked:
         

X Close this

X Close this

Help Us Improve.
Please share your
interview experience.

Company Name:   


Questions Asked: