public static String getStorageDir ( DataSegment segment ) { return JOINER . join ( segment . getDataSource ( ) , String . format ( "%s_%s" , segment . getInterval ( ) . getStart ( ) , segment . getInterval ( ) . getEnd ( ) ) , segment . getVersion ( ) , segment . getShardSpec ( ) . getPartitionNum ( ) ) ; }
on segment deletion if segment being deleted was the only segment