Tabnine Logo
MultipleSpecificSegmentSpec.getDescriptors
Code IndexAdd Tabnine to your IDE (free)

How to use
getDescriptors
method
in
org.apache.druid.query.spec.MultipleSpecificSegmentSpec

Best Java code snippets using org.apache.druid.query.spec.MultipleSpecificSegmentSpec.getDescriptors (Showing top 3 results out of 315)

origin: apache/incubator-druid

private Sequence<Result<TimeseriesResultValue>> toFilteredQueryableTimeseriesResults(
  TimeseriesQuery query,
  List<SegmentId> segmentIds,
  List<Interval> queryIntervals,
  List<Iterable<Result<TimeseriesResultValue>>> results
)
{
 MultipleSpecificSegmentSpec spec = (MultipleSpecificSegmentSpec) query.getQuerySegmentSpec();
 List<Result<TimeseriesResultValue>> ret = new ArrayList<>();
 for (SegmentDescriptor descriptor : spec.getDescriptors()) {
  SegmentId id = SegmentId.dummy(
    StringUtils.format("%s_%s", queryIntervals.indexOf(descriptor.getInterval()), descriptor.getPartitionNumber())
  );
  int index = segmentIds.indexOf(id);
  if (index != -1) {
   Result result = new Result(
     results.get(index).iterator().next().getTimestamp(),
     new BySegmentResultValueClass(
       Lists.newArrayList(results.get(index)),
       id.toString(),
       descriptor.getInterval()
     )
   );
   ret.add(result);
  } else {
   throw new ISE("Descriptor %s not found in server", id);
  }
 }
 return Sequences.simple(ret);
}
origin: apache/incubator-druid

} else if ((int) context.get("count") == 1) {
 Assert.assertTrue("Should retry with 2 missing segments", ((MultipleSpecificSegmentSpec) ((BaseQuery) query).getQuerySegmentSpec()).getDescriptors().size() == 2);
} else {
 Assert.assertTrue("Should retry with 1 missing segments", ((MultipleSpecificSegmentSpec) ((BaseQuery) query).getQuerySegmentSpec()).getDescriptors().size() == 1);
origin: apache/incubator-druid

    new SegmentDescriptor(Intervals.of("2011-11-01/2011-11-10"), "2", 10)
  ),
  ((MultipleSpecificSegmentSpec) spec).getDescriptors()
);
org.apache.druid.query.specMultipleSpecificSegmentSpecgetDescriptors

Popular methods of MultipleSpecificSegmentSpec

  • <init>

Popular in Java

  • Making http requests using okhttp
  • onCreateOptionsMenu (Activity)
  • scheduleAtFixedRate (Timer)
  • compareTo (BigDecimal)
  • String (java.lang)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • JComboBox (javax.swing)
  • JList (javax.swing)
  • Top Vim plugins
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