@@ -341,7 +341,7 @@ private boolean processBatch(AllocateRequestBatch requestBatch)
341
341
}
342
342
343
343
log .debug (
344
- "Processing [%d] requests for batch [%s], queue time [%s]." ,
344
+ "Processing [%d] requests for batch[%s], queue time[%s]." ,
345
345
requestBatch .size (), requestKey , requestBatch .getQueueTime ()
346
346
);
347
347
@@ -355,21 +355,21 @@ private boolean processBatch(AllocateRequestBatch requestBatch)
355
355
356
356
emitBatchMetric ("task/action/batch/attempts" , 1L , requestKey );
357
357
emitBatchMetric ("task/action/batch/runTime" , (System .currentTimeMillis () - startTimeMillis ), requestKey );
358
- log .info ("Successfully processed [%d / %d] requests in batch [%s]." , successCount , batchSize , requestKey );
358
+ log .debug ("Successfully processed [%d / %d] requests in batch[%s]." , successCount , batchSize , requestKey );
359
359
360
360
if (requestBatch .isEmpty ()) {
361
361
return true ;
362
362
}
363
363
364
364
// Requeue the batch only if used segments have changed
365
- log .debug ("There are [%d] failed requests in batch [%s]." , requestBatch .size (), requestKey );
365
+ log .debug ("There are [%d] failed requests in batch[%s]." , requestBatch .size (), requestKey );
366
366
final Set <DataSegment > updatedUsedSegments = retrieveUsedSegments (requestKey );
367
367
368
368
if (updatedUsedSegments .equals (usedSegments )) {
369
369
log .warn (
370
- "Completing [%d] failed requests in batch [%s] with null value as there"
370
+ "Completing [%d] failed requests in batch[%s] with null value as there"
371
371
+ " are conflicting segments. Cannot retry allocation until the set of"
372
- + " used segments overlapping the allocation interval [%s] changes." ,
372
+ + " used segments overlapping the allocation interval[%s] changes." ,
373
373
size (), requestKey , requestKey .preferredAllocationInterval
374
374
);
375
375
@@ -452,9 +452,9 @@ private int allocateSegmentsForBatch(AllocateRequestBatch requestBatch, Set<Data
452
452
}
453
453
454
454
if (!requestsWithPartialOverlap .isEmpty ()) {
455
- log .info (
456
- "Found [%d] requests in batch [%s] with row intervals that partially overlap existing segments."
457
- + " These cannot be processed until the set of used segments changes. Example request: [%s]" ,
455
+ log .warn (
456
+ "Found [%d] requests in batch[%s] with row intervals that partially overlap existing segments."
457
+ + " These cannot be processed until the set of used segments changes. Example request[%s]" ,
458
458
requestsWithPartialOverlap .size (), requestBatch .key , requestsWithPartialOverlap .get (0 )
459
459
);
460
460
}
@@ -485,7 +485,7 @@ private int allocateSegmentsForInterval(
485
485
486
486
final AllocateRequestKey requestKey = requestBatch .key ;
487
487
log .debug (
488
- "Trying allocation for [%d] requests, interval [%s] in batch [%s]" ,
488
+ "Trying allocation for [%d] requests, interval[%s] in batch[%s]" ,
489
489
requests .size (), tryInterval , requestKey
490
490
);
491
491
@@ -531,14 +531,14 @@ private void emitTaskMetric(String metric, long value, SegmentAllocateRequest re
531
531
{
532
532
final ServiceMetricEvent .Builder metricBuilder = ServiceMetricEvent .builder ();
533
533
IndexTaskUtils .setTaskDimensions (metricBuilder , request .getTask ());
534
- metricBuilder .setDimension ("taskActionType" , SegmentAllocateAction .TYPE );
534
+ metricBuilder .setDimension (DruidMetrics . TASK_ACTION_TYPE , SegmentAllocateAction .TYPE );
535
535
emitter .emit (metricBuilder .setMetric (metric , value ));
536
536
}
537
537
538
538
private void emitBatchMetric (String metric , long value , AllocateRequestKey key )
539
539
{
540
540
final ServiceMetricEvent .Builder metricBuilder = ServiceMetricEvent .builder ();
541
- metricBuilder .setDimension ("taskActionType" , SegmentAllocateAction .TYPE );
541
+ metricBuilder .setDimension (DruidMetrics . TASK_ACTION_TYPE , SegmentAllocateAction .TYPE );
542
542
metricBuilder .setDimension (DruidMetrics .DATASOURCE , key .dataSource );
543
543
metricBuilder .setDimension (DruidMetrics .INTERVAL , key .preferredAllocationInterval .toString ());
544
544
emitter .emit (metricBuilder .setMetric (metric , value ));
@@ -651,15 +651,15 @@ void handleResult(SegmentAllocateResult result, SegmentAllocateRequest request)
651
651
emitTaskMetric ("task/action/success/count" , 1L , request );
652
652
requestToFuture .remove (request ).complete (result .getSegmentId ());
653
653
} else if (request .canRetry ()) {
654
- log .info (
655
- "Allocation failed on attempt [%d] due to error [%s]. Can still retry action [%s]." ,
654
+ log .debug (
655
+ "Allocation failed on attempt [%d] due to error[%s]. Can still retry action[%s]." ,
656
656
request .getAttempts (), result .getErrorMessage (), request .getAction ()
657
657
);
658
658
} else {
659
659
emitTaskMetric ("task/action/failed/count" , 1L , request );
660
660
log .error (
661
- "Exhausted max attempts [%d] for allocation with latest error [%s]."
662
- + " Completing action [%s] with a null value." ,
661
+ "Exhausted max attempts[%d] for allocation with latest error[%s]."
662
+ + " Completing action[%s] with a null value." ,
663
663
request .getAttempts (), result .getErrorMessage (), request .getAction ()
664
664
);
665
665
requestToFuture .remove (request ).complete (null );
0 commit comments