@InterfaceAudience.Private public class HFileContextAttributesBuilderConsumer extends Object implements Consumer<io.opentelemetry.api.common.AttributesBuilder>
Populate fields on an AttributesBuilder
based on an HFileContext
. Passed around
inside an active Context
, indexed under CONTEXT_KEY
. The class is designed such
that calls to the accept(AttributesBuilder)
method are idempotent with regards to the
instance of this class.
The true and truly ridiculous class name should be something more like
HFileContext_ContextAttributes_AttributesBuilder_Consumer
.
Modifier and Type | Field and Description |
---|---|
static io.opentelemetry.context.ContextKey<Consumer<io.opentelemetry.api.common.AttributesBuilder>> |
CONTEXT_KEY
Used to place extract attributes pertaining to the
HFileContext that scopes the active
Context . |
private HFileContext |
hFileContext |
private HBaseSemanticAttributes.ReadType |
readType |
private boolean |
skipChecksum |
Constructor and Description |
---|
HFileContextAttributesBuilderConsumer(HFileContext hFileContext) |
Modifier and Type | Method and Description |
---|---|
void |
accept(io.opentelemetry.api.common.AttributesBuilder builder) |
HFileContextAttributesBuilderConsumer |
setReadType(HBaseSemanticAttributes.ReadType readType)
Specify the
HBaseSemanticAttributes.ReadType involced in this IO operation. |
HFileContextAttributesBuilderConsumer |
setSkipChecksum(boolean skipChecksum)
Specify that the
ChecksumType should not be included in the attributes. |
public static final io.opentelemetry.context.ContextKey<Consumer<io.opentelemetry.api.common.AttributesBuilder>> CONTEXT_KEY
HFileContext
that scopes the active
Context
.private final HFileContext hFileContext
private boolean skipChecksum
private HBaseSemanticAttributes.ReadType readType
public HFileContextAttributesBuilderConsumer(HFileContext hFileContext)
public HFileContextAttributesBuilderConsumer setSkipChecksum(boolean skipChecksum)
ChecksumType
should not be included in the attributes.public HFileContextAttributesBuilderConsumer setReadType(HBaseSemanticAttributes.ReadType readType)
HBaseSemanticAttributes.ReadType
involced in this IO operation.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.