Automatic table creation (druid_segments) ?

313 views
Skip to first unread message

Deepak Jain

unread,
Apr 22, 2014, 2:33:52 AM4/22/14
to druid-de...@googlegroups.com
Hello,
When i ran examples (server and client) for the very first time, i found that MySQL druid instance had 3 tables auto created (druid_segments is of my interest here). I ran a HadoopDruidIndexer with "segmentTable": "druid_tracking_segments" and it failed with 

Caused by: org.skife.jdbi.v2.exceptions.UnableToExecuteStatementException: java.sql.BatchUpdateException: Table 'druid.druid_tracking_segments' doesn't exist

Are my assumptions correct ?

1. Can we have multiple druid_segments table ? Or should we use only druid_segments as segment meta data table ?

2. Should every data source segments sit inside its own segments table in MySQL (Meta data) ?

3. Why did automatic table creation failed ?

Regards,

Deepak


Fangjin Yang

unread,
Apr 22, 2014, 7:57:14 PM4/22/14
to druid-de...@googlegroups.com
Hi Deepak, see inline.


On Monday, April 21, 2014 11:33:52 PM UTC-7, Deepak Jain wrote:
Hello,
When i ran examples (server and client) for the very first time, i found that MySQL druid instance had 3 tables auto created (druid_segments is of my interest here). I ran a HadoopDruidIndexer with "segmentTable": "druid_tracking_segments" and it failed with 

Caused by: org.skife.jdbi.v2.exceptions.UnableToExecuteStatementException: java.sql.BatchUpdateException: Table 'druid.druid_tracking_segments' doesn't exist

Are my assumptions correct ?

1. Can we have multiple druid_segments table ? Or should we use only druid_segments as segment meta data table ?

You should be able to set the table names via:
http://druid.io/docs/latest/Configuration.html (see database connector module)

You should be able to have multiple segment tables. We use numerous ones for different deployments, however, generally we use a single segment metadata table per cluster.
 

2. Should every data source segments sit inside its own segments table in MySQL (Meta data) ?

All datasources should be  colocated in the same table for the same cluster.

3. Why did automatic table creation failed ?


Make sure to set druid.db.tables.base or druid.db.tables.segmentTable
 

Regards,

Deepak


Reply all
Reply to author
Forward
0 new messages