private void deleteStateStore ( URI jobSpecUri ) throws IOException { int EXPECTED_NUM_URI_TOKENS = 3 ; String [ ] uriTokens = jobSpecUri . getPath ( ) . split ( "/" ) ; if ( null == this . datasetStateStore ) { log . warn ( "Job state store deletion failed as datasetstore is not initialized." ) ; return ; } if ( uriTokens . length != EXPECTED_NUM_URI_TOKENS ) { log . error ( "Invalid URI {}." , jobSpecUri ) ; return ; } String jobName = uriTokens [ EXPECTED_NUM_URI_TOKENS - 1 ] ; this . datasetStateStore . delete ( jobName ) ; log . info ( "JobSpec {} deleted with statestore." , jobSpecUri ) ; }
It fetches the job name from the given jobSpecUri and deletes its corresponding state store