There is a requirement to get a create table sql to create table with particular name in in memory db.
Master is storing this sql statements so it can expose method in his RMI interface to get this data.
So node sends table name/names and master responses with sql to create that table.
(*) this is the point of this issue
Select process will look like that:
Get create table statements from master for needed tables (*)
Create them in in memory database
Execute selects (select * from
) in all nodes pointed by master (these which contain that data) for all needed tables
Serialize somehow ResultSets and send it to coordinating node
Coordinating node inserts (unserialized data) to created tables in in memory db performing distinct on our internal id
Perform sql query (our SELECT from client) on in memory db, then return result
Maybe steps 1 and 2 can be joined. So when node calls selectMetadata() of master, it returns the list of create table statements and the nodes which have the data. So we perform one less call.
When master's selectMetadata() method is called with a list of tables, master get all the create tables of these tables and all the nodes which have data of these tables. It returns two list, one with the create table statements and other with the interfaces of the nodes.
Possible return errors:
ErrorEnum.ANOTHER_ERROR the list of tables is empty.
ErrorEnum.TABLE_NOT_EXIST some table of the list is not registered in master.
There is a requirement to get a create table sql to create table with particular name in in memory db. Master is storing this sql statements so it can expose method in his RMI interface to get this data. So node sends table name/names and master responses with sql to create that table.
(*) this is the point of this issue
Select process will look like that:
Maybe steps 1 and 2 can be joined. So when node calls
selectMetadata()
of master, it returns the list of create table statements and the nodes which have the data. So we perform one less call.Yes this is a good idea:)
When master's
selectMetadata()
method is called with a list of tables, master get all the create tables of these tables and all the nodes which have data of these tables. It returns two list, one with the create table statements and other with the interfaces of the nodes. Possible return errors:ErrorEnum.ANOTHER_ERROR
the list of tables is empty.ErrorEnum.TABLE_NOT_EXIST
some table of the list is not registered in master.Task ready.