@Override
  public KeyValueIterator<byte[], byte[]> range(byte[] from, byte[] to) {
    this.metrics.ranges().inc();
    Preconditions.checkArgument(from != null, "Null argument 'from' not allowed");
    Preconditions.checkArgument(to != null, "Null argument 'to' not allowed");
    return new InMemoryIterator(this.underlying.subMap(from, to).entrySet().iterator(), this.metrics);
  }
@param metrics A metrics instance to publish key-value store related statistics
samza-kv-inmemory/src/main/java/org/apache/samza/storage/kv/inmemory/InMemoryKeyValueStore.java