Class TracingSpoolingManager

java.lang.Object
io.trino.spooling.filesystem.TracingSpoolingManager
All Implemented Interfaces:
io.trino.spi.protocol.SpoolingManager

public class TracingSpoolingManager extends Object implements io.trino.spi.protocol.SpoolingManager
  • Field Details

    • SEGMENT_ID

      public static final io.opentelemetry.api.common.AttributeKey<String> SEGMENT_ID
    • SEGMENT_QUERY_ID

      public static final io.opentelemetry.api.common.AttributeKey<String> SEGMENT_QUERY_ID
    • SEGMENT_ENCODING

      public static final io.opentelemetry.api.common.AttributeKey<String> SEGMENT_ENCODING
    • SEGMENT_SIZE

      public static final io.opentelemetry.api.common.AttributeKey<Long> SEGMENT_SIZE
    • SEGMENT_ROWS

      public static final io.opentelemetry.api.common.AttributeKey<Long> SEGMENT_ROWS
    • SEGMENT_EXPIRATION

      public static final io.opentelemetry.api.common.AttributeKey<String> SEGMENT_EXPIRATION
  • Method Details

    • create

      public io.trino.spi.protocol.SpooledSegmentHandle create(io.trino.spi.protocol.SpoolingContext context)
      Specified by:
      create in interface io.trino.spi.protocol.SpoolingManager
    • createOutputStream

      public OutputStream createOutputStream(io.trino.spi.protocol.SpooledSegmentHandle handle) throws IOException
      Specified by:
      createOutputStream in interface io.trino.spi.protocol.SpoolingManager
      Throws:
      IOException
    • openInputStream

      public InputStream openInputStream(io.trino.spi.protocol.SpooledSegmentHandle handle) throws IOException
      Specified by:
      openInputStream in interface io.trino.spi.protocol.SpoolingManager
      Throws:
      IOException
    • acknowledge

      public void acknowledge(io.trino.spi.protocol.SpooledSegmentHandle handle) throws IOException
      Specified by:
      acknowledge in interface io.trino.spi.protocol.SpoolingManager
      Throws:
      IOException
    • directLocation

      public Optional<io.trino.spi.protocol.SpooledLocation.DirectLocation> directLocation(io.trino.spi.protocol.SpooledSegmentHandle handle) throws IOException
      Specified by:
      directLocation in interface io.trino.spi.protocol.SpoolingManager
      Throws:
      IOException
    • location

      public io.trino.spi.protocol.SpooledLocation location(io.trino.spi.protocol.SpooledSegmentHandle handle) throws IOException
      Specified by:
      location in interface io.trino.spi.protocol.SpoolingManager
      Throws:
      IOException
    • handle

      public io.trino.spi.protocol.SpooledSegmentHandle handle(io.airlift.slice.Slice identifier, Map<String,List<String>> headers)
      Specified by:
      handle in interface io.trino.spi.protocol.SpoolingManager
    • withTracing

      public static <E extends Exception> void withTracing(io.opentelemetry.api.trace.Span span, TracingSpoolingManager.CheckedRunnable<E> runnable) throws E
      Throws:
      E
    • span

      public static io.opentelemetry.api.trace.Span span(io.opentelemetry.api.trace.Tracer tracer, io.trino.spi.protocol.SpooledSegmentHandle handle, String name)
    • withTracing

      public static <T, E extends Exception> T withTracing(io.opentelemetry.api.trace.Span span, TracingSpoolingManager.CheckedSupplier<T,E> supplier) throws E
      Throws:
      E