This message was deleted.
# general
s
This message was deleted.
g
the simplest thing is use the data loader in the web console to get started—
"Batch - SQL [multi stage query]" then select HDFS
make sure to load the
druid-hdfs-storage
extension
s
Thanks Gian, I don't find such option in druid data loader.
Actually my requirement : Need to create datasource on top of hdfs deep storage. Recently one datasource was dropped but hdfs deep storage data existed. So I just want recover the dropped datasource.
g
oh i see, i thought you wanted to load some source data
best way to restore a datasource is to use a backup of your metadata store
the
druid_segments
table would have pointers to all the relevant files on hdfs
or, it's also possible you don't even need a backup, if the records are there with
used = false
you can set
used = true
and they will be reloaded
s
select * from INFORMATION_SCHEMA.TABLES
The above shows the required table i.e dropped datasource.
With
select * from INFORMATION_SCHEMA.TABLES
query we are able to see the deleted data source however when we execute
SELECT * FROM sys.segments WHERE datasource = 'deleted_datasouruce_name'
query it is not returning any records for the deleted data source. In this situation could you please suggest the appropriate way to restore the deleted data source using the files available in deep storage?
s
Did you have a backup of the metadata store? If so, you could restore it to another DB instance and then copy the records in druid_segments for that datasource back into the metadata DB.
s
We don't have the backup of the metadata store. But we have druid deep storage data i.e. segments file data which was in zip format. When I was unzipped w e found the following files. 1> Will it be helpful to restore the dropped datasource using the following files. i.e.
meta.smoosh, factory.json, 00000.smoosh, version.bin
2> Whenever we opted editspec option it's showing the following exception . Any idea on this.
s
#1 - in theory, you could build the
druid_segments
rows manually that correspond to each segment file you have in S3. Rebuilding the payload is likely the hard part. #2 - is that error from the Druid Console? Are you trying to edit an existing supervisor? Is the metadata for it still in
druid_supervisors
?