Log queryId when a small stripe get MAX_BYTES flush
@@ -36,6 +36,7 @@ import com.facebook.presto.spi.type.Type;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
+import io.airlift.log.Logger;
import io.airlift.slice.Slice;
import io.airlift.slice.Slices;
import org.joda.time.DateTimeZone;
@@ -76,6 +77,7 @@ public class OrcWriter
implements Closeable
{
private static final int INSTANCE_SIZE = ClassLayout.parseClass(OrcWriter.class).instanceSize();
+ private static final Logger log = Logger.get(OrcWriter.class);
static final String PRESTO_ORC_WRITER_VERSION_METADATA_KEY = "presto.writer.version";
static final String PRESTO_ORC_WRITER_VERSION;
@@ -413,6 +415,11 @@ public class OrcWriter
closedStripesRetainedBytes += closedStripe.getRetainedSizeInBytes();
recordValidation(validation -> validation.addStripe(stripeInformation.getNumberOfRows()));
stats.recordStripeWritten(flushReason, stripeInformation.getTotalLength(), stripeInformation.getNumberOfRows(), dictionaryCompressionOptimizer.getDictionaryMemoryBytes());
+
+ if (flushReason == MAX_BYTES && stripeInformation.getTotalLength() < stripeMaxBytes / 2) {
+ log.debug("Small stripe with size %s get MAX_BYTES flush. QueryId: %s", stripeInformation.getTotalLength(), userMetadata.get("presto_query_id"));
+ }
+
return outputData;
}
