Links to HEAD: | (view) (annotate) |
Sticky Revision: | |
Sort logs by: |
MySQLConnection now throwing SQLException on connect Many files changed following this: all calling classes now re-throwing or catching the SQLException
Adapted also ClusterConnection and checking methods in DataDistribution to text/numeric keys. Some methods in ClusterConnection have not changed at all even though they deal with keys. I haven't changed them because they are applicable only to numeric keys: insertIdxInMaster, getLastInsertId and getIdxSet
Made KEYMASTERDB in DataDistribution public. Now using in all other classes/programs that need KEYMASTERDB.
Changed the Connection fields to be MySQLConnection. Thanks to this, simplify considerably a lot of the methods by using the MySQLConnection methods. Got rid of method loadSQLDriver and URL final field
Got rid of method createNewKeyMasterTbl Didn't belong here but in DataDistribution (at least for now)
Bug in new method createNewKeyMasterTbl The query for inserting the new record in dbs_keys was totally wrong Wrote something more correct and simpler!
Minor change, in getHostId4Ifx one of the error messages was being written to out, now to err
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.
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.