In older versions of Apache Druid, insert-segment-to-db
was a tool that could scan deep storage and insert data from there into Druid metadata storage. It was intended to be used to update the segment table in the metadata storage after manually migrating segments from one place to another, or even to recover lost metadata storage by telling it where the segments are stored.
In Druid 0.14.x and earlier, Druid wrote segment metadata to two places: the metadata store's druid_segments
table, and descriptor.json
files in deep storage. This practice was stopped in Druid 0.15.0 as part of consolidated metadata management, for the following reasons:
insert-segment-to-db
tool read the descriptor.json
files.After this change, Druid stopped writing descriptor.json
files to deep storage, and now only writes segment metadata to the metadata store. This meant the insert-segment-to-db
tool is no longer useful, so it was removed in Druid 0.15.0.
It is highly recommended that you take regular backups of your metadata store, since it is difficult to recover Druid clusters properly without it.