Modified insertIdsToKeyMaster method. Now removing pk in table before inserting, then removing zeros and adding finally the pk back. At that point mysql should complain if there are duplicates
New methods to deal with key_master database actions. They belong in another class, but for the moment here.
- createNewKeyMasterTbl
- removePK
- addPK
- removeZeros

In latest commit method insertIdsToKeyMaster wasn't yet complying with the new way of dealing with key
Now modified insertIdsToKeyMaster accordingly. Now we create a ClusterConnection object to call the createNewKeyMasterTable method.

New method createNewKeyMasterTbl
To create a new keyMaster table in the key_master database for a certain table
Will also insert a new record in dbs_keys for the new table.
If a record for it already existed it will print an error and continue as the error is harmless.

Got rid of keyColumn
Now key is directly the keyColumn name, e.g. key is asu_id not asu
This makes things less confusing and simpler.
We've done this following last commit of DataDistribution to also change the ways we deal with key/keyColumn.
Note that now the checkKeyCounts and checkDifferingKeys are using to get the keyTable name a ClusterConnection object and the new ClusterConnection method getTableOnNode

2 important changes:
Fixed important bug on the constructor that gets the key passed (the bug was there since a lot of revisions ago and always passed since that constructor was not used in other classes)
Got rid of keyColumn, was useless. Now key is directly the keyColumn name which is more logical and makes everything simpler
- changed all calls to keyColumn to key
- got rid of keyColumn field and setKeyColumn
- changed completely the methods setKeyTable to get the table name from the dbs_keys on key_master db
- introduced new method getTableOnNode. Gets the name of the table where splitted data is stored for this db and key

New method getIdSetsFromNodes, equivalent to splitIdsIntoSets but rather a posteriori, when tables are already distributed in cluster's nodes
Modified method getAllIds4KeyAndTable, now taking host as parameter too, more general
Changed the comments a lot for all those 3 methods. There are many catches to be taken in account, the comments explain them quite well

Added another clusterExecuteQuery method to take a HashMap of queries rather than only one.
To be used in cases where the queries to be sent to nodes are different for each node (like in load/dump methods of this class)
Right now strictly serial must paralelize it as with the other clusterExecuteQuery

Modified methods getAllIdxAndClients and getAllIdxFromMaster.
They return now:
- getAllIdxAndClients: an int[]
- getAllIdxFromMaster: a HashMap<Integer,String>
Got rid of having ResultSets returned which is very messy and dangerous.

Initial commit of DataDistribution.java into aglappe repository
Copied from repository scripts-jose rev 69
If want to have a look at previous history must do it from repository scripts-jose, there was no way of copying with history between different repositories

Initial commit.
Class to create a connection to mysql db with basic functionality.
Cann take parameters for connection as argument in constructor or from connection file (passing the filename to the constructor)
Using code from both DBConnection (henning) and mySQLConnect (ioannis)

Fixed a bug with setKeyDb method, was not actually working:
as well as setting the MASTERDB string needed to change connection to master database to point to new db!
From now on take care if setKeyDb is used in another class. It will open another master connection, thus master connection won't be always the same during the run of the program

Refactor some method names to be more consistent.
Changed some fields to be final (and uppercase them)
Added comments for the most importat methods
Made the createStatment(idx) method private, this should only be used internally. Would be dangerous to use it from anothe class.

Fixed important bug:
- now closing nCon connection before opening a new one in the setHost method.
- this is important. Before lots of connection were left opened after having used the ClusterConnection object

New method int[][] getIdxSet.
- Returns a 2-dimensional array with all indices for a certain key.
- Each column j corresponds to client_id j+1
- Each row i is a set of idx values for each of the client_ids. If there is no idx for a certain client_id then the value is 0.

Moved everything to subdir tools, so that we keep the tools name for the package. Also changed the package name in the files to tools. To work with it please check out only file:///.../svn/tools/trunk/tools