Re: Accessing internal variables in DataNode and synchronization.

2009-09-11 Thread Erik Holstad
Hi Mahadev! Sounds good that you want getters and setters, it makes most things easier to reason about, even though it might add a couple of extra lines of code. The reason that I'm bringing up the synchronization is that some of the methods in the DataNode are synchronized, which I like if it me

Re: Accessing internal variables in DataNode and synchronization.

2009-09-11 Thread Mahadev Konar
Hi Erik, There is no such reason for accessing variable without acess and getters. We should not be doing that. Its good to have getters and setters. The synchronization on DataNode is a safe lock that would prevent developers being concerned about finer locks and maintaining them. In our perfor

Accessing internal variables in DataNode and synchronization.

2009-09-11 Thread Erik Holstad
In most places in the server side code, internal variables are accessed directly via something like, node.parent... instead of making the variable private and using getters and setters, what is the purpose of this? Another question is why the synchronization on for example the DataNode is done on