Re: MySQL Fabric / ConnectorJ feature request
Posted by: Cosmin Mutu
Date: August 25, 2016 06:03AM


Sure, the idea is to be able to perform a SQL statement across all shards on fields different than the shard key that was used to insert the records.

Lets say we have a table named USERS with following columns [id, name, age]
Lets say we have 3 shards and the column used for sharding USERS is ID.
Let`s assume we have following records distribution :

shard 1 : [1, John A, 30], [4, Steve A, 15], [7, Chris K, 33]
shard 2 : [2, Michael K, 27],[5, Burt S, 43], [8, Stewie S, 43]
shard 3 : [3, Stuart G, 29], [6, Doug H, 22], [9, Richie R, 55]


Expected Results :
[1, John A, 30], [7, Chris K, 33], [5, Burt S, 43], [8, Stewie S, 43], [9, Richie R, 55]

Now, I would like to use the FabricMySQLDataSource without ever caring about the FabricConnection that is used underneath ... and the only way to obtain all SHARDS names is from a fabric connection.

The reason to obtain all SHARDS names is so that I can set each one on a FabricMySQLConnection and execute the query mentioned above. Collecting all results and aggregating them would fulfill the expected results.

Is there some other way to obtain same result without using at all the FabricConnection which is not accessible from FabricMySQLDataSource ?

Options: ReplyQuote

Written By
Re: MySQL Fabric / ConnectorJ feature request
August 25, 2016 06:03AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.