File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
samza-log4j/src/main/java/org/apache/samza/logging/log4j Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ public void append(LoggingEvent event) {
152152 // Emit a metric which can be monitored to ensure it doesn't happen often.
153153 metrics .logMessagesDropped .inc (messagesDropped );
154154 }
155- metrics .bufferFillPct .set (Math .round (100 * logQueue .size () / DEFAULT_QUEUE_SIZE ));
155+ metrics .bufferFillPct .set (Math .round (100f * logQueue .size () / DEFAULT_QUEUE_SIZE ));
156156 }
157157 } catch (Exception e ) {
158158 System .err .println ("[StreamAppender] Error sending log message:" );
@@ -188,7 +188,8 @@ public void close() {
188188 try {
189189 transferThread .join ();
190190 } catch (InterruptedException e ) {
191- log .error ("Interrupted while waiting for sink thread to finish." , e );
191+ log .error ("Interrupted while waiting for transfer thread to finish." , e );
192+ Thread .currentThread ().interrupt ();
192193 }
193194
194195 flushSystemProducer ();
You can’t perform that action at this time.
0 commit comments