Vijaypal Singh

Ranch Hand
+ Follow
since May 25, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Vijaypal Singh

Hi Vyapak,

Your understanding "So each reducer will receive all the values related to particular key (assuming default partitioner).That implies that the number of reducers required (and this will be known at run time) depends purely on the number of unique keys in the input data. " is correct .
The number of reducers need to be decided as a pert of design for many reasons or example
* Need to have fixed number of outputs generated from a Map reduce Job
* Keep the number of reducers smaller as compared to number of mappers for performance reasons
* Many similar other reasons.

So, The idea to declare/define fixed number of reducers can depend on many reasons including the ones listed above.

To add to the above with reference to your next query
"This the job will know only when it starts reading the input file, and hence this information (numbe of unique keys) won't be available too in advance If that's the case, how come programmers are allowed to set some fix number for reducers in advance? "

The number of reducers to be used is kind of design time decision, the real divide and conquer happens in the Map phase which is actually governed by the input split.

-hope it answers your query
5 years ago
Hi,

I cleared CCDH in 2012 and HDCDP this year. In my opinion CCDH tests your skills in much detail . I personally give more weight to the CCDH.

5 years ago
This is my way of understanding it,
Unless you override the equals() and hashcode() of the Person Calss the set will contain unique objects of Persona class.

So if you print g the output will be like "Lotte, Jane, Hans, Jane, Hans"
but if you override the equals and hashcode of Person class,It will understand that unique names are required.

@Override
public boolean equals(Object arg0) {
Person thisPerson = (Person)arg0;
return thisPerson.name.equals(this.name);
}
@Override
public int hashCode() {
// TODO Auto-generated method stub
return this.name.hashCode();
}

so the output becomes like "Jane, Lotte, Hans"

With reference to the print theyare appearing becaouse that gets executed before the call the HashSet;the difference is visible if you place a print after the addition.
9 years ago
Edit as a reminder to (a) UseCodeTags, and (b) don't provide direct answers, rather direct original posters in the right direction by giving hints, links to documentation, etc. JavaRanch is NotACodeMill, and people learn more effectively when they have to figure things out for themselves.
9 years ago
Ok,so that means whenever we are executing a Sessin bean method the the Entity bean is not in a detached state,but attached state so that would mean I can never call a method on a detached bean.I think I'am not getting it properly can you please clarify.
Hi,

I have been using ejb 3 for quite a few days and I have read the specs on "detached state" of an bean but I'am not sure when exactly an entity bean is in a "Detached State" .To clarify further what I want to understand is how can I create a situation when I can print say "In Detached state" .
Any help on the issue is most welcome...

Thanks in advance..
Hi,
Yesterday I cleared SCWCD 1.4 with an aggregate 88% thanks to all the fellow ranchers for the help and motivation,although I was expecting something above 90% but my poor show with tag hendlers landed me here.anyways it feel good to be here.

My Story was a bit different one.I had bought HFSJ way back in march 2005 and I kept reading throught the book and creating samples whenever time allowed me to.But,since past few weeks I became more and more confident about my prospects and started solving mock exams by Jdiscuss.Finally two days before the actual test I solved mock exam available with the HFSJ book and I scored 62% and it worked for me as well(62+26 = 88). I was confident about the 20+ rule and next two days I worked on tags and EL .Finally on the day I had to go to Indore which is 200 kms from my city to the prometric test center.At the test center I was nervous about my prospects but onece I started the test It was exteremely smooth.
I would like to thank the authors of HFSJ and fellow ranchers at Javaranch.I ove my success to you.Thanks indeed.
[ July 11, 2006: Message edited by: Vijaypal Singh ]
[ July 11, 2006: Message edited by: Vijaypal Singh ]
13 years ago
COme over to BHopal via andra express and from bhopal catch a cab to Indore
13 years ago
native of Bhopal(M.P)
currently in Bhopal(M.P)
Bhopal
14 years ago
A teacher is talking to the father of one of his pupils:
- Sir, I've asked you to come because I've discovered somewhat of a problem with your son: I have proof that he cheats on his tests.
- That is impossible, my son Pierre does not copy anyone else's work. I am sure you are mistaken, if you will pardon my saying so.
- May I show you proof so that we can both be sure? For example, here is a history test; the answers are copied from the paper of his friend Henri. Look at the first answer on both papers. The question was "Who came after Napoleon?" Henri's answer is Louis XVIII; Pierre's answer is also Louis XVIII.
- Aha! But it was Louis XVIII.
- That is true, but look at the second answer. The question was "Where did Napoleon achieve his greatest victory?" Henri's answer is London; Pierre's answer is also London.
- Yes, I see them both ... but that's purely coincidence. It's not sufficient proof to accuse my son of copying!
- Ahh, but wait, sir, until you see the third answer. The question was "Where did Napoleon die?" Henri's answer is I don't know, and Pierre's answer: Neither do I.
14 years ago
Dan,the lookup is done on the basis of jndi-name not on the ejb-name.In the exception stack trace the name looked up but not fund is the jndi-name specifed in the xml which looks correct to me.
14 years ago
I had a similar problem,than I got rid of local reference(jboss.xml) and interfaces and the problem was resolved.I hope this helps in your case too.
14 years ago
As far as I understand the question,
3 Config and 1 Context per application
14 years ago