@Override public IMetricValue convert(MetricCollector collector) { CubeSearcher searcher = collector.getSearcher(); FieldDefinition fieldDef = collector.getFieldDefinition(); MetricValueText.Min txt = new MetricValueText.Min(); if (metric != Long.MAX_VALUE) { ValueSearcher vs = searcher.getValueSearcher(fieldDef.getTableName(), fieldDef.getName()); txt.value = vs.getValue((int) metric).toString(); } return txt; }
@Override public IMetricValue convert(MetricCollector collector) { CubeSearcher searcher = collector.getSearcher(); FieldDefinition fieldDef = collector.getFieldDefinition(); MetricValueText.Max txt = new MetricValueText.Max(); if (metric != Long.MIN_VALUE) { IdSearcher ids = searcher.getIdSearcher(fieldDef.getLinkExtent()); txt.value = ids.getId((int) metric).toString(); } return txt; }
public DirectXLinkCollector(CubeSearcher searcher, FieldDefinition fieldDef, XGroups groups) { super(searcher); this.groups = groups; ValueSearcher vs = searcher.getValueSearcher(fieldDef.getTableName(), fieldDef.getXLinkJunction()); fieldSets = new BdLongSet[vs.size()]; for (int i = 0; i < vs.size(); i++) { BSTR val = vs.getValue(i); BdLongSet set = groups.groupsMap.get(val); fieldSets[i] = set; } fs = searcher.getFieldSearcher(fieldDef.getTableName(), fieldDef.getXLinkJunction()); iter = new IntIterator(); }
public LinksIterable( FieldDefinition link, List<Integer> shards, ObjectID continuation, boolean inclusive, Iterable<ObjectID> keys) { m_link = link; m_shards = shards; if (m_shards == null) { m_shards = new ArrayList<Integer>(1); m_shards.add(0); if (link.isSharded()) m_shards.addAll(SpiderService.instance().getShards(link.getInverseTableDef()).keySet()); } m_continuation = continuation; m_inclusive = inclusive; m_keys = keys; }