Delete segments by Interval

Hi all,

I’m using Druid 0.14.2 and I have an issue deleting segments of a datasource by interval or by SegmentId.

When I do a POST request to coordinator:

http://ipaddress:8081/druid/coordinator/v1/datasources/agilenet_measures/markUnused

with this body: { “interval” : “2018-12-31T22:00:00.000Z/2019-10-01T04:00:00.000” }

I always receive “404 Not found”.

Segments with this interval are presents and I can see them in Druid Console.

I receive “404 Not found” also when I try to delete by SegmentId

Thanks

Can you try the following endpoint using a POST?

/druid/coordinator/v1/metadata/datasources/agilenet_measures/segments?full

Also I noticed your second interval is in the future and not followed by Z

/2019-10-01T04:00:00.000"

Eric Graham

Solutions Engineer -** **Imply

**cell: **303-589-4581

email: eric.graham@imply.io

www.imply.io

Is an error in email, I use this json:

{ “interval” : “2018-12-31T22:00:00.000Z/2019-01-01T04:00:00.000Z” }

When I call

http://ipaddress:8081/druid/coordinator/v1/metadata/datasources

I found and empty list.

But when I call

http://138.132.168.94:8081/druid/coordinator/v1/metadata/datasources?includeDisabled

I see my Datasource

[

“agilenet_measures”

]

With Druid Console, instead, I see this datasource enabled and ‘Full available’

When you run this command you are getting an empty set?

http://138.132.168.94:8081/druid/coordinator/v1/metadata/datasources/agilenet_measures/segments?full

Eric Graham

Solutions Engineer -** **Imply

**cell: **303-589-4581

email: eric.graham@imply.io

www.imply.io

Yes, I got my datasource if I call

http://ipaddress:8081/druid/coordinator/v1/metadata/datasources?includeDisabled

May be, I selected “Drop data” in Console and this changed status in Disabled,but I see agilenet_measures datasource and all segments in Console also if “Show disable” switch in Console is OFF.

Is there a way to reenable datasource ?

Thanks

Hi,
Can you run this /druid/coordinator/v1/metadata/datasources without the ?includeDisabled ?
If you want to re-enable all the segments for that data-source, then you can achieve this by updating the Metadata DB DRUID_SEGMENTS table.
For ex : UPDATE DRUID_SEGMENTS SET USED=true where DATASOURCE=’<datasource-name’;

The above query will enable all the segments for that DS and we should be able to see it on the Druid console.

Thanks,
Hemanth

You should also be able to run

/druid/coordinator/v1/datasources/agilenet_measures/markUsed

Eric Graham

Solutions Engineer -** **Imply

**cell: **303-589-4581

email: eric.graham@imply.io

www.imply.io

I had made a similar thread here:
https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!topic/druid-user/epFTZ-hJ4DU

TLDR: Looks like there is a bug on 0.14.2 which doesn’t let us delete by interval. I can personally confirm */markUnused" API on 0…15.0 works.

PS: You will have to submit a kill task to delete from deep storage.