Links to HEAD: | (view) (annotate) |
Sticky Revision: | |
Sort logs by: |
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
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.
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
Changed error message printed in getHostId4Idx
Added setKeyDb method, to be used in testing, i.e. with this method we can change from another class the default MASTERDB database.
Added executeSql method
Added getAllIdxAndClients method: gets all ids and client_names for a certain key
Some changes in error messages to be more clear.
Clean up a bit and added some more comments
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.
Changed all error printing in catches to STDERR instead of STDOUT
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
Fixed bug in getIdxSet method. Wasn't reading properly the index_matrix table into the array. Was starting from columnn 1 which actually is the serial column. Now starting from column 2.
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.
Grouped all the setIdxColumn and setMasterTable into setKey. Also rationalised a bit the constructors by calling one from the other.
Added package tools.
Initial commit of the ClusterConnection class + small test class to test it out.
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.