mirror of
https://github.com/twitter/the-algorithm.git
synced 2024-06-01 08:48:46 +02:00
Merge e401eefc30
into 72eda9a24f
This commit is contained in:
commit
cb1448c3c1
|
@ -949,7 +949,6 @@ public class EarlybirdServer implements EarlybirdService.ServiceIface, ServerSet
|
|||
protected static class EarlybirdThriftRequestLoggingUtil {
|
||||
private static final int DEFAULT_MAX_ENTRIES_TO_LOG = 50000;
|
||||
private static final int DEFAULT_BUFFER_SIZE = 10000;
|
||||
private static final int DEFAULT_LOGGING_SLEEP_MS = 100;
|
||||
|
||||
@VisibleForTesting
|
||||
protected static volatile boolean thriftLoggerBusy = false;
|
||||
|
@ -998,13 +997,8 @@ public class EarlybirdServer implements EarlybirdService.ServiceIface, ServerSet
|
|||
try {
|
||||
int count = 0;
|
||||
while (count < maxEntriesToLog) {
|
||||
if (REQUEST_BUFFER.isEmpty()) {
|
||||
Thread.sleep(DEFAULT_LOGGING_SLEEP_MS);
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
EarlybirdRequest ebRequest = REQUEST_BUFFER.poll();
|
||||
EarlybirdRequest ebRequest = REQUEST_BUFFER.take();
|
||||
String logLine = serializeThriftObject(ebRequest, serializer);
|
||||
thriftLogWriter.write(logLine);
|
||||
count++;
|
||||
|
|
Loading…
Reference in New Issue
Block a user