@Test public void testFindBestMatchCuboid() { CuboidTree cuboidTree = createCuboidTree1(); PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out, StandardCharsets.UTF_8)); cuboidTree.print(out); out.flush(); assertEquals(503L, cuboidTree.findBestMatchCuboid(503L)); long bestMatch1 = cuboidTree.findBestMatchCuboid(Long.parseLong("100000000", 2)); assertEquals(263, bestMatch1); long bestMatch2 = cuboidTree.findBestMatchCuboid(Long.parseLong("100010000", 2)); assertEquals(304, bestMatch2); }
@Override public long findBestMatchCuboid(long cuboidId) { return cuboidTree.findBestMatchCuboid(cuboidId); }
TreeCuboidScheduler extends CuboidScheduler { @Override public long findBestMatchCuboid(long cuboidId) { return cuboidTree.findBestMatchCuboid(cuboidId); } }
TreeCuboidScheduler extends CuboidScheduler { @Override public long findBestMatchCuboid(long cuboidId) { return cuboidTree.findBestMatchCuboid(cuboidId); } TreeCuboidScheduler(CubeDesc cubeDesc, List<Long> allCuboidIds, Comparator<Long> cuboidComparator); }
TreeCuboidScheduler extends CuboidScheduler { @Override public long findBestMatchCuboid(long cuboidId) { return cuboidTree.findBestMatchCuboid(cuboidId); } TreeCuboidScheduler(CubeDesc cubeDesc, List<Long> allCuboidIds, Comparator<Long> cuboidComparator); @Override Set<Long> getAllCuboidIds(); @Override int getCuboidCount(); @Override List<Long> getSpanningCuboid(long cuboidId); @Override long findBestMatchCuboid(long cuboidId); @Override boolean isValid(long requestCuboid); @Override String getCuboidCacheKey(); @Override Set<Long> calculateCuboidsForAggGroup(AggregationGroup agg); }
TreeCuboidScheduler extends CuboidScheduler { @Override public long findBestMatchCuboid(long cuboidId) { return cuboidTree.findBestMatchCuboid(cuboidId); } TreeCuboidScheduler(CubeDesc cubeDesc, List<Long> allCuboidIds, Comparator<Long> cuboidComparator); @Override Set<Long> getAllCuboidIds(); @Override int getCuboidCount(); @Override List<Long> getSpanningCuboid(long cuboidId); @Override long findBestMatchCuboid(long cuboidId); @Override boolean isValid(long requestCuboid); @Override String getCuboidCacheKey(); @Override Set<Long> calculateCuboidsForAggGroup(AggregationGroup agg);  }