HI Teng
first of all, you don’t need making any further changes to CSS because of this (chunks) move. However, you will need to tell each Qserv’s node that its chunk list has been updated (after you finish moving the files and restart Qserv). I will give you instructions later.
Here is the idea of how to move the files. You need to look at each worker node’s MySQL directory where you have your databases. Let’s suppose you have 2 database whose chunks need to be collocated:
<qserv-data-dir>/mysql/db1
<qserv-data-dir>/mysql/db2
And let’s suppose you have the following tables (which can be named differently) in those databases:
db1.Object
db1.Source
db2.OtherObject
db2.OtherSource
In that case you should see the following files for each chunk (using chunk number 123 as an example) in the corresponding mysql directory of database db1:
.../mysql/db1/Object_123.frm
.../mysql/db1/Object_123.MYD
.../mysql/db1/Object_123.MYI
.../mysql/db1/ObjectFullOverlap_123.frm
.../mysql/db1/ObjectFullOverlap_123.MYD
.../mysql/db1/ObjectFullOverlap_123.MYI
.../mysql/db1/Source_123.frm
.../mysql/db1/Source_123.MYD
.../mysql/db1/Source_123.MYI
.../mysql/db1/SourceFullOverlap_123.frm
.../mysql/db1/SourceFullOverlap_123.MYD
.../mysql/db1/SourceFullOverlap_123.MYI
And, a similar picture will be for the second database:
.../mysql/db2/OtherObject_123.frm
.../mysql/db2/OtherObject_123.MYD
.../mysql/db2/OtherObject_123.MYI
.../mysql/db2/OtherObjectFullOverlap_123.frm
.../mysql/db2/OtherObjectFullOverlap_123.MYD
.../mysql/db2/OtherObjectFullOverlap_123.MYI
.../mysql/db2/OtherSource_123.frm
.../mysql/db2/OtherSource_123.MYD
.../mysql/db2/OtherSource_123.MYI
.../mysql/db2/OtherSourceFullOverlap_123.frm
.../mysql/db2/OtherSourceFullOverlap_123.MYD
.../mysql/db2/OtherSourceFullOverlap_123.MYI
Now, what you need to move (not copy!) those files close to each other so that all files of chunk 123 were on the same worker node:
.../mysql/db1/*_123.MYI
.../mysql/db2/*_123.MYI
NOTES:
- Please, ignore a special chunk number 1234567890. This chunk must be already present on all worker nodes of all databases and tables.
- the chunk collocation requirement only applies to chunk numbers which are present in both databases. And you should not don’t care about other chunks. Though, quite frankly, I’m not sure what Qserv will do if you’ll be trying to do JOINs in those areas where the other database doesn’t have any data.
And it’s up to you to decide on how you balance chunks across worker nodes. It doesn’t matter except you want some more-or-less equal spread of chunks across the workers to prevent some of them being overloaded and others underutilized while processing the shared scan queries.
The next step will be to tell Qserv that you moved the files. I will explain this in a separate message.,
Regards,
Igor