Question

Apparently, Hadoop framework developers decided to return boolean rather than throwing an Exception. If you were...

Apparently, Hadoop framework developers decided to return boolean rather than throwing an Exception. If you were the lead developer, would you have taken the same approach? Why? Why Not?

Homework Answers

Answer #1

If I were the lead developer – I would definitely not return some value like bool, but I would throw an exception.

This is because, when some error like IO operation occurs - the function or the code should stop the execution and throw a message (error) explaining what the developer missed to taken into precaution.

Not all functions/codes are excepted to return values - they would just go no to do some steps and stop. If in this case if the function return a 0 in case of error; this would not be caught in the code as it did not stop - the code would blindly go to next stop and the developer would not know until something undesired happened.

Hence, it is always good to throw and error, so the developer may use TRYCATCH code to suppress the error or go properly to rectify the error'ed code, this is a better error handling approach.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
You created a standard curve using chlorophyll a from spirulina rather than leaf extract since it...
You created a standard curve using chlorophyll a from spirulina rather than leaf extract since it doesn’t contain chlorophyll b, yet were later told chlorophyll b doesn’t fluoresce. What might have happened if you made a standard curve using crudely-purified chlorophyll a from leaf extract? How would it have affected your results and why?
Two medical Technologists at JRU Medical Center(JRUMC) have decided to work part-time rather than full-time. They...
Two medical Technologists at JRU Medical Center(JRUMC) have decided to work part-time rather than full-time. They would like to work only two consecutive days per week. Because they would be part-time employees, salary and benefits per medical technologist-day for these medical technologists would be removed. JRU Medical Center(JRUMC)could hire an additional full-time medical technologist if needed. Should JRUMC agree for this request? If the satellite diagnostic clinic does agree, will additional medical technologist need to be hired? Assuming that part-time...
Why would you predict that zoonotic viruses are almost always RNA rather than DNA viruses? (SELECT...
Why would you predict that zoonotic viruses are almost always RNA rather than DNA viruses? (SELECT ALL THAT APPLY--MORE THAN ONE CORRECT ANSWER POSSIBLE) A. Like cellular life, viruses face limitations imposed by having to re-purposes existing traits when entering a new environment. B. RNA viruses generally have higher mutation rates than DNA viruses. C. Because mutational changes in a genome may create the variation required for adaptation to a new environment. D. Viruses face the same difficulties that cellular...
1. If you were able to put together a portfolio that completely eliminated all risk, what return would you expect to earn and why?
1. If you were able to put together a portfolio that completely eliminated all risk, what return would you expect to earn and why?This question is a real eye opener, in that with great risk can come great reward. The asset classes I can think of to present to me a zero-risk situation in the portfolio would be the following: Savings account, CD certificate, bonds, treasuries, and ponds. I expect to get minimal and low return on investment. Obviously the...
Maria Gutierrez and Devin Duzan recently graduated from the same university. After graduation they decided not...
Maria Gutierrez and Devin Duzan recently graduated from the same university. After graduation they decided not to seek jobs at established organizations but, rather, to start their own small business hoping they could have more flexibility in their personal lives for a few years. Maria’s family has operated Mexican restaurants and taco trucks for the past two generations, and Maria noticed there were no taco truck services in the town where their university was located. To reduce the amount they...
**[70 pts]** You will be writing a (rather primitive) online store simulator. It will have these...
**[70 pts]** You will be writing a (rather primitive) online store simulator. It will have these classes: Product, Customer, and Store. All data members of each class should be marked as **private** (a leading underscore in the name). Since they're private, if you need to access them from outside the class, you should do so via get or set methods. Any get or set methods should be named per the usual convention ("get_" or "set_" followed by the name of...
CASE STUDY Background Sarah’s project had now become more complex than she had anticipated. Sarah’s company...
CASE STUDY Background Sarah’s project had now become more complex than she had anticipated. Sarah’s company had a philosophy that the project manager would be assigned during proposal preparation, assist in the preparation of the proposal, and take on the role of the project manager after contract award, assuming the company would be awarded the contract. Usually, contract go-ahead would take place within a week or two after contract award. That made project staffing relatively easy for most of the...
Mini case: CHECKING IT OUT When Arlene Ryan inherited $250,000 from her grandfather, she decided to...
Mini case: CHECKING IT OUT When Arlene Ryan inherited $250,000 from her grandfather, she decided to use the money to start her own business. Arlene has been a legal secretary for 14 years and feels she knows quite a lot about business. “Every day I take depositions and type legal memoranda,” she noted to a friend. “And I’ve seen lots of businesses fail because they didn’t have adequate capital or proper management. Believe me, when you work for a law...
Background Sarah’s project had now become more complex than she had anticipated. Sarah’s company had a...
Background Sarah’s project had now become more complex than she had anticipated. Sarah’s company had a philosophy that the project manager would be assigned during proposal preparation, assist in the preparation of the proposal, and take on the role of the project manager after contract award, assuming the company would be awarded the contract. Usually, contract go-ahead would take place within a week or two after contract award. That made project staffing relatively easy for most of the project managers....
Background Sarah’s project had now become more complex than she had anticipated. Sarah’s company had a...
Background Sarah’s project had now become more complex than she had anticipated. Sarah’s company had a philosophy that the project manager would be assigned during proposal preparation, assist in the preparation of the proposal, and take on the role of the project manager after contract award, assuming the company would be awarded the contract. Usually, contract go-ahead would take place within a week or two after contract award. That made project staffing relatively easy for most of the project managers....