On Thu, Feb 11, 2010 at 11:59 PM, Matthew Montgomery <
Matt.Montgomery@stripped> wrote:
> On Thu, 2010-02-11 at 18:18 +0530, Anand Sriraman wrote:
> > Hi,
> >
> > On Tue, Feb 9, 2010 at 1:11 PM, Martin Skold <Martin.Skold@stripped>
> wrote:
> >
> > > Hi!
> > >
> > > Yes, internally the primary key can be used
> > > to locate the primary partition (when using
> > > default partitioning). This is used to decide
> > > where the transaction coordinator should run,
> > > the primary key of the first row (if available)
> > > is used as "hint" when starting the transaction.
> > > For user defined partitioning the partitioning
> > > function decides.
> > > This is transparent from SQL, but can be controlled
> > > in the low level API (Ndb API).
> > >
> > >
> > Ok. So I get that the partitioning is done internally ( when using
> default
> > partitioning) based on the primary key. Is there a way that I can
> actually
> > see the partitions that are being created and which partition lies on
> which
> > data node?
> >
>
> Yes, use $ ndb_show_tables to find the table ids. You will find in the
> LCP/0 and LCP/1 each will have a file with T<tabId>F<fragId>.Data for
> each table fragment (partition) that node has a replica of.
>
> For example you may find in ndb_2_fs/LCP/0
> -rw-r--r-- 1 matt matt 34K 2010-02-11 11:47 T2F0.Data <-Primary
> -rw-r--r-- 1 matt matt 33K 2010-02-11 11:47 T2F1.Data <-Backup
> -rw-r--r-- 1 matt matt 2.3K 2010-02-11 11:47 T3F0.Data <-Primary
> -rw-r--r-- 1 matt matt 2.0K 2010-02-11 11:47 T3F1.Data <-Backup
> -rw-r--r-- 1 matt matt 2.2K 2010-02-11 10:48 T4F0.Data <-Primary
> -rw-r--r-- 1 matt matt 2.2K 2010-02-11 10:48 T4F1.Data <-Backup
> -rw-r--r-- 1 matt matt 1.2K 2010-02-11 10:49 T5F0.Data <-Primary
> -rw-r--r-- 1 matt matt 1.2K 2010-02-11 10:49 T5F1.Data <-Backup
> -rw-r--r-- 1 matt matt 1.6K 2010-02-11 10:49 T6F0.Data <-Primary
> -rw-r--r-- 1 matt matt 1.6K 2010-02-11 10:49 T6F1.Data <-Backup
>
> While may find in ndb_3_fs/LCP/0
> -rw-r--r-- 1 matt matt 34K 2010-02-11 11:47 T2F0.Data <-Backup
> -rw-r--r-- 1 matt matt 33K 2010-02-11 11:47 T2F1.Data <-Primary
> -rw-r--r-- 1 matt matt 2.3K 2010-02-11 11:47 T3F0.Data <-Backup
> -rw-r--r-- 1 matt matt 2.0K 2010-02-11 11:47 T3F1.Data <-Primary
> -rw-r--r-- 1 matt matt 2.2K 2010-02-11 10:48 T4F0.Data <-Backup
> -rw-r--r-- 1 matt matt 2.2K 2010-02-11 10:48 T4F1.Data <-Primary
> -rw-r--r-- 1 matt matt 1.2K 2010-02-11 10:49 T5F0.Data <-Backup
> -rw-r--r-- 1 matt matt 1.2K 2010-02-11 10:49 T5F1.Data <-Primary
> -rw-r--r-- 1 matt matt 1.6K 2010-02-11 10:49 T6F0.Data <-Backup
> -rw-r--r-- 1 matt matt 1.6K 2010-02-11 10:49 T6F1.Data <-Primary
>
>
> --
> Matthew Montgomery
> MySQL Senior Support Engineer
> Sun Microsystems Inc., Database Group
> San Antonio, Texas, USA
>
>
> --
> MySQL Cluster Mailing List
> For list archives: http://lists.mysql.com/cluster
> To unsubscribe:
> http://lists.mysql.com/cluster?unsub=1
>
>
Thank you Matthew. This is exactly what I was looking for.
--
Anand Sriraman