@Override public Set<String> getTagNames() { return tags.keySet(); }
public static Map<TblColRef, Dictionary<String>> buildDictionary(final CubeInstance cubeInstance, Iterable<List<String>> recordList) throws IOException { final List<TblColRef> columnsNeedToBuildDictionary = cubeInstance.getDescriptor() .listDimensionColumnsExcludingDerived(true); final HashMap<Integer, TblColRef> tblColRefMap = Maps.newHashMap(); int index = 0; for (TblColRef column : columnsNeedToBuildDictionary) { tblColRefMap.put(index++, column); } HashMap<TblColRef, Dictionary<String>> result = Maps.newHashMap(); HashMultimap<TblColRef, String> valueMap = HashMultimap.create(); for (List<String> row : recordList) { for (int i = 0; i < row.size(); i++) { String cell = row.get(i); if (tblColRefMap.containsKey(i)) { valueMap.put(tblColRefMap.get(i), cell); } } } for (TblColRef tblColRef : valueMap.keySet()) { Set<String> values = valueMap.get(tblColRef); Dictionary<String> dict = DictionaryGenerator.buildDictionary(tblColRef.getType(), new IterableDictionaryValueEnumerator(values)); result.put(tblColRef, dict); } return result; }
Set<String> filterTagNames = filterTags.keySet(); if (filterTagNames.size() != 0)
public Set<K> keySet() { return innerCache.keySet(); }
List<String> list = new ArrayList<>(map.keySet()); list.sort((a, b) -> Integer.compare( map.get(b).size(),
this.names.addAll( this.byName.keySet() );
for (String key : schemasMap.keySet()) { String cat = key.split("#")[0]; String schema = key.split("#")[1]; for (String key : catalogMap.keySet()) { KylinMetaImpl.MetaCatalog metaCatalog = new KylinMetaImpl.MetaCatalog(key, new ArrayList<KylinMetaImpl.MetaSchema>(catalogMap.get(key))); catalogs.add(metaCatalog);
for (String k : mm.keySet()) { lines.add(k + "=" + String.join(",", mm.get(k)));
public Set<UnnamedToroIndex> getToroUnnamedIndexes() { return memory.toroToDb.keySet(); }
public Set<K> keySet() { return innerCache.keySet(); }
public Set<UnnamedDbIndex> getDbIndexes() { return memory.dbToToro.keySet(); }
private void logCardsPerPlayer() { for (int player : this.cardsPerPlayer.keySet()) { Set<Card> cards = this.cardsPerPlayer.get(player); LOGGER.info("Player:{}, cards:{}", player, cards.toString()); } } }
private void logCardCountPerPlayer() { for (int player : this.cardsPerPlayer.keySet()) { Set<Card> cards = this.cardsPerPlayer.get(player); LOGGER.info("Player:{} has {} cards", player, cards.size()); } }
protected Set<IndexMatch> buildNodeList(HashMultimap<String,JexlNode> ids, IndexMatchType type, boolean allowsDelayed, List<JexlNode> delayedNodes) { Set<IndexMatch> matches = Sets.newHashSet(); for (String uid : ids.keySet()) { Set<JexlNode> nodes = Sets.newHashSet(ids.get(uid)); // make sure that we have nodes, otherwise we are pruned to nothing if ((nodes.size()) > 1 || (allowsDelayed && (nodes.size() + delayedNodes.size()) > 1)) { nodes.addAll(delayedNodes); IndexMatch currentMatch = new IndexMatch(nodes, uid, type); matches.add(currentMatch); } } return matches; }
private void updateEstimatedCompactionsByTasks(HashMultimap<Long, SSTableReader> tasks) { int n = 0; long now = this.highestWindowSeen; for(Long key : tasks.keySet()) { // For current window, make sure it's compactable if (key.compareTo(now) >= 0 && tasks.get(key).size() >= cfs.getMinimumCompactionThreshold()) n++; else if (key.compareTo(now) < 0 && tasks.get(key).size() >= 2) n++; } this.estimatedRemainingTasks = n; }
private void updateEstimatedCompactionsByTasks(HashMultimap<Long, SSTableReader> tasks) { int n = 0; long now = this.highestWindowSeen; for(Long key : tasks.keySet()) { // For current window, make sure it's compactable if (key.compareTo(now) >= 0 && tasks.get(key).size() >= cfs.getMinimumCompactionThreshold()) n++; else if (key.compareTo(now) < 0 && tasks.get(key).size() >= 2) n++; } this.estimatedRemainingTasks = n; }
/** * Inserts all features currently stored in this object into the working tree. */ public void flushAll() { for (String key : map.keySet()) { flush(key); } count = 0; map.clear(); }
private void updateEstimatedCompactionsByTasks(HashMultimap<Long, SSTableReader> tasks) { int n = 0; long now = this.highestWindowSeen; for(Long key : tasks.keySet()) { // For current window, make sure it's compactable if (key.compareTo(now) >= 0 && tasks.get(key).size() >= cfs.getMinimumCompactionThreshold()) n++; else if (key.compareTo(now) < 0 && tasks.get(key).size() >= 2) n++; } this.estimatedRemainingTasks = n; }
private void processNodePaths(JobPrototype jobPrototype, HashMultimap<Target, NodePath> nodePaths) { if (nodePaths != null) { for (Target target : nodePaths.keySet()) { globalNodeDeclarations.add(formatTargetNodeDeclaration(target)); for (NodePath nodePath : nodePaths.get(target)) { addNodePathDeclarations(jobPrototype, nodePath); addNodePathChain(nodePath, jobPrototype); nodePathChains.add(formatNodeCollection( Lists.newArrayList(formatPCollection(nodePath.descendingIterator().next(), jobPrototype), String.format("\"%s\"", limitNodeNameLength(target.toString()))))); } } } }
/** * Returns the Attributes from this class involved in a each identifier as a * Map. * * @return */ private HashMultimap<BigInteger, String> getIdentifierAttributeNames() { HashMultimap<BigInteger, Attribute> map = getIdentifierAttributes(); HashMultimap<BigInteger, String> m = create(); for (BigInteger i : map.keySet()) { m.putAll(i, getNames(map.get(i))); } return m; }