<pre>
* the map of total bytes on each tier
</pre>

<code>map&lt;string, int64&gt; totalBytesOnTiers = 3;</code>
775177
public java.util.Map<java.lang.String, java.lang.Long> getTotalBytesOnTiersMap() {
    return internalGetTotalBytesOnTiers().getMap();
  }
217876
public long getMemoryUsageBytes() {
    long total = 0;
    for (int i = 0; i < maps_.length; i++) {
      if (maps_[i] != null) {
        total += maps_[i].getMemoryUsageBytes();
      }
    }
    return total;
  }
388668
static <T> Map<T, AggregationData> createAggregationMap(
      Map<T, MutableAggregation> tagValueAggregationMap, Measure measure) {
    Map<T, AggregationData> map = Maps.newHashMap();
    for (Entry<T, MutableAggregation> entry : tagValueAggregationMap.entrySet()) {
      map.put(entry.getKey(), entry.getValue().toAggregationData());
    }
    return map;
  }
871445
public Map<String, Integer> getOnTierPercentages() {
    return mOrderedTierAliases.stream().collect(Collectors.toMap(tier -> tier, tier -> {
      Long sizeOnTier = mSizeOnTier.getOrDefault(tier, 0L);
      return mSize > 0 ? (int) (100 * sizeOnTier / mSize) : 0;
    }));
  }
1268440
public byte[] getAsByteArray(String key) {
        Object value = mValues.get(key);
        if (value instanceof byte[]) {
            return (byte[]) value;
        } else {
            return new byte[]{};
        }
    }

    /**
     * Returns a set of all of the keys and values
     *
     * @return a set of all of the keys and values
     */
    public Set<Map.Entry<String, Object>> valueSet() {
        return mValues.entrySet();
    }

    /**
     * Returns a set of all of the keys
     *
     * @return a set of all of the keys
     */
    public Set<String> keySet() {
        return mValues.keySet();
    }


    public int describeContents() {
        return 0;
    }

    /**
     * Returns a string containing a concise, human-readable description of this object.
     * @return a printable representation of this object.
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        for (String name : mValues.keySet()) {
            String value = getAsString(name);
            if (sb.length() > 0) sb.append(" ");
            sb.append(name + "=" + value);
        }
        return sb.toString();
    }
186666
@Override
    public Map<String, String> values() {
        Map<String, String> values = new LinkedHashMap<>();
        for (Row each : delegates) {
            for (Entry<String, String> entry : each.values().entrySet()) {
                String name = entry.getKey();
                if (!values.containsKey(name)) {
                    values.put(name, entry.getValue());
                }
            }
        }
        return values;
    }
1052326
public Map<String, T> parseMap(byte[] byteArray) throws IOException {
        JsonParser jsonParser = LoganSquare.JSON_FACTORY.createParser(byteArray);
        jsonParser.nextToken();
        return parseMap(jsonParser);
    }
693455
public Map<String, String> toMap() {
    Map<String, String> map = new HashMap<>(size());

    for (String propertyName : this) {
      map.put(propertyName, get(propertyName));
    }

    return map;
  }
481647
public static <T> Map<T, Integer> countMap(Iterable<T> iter) {
		return countMap(null == iter ? null : iter.iterator());
	}
793130
public static <E, N extends Number> Counter<E> fromMap(final Map<E, N> map, final Class<N> type) {
    // get our initial total
    double initialTotal = 0;
    for (Map.Entry<E, N> entry : map.entrySet()) {
      initialTotal += entry.getValue().doubleValue();
    }

    // and pass it in to the returned inner class with a final variable
    final double initialTotalFinal = initialTotal;

    return new AbstractCounter<E>() {
      double total = initialTotalFinal;
      double defRV = 0.0;

      public void clear() {
        map.clear();
        total = 0.0;
      }

      public boolean containsKey(E key) {
        return map.containsKey(key);
      }

      public void setDefaultReturnValue(double rv) {
        defRV = rv;
      }

      public double defaultReturnValue() {
        return defRV;
      }

      @Override
      @SuppressWarnings("unchecked")
      public boolean equals(Object o) {
        if (this == o) {
          return true;
        } else if (!(o instanceof Counter)) {
          return false;
        } else {
          return Counters.equals(this, (Counter<E>) o);
        }
      }

      @Override
      public int hashCode() {
        return map.hashCode();
      }

      public Set<Entry<E, Double>> entrySet() {
        return new AbstractSet<Entry<E, Double>>() {
          Set<Entry<E, N>> entries = map.entrySet();

          @Override
          public Iterator<Entry<E, Double>> iterator() {
            return new Iterator<Entry<E, Double>>() {
              Iterator<Entry<E, N>> it = entries.iterator();
              Entry<E, N> lastEntry; // = null;

              public boolean hasNext() {
                return it.hasNext();
              }

              public Entry<E, Double> next() {
                final Entry<E, N> entry = it.next();
                lastEntry = entry;

                return new Entry<E, Double>() {
                  public E getKey() {
                    return entry.getKey();
                  }

                  public Double getValue() {
                    return entry.getValue().doubleValue();
                  }

                  public Double setValue(Double value) {
                    final double lastValue = entry.getValue().doubleValue();
                    double rv;

                    if (type == Double.class) {
                      rv = ErasureUtils.<Entry<E, Double>> uncheckedCast(entry).setValue(value);
                    } else if (type == Integer.class) {
                      rv = ErasureUtils.<Entry<E, Integer>> uncheckedCast(entry).setValue(value.intValue());
                    } else if (type == Float.class) {
                      rv = ErasureUtils.<Entry<E, Float>> uncheckedCast(entry).setValue(value.floatValue());
                    } else if (type == Long.class) {
                      rv = ErasureUtils.<Entry<E, Long>> uncheckedCast(entry).setValue(value.longValue());
                    } else if (type == Short.class) {
                      rv = ErasureUtils.<Entry<E, Short>> uncheckedCast(entry).setValue(value.shortValue());
                    } else {
                      throw new RuntimeException("Unrecognized numeric type in wrapped counter");
                    }

                    // need to call getValue().doubleValue() to make sure
                    // we keep the same precision as the underlying map
                    total += entry.getValue().doubleValue() - lastValue;

                    return rv;
                  }
                };
              }

              public void remove() {
                total -= lastEntry.getValue().doubleValue();
                it.remove();
              }
            };
          }

          @Override
          public int size() {
            return map.size();
          }
        };
      }

      public double getCount(Object key) {
        final Number value = map.get(key);
        return value != null ? value.doubleValue() : defRV;
      }

      public Factory<Counter<E>> getFactory() {
        return new Factory<Counter<E>>() {

          private static final long serialVersionUID = -4063129407369590522L;

          public Counter<E> create() {
            // return a HashMap backed by the same numeric type to
            // keep the precision of the returned counter consistent with
            // this one's precision
            return fromMap(new HashMap<E, N>(), type);
          }
        };
      }

      public Set<E> keySet() {
        return new AbstractSet<E>() {
          @Override
          public Iterator<E> iterator() {
            return new Iterator<E>() {
              Iterator<E> it = map.keySet().iterator();

              public boolean hasNext() {
                return it.hasNext();
              }

              public E next() {
                return it.next();
              }

              public void remove() {
                throw new UnsupportedOperationException("Cannot remove from key set");
              }
            };
          }

          @Override
          public int size() {
            return map.size();
          }
        };
      }

      public double remove(E key) {
        final Number removed = map.remove(key);
        if (removed != null) {
          final double rv = removed.doubleValue();
          total -= rv;
          return rv;
        }
        return defRV;
      }

      public void setCount(E key, double value) {
        final Double lastValue;
        double newValue;

        if (type == Double.class) {
          lastValue = ErasureUtils.<Map<E, Double>> uncheckedCast(map).put(key, value);
          newValue = value;
        } else if (type == Integer.class) {
          final Integer last = ErasureUtils.<Map<E, Integer>> uncheckedCast(map).put(key, (int) value);
          lastValue = last != null ? last.doubleValue() : null;
          newValue = ((int) value);
        } else if (type == Float.class) {
          final Float last = ErasureUtils.<Map<E, Float>> uncheckedCast(map).put(key, (float) value);
          lastValue = last != null ? last.doubleValue() : null;
          newValue = ((float) value);
        } else if (type == Long.class) {
          final Long last = ErasureUtils.<Map<E, Long>> uncheckedCast(map).put(key, (long) value);
          lastValue = last != null ? last.doubleValue() : null;
          newValue = ((long) value);
        } else if (type == Short.class) {
          final Short last = ErasureUtils.<Map<E, Short>> uncheckedCast(map).put(key, (short) value);
          lastValue = last != null ? last.doubleValue() : null;
          newValue = ((short) value);
        } else {
          throw new RuntimeException("Unrecognized numeric type in wrapped counter");
        }

        // need to use newValue instead of value to make sure we
        // keep same precision as underlying map.
        total += newValue - (lastValue != null ? lastValue : 0);
      }

      public int size() {
        return map.size();
      }

      public double totalCount() {
        return total;
      }

      public Collection<Double> values() {
        return new AbstractCollection<Double>() {
          @Override
          public Iterator<Double> iterator() {
            return new Iterator<Double>() {
              final Iterator<N> it = map.values().iterator();

              public boolean hasNext() {
                return it.hasNext();
              }

              public Double next() {
                return it.next().doubleValue();
              }

              public void remove() {
                throw new UnsupportedOperationException("Cannot remove from values collection");
              }
            };
          }

          @Override
          public int size() {
            return map.size();
          }
        };
      }

      /**
       * {@inheritDoc}
       */
      public void prettyLog(RedwoodChannels channels, String description) {
        PrettyLogger.log(channels, description, map);
      }
    };
  }
618330
public int getTotalTriples() throws Exception {
		int total = 0;
		for (HashMap<String, Integer> mappingStat : statistics.values()) {
			for (Integer triplesCount : mappingStat.values()) {
				int triples = triplesCount.intValue();
				if (triples == -1) {
					throw new Exception("An error was occurred in the counting process.");
				}
				total = total + triples;
			}
		}
		return total;
	}
1340539
public Map<Any2<Integer, String>, String> getStringMap() {
        return data.entrySet().stream()
                .collect(Collectors.toMap(Map.Entry::getKey, entry -> entry.getValue().mapCombine(Object::toString, Object::toString, Object::toString)));
    }
118538
public int countMapTasks() {
    int mapCount = 0;
    for (Iterator<TaskStatus> it = taskReports.iterator(); it.hasNext();) {
      TaskStatus ts = (TaskStatus) it.next();
      if (ts.getIsMap() && isTaskRunning(ts)) {
        mapCount++;
      }
    }
    return mapCount;
  }
857700
public static String mapToString(Map map)
    {
        Set entries = map.entrySet();
        Iterator iter = entries.iterator();
        StringBuffer buff = new StringBuffer();
        while (iter.hasNext())
        {
            Map.Entry entry = (Map.Entry) iter.next();
            buff.append("[" + entry.getKey() + "," + entry.getValue() + "]\n");
        }
        return buff.toString();
    }
1004124
public static String mapToString(Map<String, ?> map) {
        StringBuilder sb = new StringBuilder();
        sb.append("{\n");
        for (String key : map.keySet()) {
            if (map.get(key) != null) {
                sb.append(key + ": " + map.get(key) + "\n ");
            } else {
                continue;
            }
        }
        sb.append("}");
        return sb.toString();
    }
938741
public static <T> DataSet<Tuple2<Integer, Long>> countElementsPerPartition(DataSet<T> input) {
		return input.mapPartition(new RichMapPartitionFunction<T, Tuple2<Integer, Long>>() {
			@Override
			public void mapPartition(Iterable<T> values, Collector<Tuple2<Integer, Long>> out) throws Exception {
				long counter = 0;
				for (T value : values) {
					counter++;
				}
				out.collect(new Tuple2<>(getRuntimeContext().getIndexOfThisSubtask(), counter));
			}
		});
	}
187893
public alluxio.grpc.TierList getAddedBlocksOnTiersOrDefault(
      java.lang.String key,
      alluxio.grpc.TierList defaultValue) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, alluxio.grpc.TierList> map =
        internalGetAddedBlocksOnTiers().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }