For this kind of work I'd suggest something like restructure101. They are a good crew and have given apache hbase a license; I could ask them for one for you.
I've tried a couple of free options out there, but nothing was able to really scale to handle the hbase code. I'd love to try using restructure101 to dig through this.
and then the Util class would be hoisted up into the packages above so it could be used from multiple packages
The utils would be hoisted into the 'shared' module, so we can avoid having dependencies between things like the client and server modules. This means that shared gets heavily cross-referenced, but that complexity is bound to a single location, rather than being tied all over the place (like it is now, smile).
I'm not a fan of building up HConstants to be this fat Interface refereneced by all and sundry
My logic here is the same as the previous - trying to reduce the interpackage/module complexity by hoisting out common elements. I agree that things that are just used within a class should remain with that class (as private members), but when you start getting things across packages making references to this file, it gets really hard to keep track of which constants you should be using where. For instance, the craziness I found with the DEFAULT_BLOCK_SIZE, even though that has apparently been removed, its indicative of the bigger problem.
Instead, for things like this, it is really nice to have a single place to go to find the right constant. Doing something like HConstants.HFile.DEFAULT_BLOCK_SIZE actually feels really clean when done from within an IDE. HConstants is already a pretty massive file, and the efforts to keep constants in their respective classes has only lead to more pain (And probably some duplication), rather than making it easier and cleaner.
Yeah, that was the idea. It would help break the constants into a couple different files, but at the same time keep them more together. Problem here is that you will likely end up having do an inline full path specification of the class to differentiate it from the actual class, where you are probably using it, (eg. org.apache.hadoop.hbase.constants.HFile.DEFAULT_BLOCK_SIZE), which is annoying.