long
59606162636465666768
public void incrCounter(String group, String counter, long amount) { if (count2.containsKey(group) == false) { count2.put(group, new HashMap<String,MutableLong>()); } if (count2.get(group).containsKey(counter) == false) { count2.get(group).put(counter, new MutableLong(0)); } count2.get(group).get(counter).add(amount); }
1213141516171819
private MutableLong commReadBufferSizeBytes; private MutableLong commWriteBufferSizeBytes; public CommBufferSizeStats() { commReadBufferSizeBytes = new MutableLong(0); commWriteBufferSizeBytes = new MutableLong(0); }
484950515253545556
} @Override public void incrCounter(Enum<?> key, long amount) { if (!count1.containsKey(key)) { count1.put(key, new MutableLong(0)); } count1.get(key).add(amount); }
public void incrCounter(String group, String counter, long amount) { if (!count2.containsKey(group)) { count2.put(group, new HashMap<String,MutableLong>()); } if (!count2.get(group).containsKey(counter)) { count2.get(group).put(counter, new MutableLong(0)); } count2.get(group).get(counter).add(amount); }
60616263646566676869707172
Pair<V,MutableLong> data = dataMap.get(key); if (data == null) { return null; } else { V value = data.getFirst(); MutableLong count = data.getSecond(); long oldCount = count.longValue(); count.increment(); incrementHit(key, oldCount); return value; } }
102103104105106107108109110111112
return; } if (capacity == dataMap.size()) { // Cache Full removeLeastFrequent(); } MutableLong count = new MutableLong(1L); Pair<V,MutableLong> data = new Pair<V,MutableLong>(value, count); dataMap.put(key, data); Long countKey = 1L; Set<K> keys = evictionMap.get(countKey);
253254255256257258259260261262263
Pair<List<Integer>,Long> p = it.next(); //items += p.getFirst().size(); //count++; for (Integer i : p.getFirst()) { if (!frequencyList.containsKey(i)) { frequencyList.put(i, new MutableLong(0)); } frequencyList.get(i).add(p.getSecond()); } } return frequencyList;
263264265266267268269270271272273
int count = 0; for (Set<ByteSequence> cfset : groups.values()) { HashMap<ByteSequence,MutableLong> map = new HashMap<ByteSequence,MutableLong>(); for (ByteSequence bs : cfset) map.put(bs, new MutableLong(1)); this.groupFams[count++] = map; nonDefaultColumnFamilies.addAll(cfset); } partitioner = new LocalityGroupUtil.Partitioner(this.groupFams);
554555556557558559560561562563564
TabletClientService.Iface client = null; TInfo tinfo = Tracer.traceInfo(); Map<Long,CMK> cmidToCm = new HashMap<Long,CMK>(); MutableLong cmid = new MutableLong(0); SessionID sessionId = null; try { Map<TKeyExtent,List<TConditionalMutation>> tmutations = new HashMap<TKeyExtent,List<TConditionalMutation>>();
185186187188189190191192193194195
//items += p.getFirst().size(); //count++; IntArrayList items= p.getFirst(); for (int idx = 0; idx < items.size(); idx++) { if (!frequencyList.containsKey(items.get(idx))) { frequencyList.put(items.get(idx), new MutableLong(0)); } frequencyList.get(items.get(idx)).add(p.getSecond()); } } return frequencyList;