Skip to content

clean up intermediate_pushes directory for LocalDataSegmentPusher#5306

Merged
himanshug merged 1 commit intoapache:masterfrom
dclim:intermediate-dir-cleanup
Jan 30, 2018
Merged

clean up intermediate_pushes directory for LocalDataSegmentPusher#5306
himanshug merged 1 commit intoapache:masterfrom
dclim:intermediate-dir-cleanup

Conversation

@dclim
Copy link
Copy Markdown
Contributor

@dclim dclim commented Jan 30, 2018

intermediateDirFor() used to create intermediate directories like:

/druid/localStorage/intermediate_pushes/myDatasource/2016-05-14T00:00:00.000Z_2016-05-15T00:00:00.000Z/2018-01-30T07:22:02.796Z/0.73253533-1fd0-4787-9240-d01f3faad752

with only the innermost directory being cleaned up (0.73253533-1fd0-4787-9240-d01f3faad752), leaving lots of empty directories on the filesystem.

Switched to a flat /druid/localStorage/intermediate_pushes/{UUID} which is removed on completion.

@dclim dclim added the Bug label Jan 30, 2018
@dclim dclim added this to the 0.12.0 milestone Jan 30, 2018
@himanshug
Copy link
Copy Markdown
Contributor

👍

however, just wanted to note for the record:
another alternative would be to clean all the other directories as well which is possible given that we generate the intermediate path here and know all the components in the path.

I usually like paths to give information, current path gives some information about what indexing task would've caused to create those files etc. For example if the directories are not cleaned up, then you would have some idea about which tasks might have created them and what went wrong. In this particular case, it isn't really important though because temp dir creation/deletion happens so closely. hence, I'm not as strongly opinionated on above alternative.

@himanshug himanshug merged commit be66d4b into apache:master Jan 30, 2018
@dclim dclim deleted the intermediate-dir-cleanup branch January 30, 2018 18:42
@dclim dclim mentioned this pull request Jan 30, 2018
dclim added a commit to implydata/druid-public that referenced this pull request Jan 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants