Skip to content

Commit

Permalink
OBSDATA-483: Rename enum
Browse files Browse the repository at this point in the history
  • Loading branch information
kkonstantine committed Dec 16, 2022
1 parent b062336 commit 0251a5d
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;

import static org.apache.druid.data.input.opencensus.protobuf.HybridProtobufReader.ProtobufReader.OPEN_CENSUS;
import static org.apache.druid.data.input.opencensus.protobuf.HybridProtobufReader.ProtobufReader.OPEN_TELEMETRY;
import static org.apache.druid.data.input.opencensus.protobuf.HybridProtobufReader.ProtobufReader.OPENCENSUS;
import static org.apache.druid.data.input.opencensus.protobuf.HybridProtobufReader.ProtobufReader.OPENTELEMETRY;

public class HybridProtobufReader implements InputEntityReader
{
Expand All @@ -53,8 +53,8 @@ public class HybridProtobufReader implements InputEntityReader
private volatile MethodHandle getHeaderMethod = null;

enum ProtobufReader {
OPEN_CENSUS,
OPEN_TELEMETRY
OPENCENSUS,
OPENTELEMETRY
}

public HybridProtobufReader(
Expand Down Expand Up @@ -83,7 +83,7 @@ public CloseableIterator<InputRow> read() throws IOException
public InputEntityReader newReader(ProtobufReader which)
{
switch(which) {
case OPEN_TELEMETRY:
case OPENTELEMETRY:
return new OpenTelemetryMetricsProtobufReader(
dimensionsSpec,
source,
Expand All @@ -92,7 +92,7 @@ public InputEntityReader newReader(ProtobufReader which)
metricLabelPrefix,
resourceLabelPrefix
);
case OPEN_CENSUS:
case OPENCENSUS:
default:
return new OpenCensusProtobufReader(
dimensionsSpec,
Expand Down Expand Up @@ -121,14 +121,14 @@ public ProtobufReader whichReader()
int version =
ByteBuffer.wrap(versionHeader).order(ByteOrder.LITTLE_ENDIAN).getInt();
if (version == OPENTELEMETRY_FORMAT_VERSION) {
return OPEN_TELEMETRY;
return OPENTELEMETRY;
}
}
}
catch (Throwable t) {
// assume input is opencensus if something went wrong
}
return OPEN_CENSUS;
return OPENCENSUS;
}

@Override
Expand Down

0 comments on commit 0251a5d

Please sign in to comment.