Tabnine Logo
IncrementalIndex$MetricDesc
Code IndexAdd Tabnine to your IDE (free)

How to use
IncrementalIndex$MetricDesc
in
org.apache.druid.segment.incremental

Best Java code snippets using org.apache.druid.segment.incremental.IncrementalIndex$MetricDesc (Showing top 6 results out of 315)

origin: apache/incubator-druid

MetricDesc metricDesc = new MetricDesc(metricDescs.size(), metric);
metricDescs.put(metricDesc.getName(), metricDesc);
columnCapabilities.put(metricDesc.getName(), metricDesc.getCapabilities());
origin: apache/incubator-druid

@Nullable
public String getMetricType(String metric)
{
 final MetricDesc metricDesc = metricDescs.get(metric);
 return metricDesc != null ? metricDesc.getType() : null;
}
origin: org.apache.druid/druid-processing

MetricDesc metricDesc = new MetricDesc(metricDescs.size(), metric);
metricDescs.put(metricDesc.getName(), metricDesc);
columnCapabilities.put(metricDesc.getName(), metricDesc.getCapabilities());
origin: org.apache.druid/druid-processing

public ColumnValueSelector<?> makeMetricColumnValueSelector(String metric, IncrementalIndexRowHolder currEntry)
{
 MetricDesc metricDesc = metricDescs.get(metric);
 if (metricDesc == null) {
  return NilColumnValueSelector.instance();
 }
 int metricIndex = metricDesc.getIndex();
 switch (metricDesc.getCapabilities().getType()) {
  case COMPLEX:
   return new ObjectMetricColumnSelector(metricDesc, currEntry, metricIndex);
  case LONG:
   return new LongMetricColumnSelector(currEntry, metricIndex);
  case FLOAT:
   return new FloatMetricColumnSelector(currEntry, metricIndex);
  case DOUBLE:
   return new DoubleMetricColumnSelector(currEntry, metricIndex);
  case STRING:
   throw new IllegalStateException("String is not a metric column type");
  default:
   throw new ISE("Unknown metric value type: %s", metricDesc.getCapabilities().getType());
 }
}
origin: org.apache.druid/druid-processing

@Nullable
public String getMetricType(String metric)
{
 final MetricDesc metricDesc = metricDescs.get(metric);
 return metricDesc != null ? metricDesc.getType() : null;
}
origin: apache/incubator-druid

public ColumnValueSelector<?> makeMetricColumnValueSelector(String metric, IncrementalIndexRowHolder currEntry)
{
 MetricDesc metricDesc = metricDescs.get(metric);
 if (metricDesc == null) {
  return NilColumnValueSelector.instance();
 }
 int metricIndex = metricDesc.getIndex();
 switch (metricDesc.getCapabilities().getType()) {
  case COMPLEX:
   return new ObjectMetricColumnSelector(metricDesc, currEntry, metricIndex);
  case LONG:
   return new LongMetricColumnSelector(currEntry, metricIndex);
  case FLOAT:
   return new FloatMetricColumnSelector(currEntry, metricIndex);
  case DOUBLE:
   return new DoubleMetricColumnSelector(currEntry, metricIndex);
  case STRING:
   throw new IllegalStateException("String is not a metric column type");
  default:
   throw new ISE("Unknown metric value type: %s", metricDesc.getCapabilities().getType());
 }
}
org.apache.druid.segment.incrementalIncrementalIndex$MetricDesc

Most used methods

  • <init>
  • getCapabilities
  • getIndex
  • getName
  • getType

Popular in Java

  • Making http requests using okhttp
  • notifyDataSetChanged (ArrayAdapter)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • putExtra (Intent)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now