hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject [30/51] [partial] hbase-site git commit: Published site at e58c0385a738df63fa3fff287e1ddcfe6da1d046.
Date Mon, 22 Feb 2016 16:22:54 GMT
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/f6cc9224/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HStore.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HStore.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HStore.html
index 4504336..bda4d11 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HStore.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HStore.html
@@ -1896,495 +1896,578 @@
 <span class="sourceLineNo">1888</span>  }<a name="line.1888"></a>
 <span class="sourceLineNo">1889</span><a name="line.1889"></a>
 <span class="sourceLineNo">1890</span>  @Override<a name="line.1890"></a>
-<span class="sourceLineNo">1891</span>  public long getStoreSizeUncompressed() {<a name="line.1891"></a>
-<span class="sourceLineNo">1892</span>    return this.totalUncompressedBytes;<a name="line.1892"></a>
-<span class="sourceLineNo">1893</span>  }<a name="line.1893"></a>
-<span class="sourceLineNo">1894</span><a name="line.1894"></a>
-<span class="sourceLineNo">1895</span>  @Override<a name="line.1895"></a>
-<span class="sourceLineNo">1896</span>  public long getStorefilesSize() {<a name="line.1896"></a>
-<span class="sourceLineNo">1897</span>    long size = 0;<a name="line.1897"></a>
-<span class="sourceLineNo">1898</span>    for (StoreFile s: this.storeEngine.getStoreFileManager().getStorefiles()) {<a name="line.1898"></a>
-<span class="sourceLineNo">1899</span>      StoreFile.Reader r = s.getReader();<a name="line.1899"></a>
-<span class="sourceLineNo">1900</span>      if (r == null) {<a name="line.1900"></a>
-<span class="sourceLineNo">1901</span>        LOG.warn("StoreFile " + s + " has a null Reader");<a name="line.1901"></a>
-<span class="sourceLineNo">1902</span>        continue;<a name="line.1902"></a>
-<span class="sourceLineNo">1903</span>      }<a name="line.1903"></a>
-<span class="sourceLineNo">1904</span>      size += r.length();<a name="line.1904"></a>
-<span class="sourceLineNo">1905</span>    }<a name="line.1905"></a>
-<span class="sourceLineNo">1906</span>    return size;<a name="line.1906"></a>
+<span class="sourceLineNo">1891</span>  public long getMaxStoreFileAge() {<a name="line.1891"></a>
+<span class="sourceLineNo">1892</span>    long earliestTS = Long.MAX_VALUE;<a name="line.1892"></a>
+<span class="sourceLineNo">1893</span>    for (StoreFile s: this.storeEngine.getStoreFileManager().getStorefiles()) {<a name="line.1893"></a>
+<span class="sourceLineNo">1894</span>      StoreFile.Reader r = s.getReader();<a name="line.1894"></a>
+<span class="sourceLineNo">1895</span>      if (r == null) {<a name="line.1895"></a>
+<span class="sourceLineNo">1896</span>        LOG.warn("StoreFile " + s + " has a null Reader");<a name="line.1896"></a>
+<span class="sourceLineNo">1897</span>        continue;<a name="line.1897"></a>
+<span class="sourceLineNo">1898</span>      }<a name="line.1898"></a>
+<span class="sourceLineNo">1899</span>      if (!s.isHFile()) {<a name="line.1899"></a>
+<span class="sourceLineNo">1900</span>        continue;<a name="line.1900"></a>
+<span class="sourceLineNo">1901</span>      }<a name="line.1901"></a>
+<span class="sourceLineNo">1902</span>      long createdTS = s.getFileInfo().getCreatedTimestamp();<a name="line.1902"></a>
+<span class="sourceLineNo">1903</span>      earliestTS = (createdTS &lt; earliestTS) ? createdTS : earliestTS;<a name="line.1903"></a>
+<span class="sourceLineNo">1904</span>    }<a name="line.1904"></a>
+<span class="sourceLineNo">1905</span>    long now = EnvironmentEdgeManager.currentTime();<a name="line.1905"></a>
+<span class="sourceLineNo">1906</span>    return now - earliestTS;<a name="line.1906"></a>
 <span class="sourceLineNo">1907</span>  }<a name="line.1907"></a>
 <span class="sourceLineNo">1908</span><a name="line.1908"></a>
 <span class="sourceLineNo">1909</span>  @Override<a name="line.1909"></a>
-<span class="sourceLineNo">1910</span>  public long getStorefilesIndexSize() {<a name="line.1910"></a>
-<span class="sourceLineNo">1911</span>    long size = 0;<a name="line.1911"></a>
+<span class="sourceLineNo">1910</span>  public long getMinStoreFileAge() {<a name="line.1910"></a>
+<span class="sourceLineNo">1911</span>    long latestTS = 0;<a name="line.1911"></a>
 <span class="sourceLineNo">1912</span>    for (StoreFile s: this.storeEngine.getStoreFileManager().getStorefiles()) {<a name="line.1912"></a>
 <span class="sourceLineNo">1913</span>      StoreFile.Reader r = s.getReader();<a name="line.1913"></a>
 <span class="sourceLineNo">1914</span>      if (r == null) {<a name="line.1914"></a>
 <span class="sourceLineNo">1915</span>        LOG.warn("StoreFile " + s + " has a null Reader");<a name="line.1915"></a>
 <span class="sourceLineNo">1916</span>        continue;<a name="line.1916"></a>
 <span class="sourceLineNo">1917</span>      }<a name="line.1917"></a>
-<span class="sourceLineNo">1918</span>      size += r.indexSize();<a name="line.1918"></a>
-<span class="sourceLineNo">1919</span>    }<a name="line.1919"></a>
-<span class="sourceLineNo">1920</span>    return size;<a name="line.1920"></a>
-<span class="sourceLineNo">1921</span>  }<a name="line.1921"></a>
-<span class="sourceLineNo">1922</span><a name="line.1922"></a>
-<span class="sourceLineNo">1923</span>  @Override<a name="line.1923"></a>
-<span class="sourceLineNo">1924</span>  public long getTotalStaticIndexSize() {<a name="line.1924"></a>
-<span class="sourceLineNo">1925</span>    long size = 0;<a name="line.1925"></a>
-<span class="sourceLineNo">1926</span>    for (StoreFile s : this.storeEngine.getStoreFileManager().getStorefiles()) {<a name="line.1926"></a>
-<span class="sourceLineNo">1927</span>      StoreFile.Reader r = s.getReader();<a name="line.1927"></a>
-<span class="sourceLineNo">1928</span>      if (r == null) {<a name="line.1928"></a>
-<span class="sourceLineNo">1929</span>        continue;<a name="line.1929"></a>
-<span class="sourceLineNo">1930</span>      }<a name="line.1930"></a>
-<span class="sourceLineNo">1931</span>      size += r.getUncompressedDataIndexSize();<a name="line.1931"></a>
-<span class="sourceLineNo">1932</span>    }<a name="line.1932"></a>
-<span class="sourceLineNo">1933</span>    return size;<a name="line.1933"></a>
-<span class="sourceLineNo">1934</span>  }<a name="line.1934"></a>
-<span class="sourceLineNo">1935</span><a name="line.1935"></a>
-<span class="sourceLineNo">1936</span>  @Override<a name="line.1936"></a>
-<span class="sourceLineNo">1937</span>  public long getTotalStaticBloomSize() {<a name="line.1937"></a>
-<span class="sourceLineNo">1938</span>    long size = 0;<a name="line.1938"></a>
-<span class="sourceLineNo">1939</span>    for (StoreFile s : this.storeEngine.getStoreFileManager().getStorefiles()) {<a name="line.1939"></a>
-<span class="sourceLineNo">1940</span>      StoreFile.Reader r = s.getReader();<a name="line.1940"></a>
-<span class="sourceLineNo">1941</span>      if (r == null) {<a name="line.1941"></a>
-<span class="sourceLineNo">1942</span>        continue;<a name="line.1942"></a>
-<span class="sourceLineNo">1943</span>      }<a name="line.1943"></a>
-<span class="sourceLineNo">1944</span>      size += r.getTotalBloomSize();<a name="line.1944"></a>
+<span class="sourceLineNo">1918</span>      if (!s.isHFile()) {<a name="line.1918"></a>
+<span class="sourceLineNo">1919</span>        continue;<a name="line.1919"></a>
+<span class="sourceLineNo">1920</span>      }<a name="line.1920"></a>
+<span class="sourceLineNo">1921</span>      long createdTS = s.getFileInfo().getCreatedTimestamp();<a name="line.1921"></a>
+<span class="sourceLineNo">1922</span>      latestTS = (createdTS &gt; latestTS) ? createdTS : latestTS;<a name="line.1922"></a>
+<span class="sourceLineNo">1923</span>    }<a name="line.1923"></a>
+<span class="sourceLineNo">1924</span>    long now = EnvironmentEdgeManager.currentTime();<a name="line.1924"></a>
+<span class="sourceLineNo">1925</span>    return now - latestTS;<a name="line.1925"></a>
+<span class="sourceLineNo">1926</span>  }<a name="line.1926"></a>
+<span class="sourceLineNo">1927</span><a name="line.1927"></a>
+<span class="sourceLineNo">1928</span>  @Override<a name="line.1928"></a>
+<span class="sourceLineNo">1929</span>  public long getAvgStoreFileAge() {<a name="line.1929"></a>
+<span class="sourceLineNo">1930</span>    long sum = 0, count = 0;<a name="line.1930"></a>
+<span class="sourceLineNo">1931</span>    for (StoreFile s: this.storeEngine.getStoreFileManager().getStorefiles()) {<a name="line.1931"></a>
+<span class="sourceLineNo">1932</span>      StoreFile.Reader r = s.getReader();<a name="line.1932"></a>
+<span class="sourceLineNo">1933</span>      if (r == null) {<a name="line.1933"></a>
+<span class="sourceLineNo">1934</span>        LOG.warn("StoreFile " + s + " has a null Reader");<a name="line.1934"></a>
+<span class="sourceLineNo">1935</span>        continue;<a name="line.1935"></a>
+<span class="sourceLineNo">1936</span>      }<a name="line.1936"></a>
+<span class="sourceLineNo">1937</span>      if (!s.isHFile()) {<a name="line.1937"></a>
+<span class="sourceLineNo">1938</span>        continue;<a name="line.1938"></a>
+<span class="sourceLineNo">1939</span>      }<a name="line.1939"></a>
+<span class="sourceLineNo">1940</span>      sum += s.getFileInfo().getCreatedTimestamp();<a name="line.1940"></a>
+<span class="sourceLineNo">1941</span>      count++;<a name="line.1941"></a>
+<span class="sourceLineNo">1942</span>    }<a name="line.1942"></a>
+<span class="sourceLineNo">1943</span>    if (count == 0) {<a name="line.1943"></a>
+<span class="sourceLineNo">1944</span>      return 0;<a name="line.1944"></a>
 <span class="sourceLineNo">1945</span>    }<a name="line.1945"></a>
-<span class="sourceLineNo">1946</span>    return size;<a name="line.1946"></a>
-<span class="sourceLineNo">1947</span>  }<a name="line.1947"></a>
-<span class="sourceLineNo">1948</span><a name="line.1948"></a>
-<span class="sourceLineNo">1949</span>  @Override<a name="line.1949"></a>
-<span class="sourceLineNo">1950</span>  public long getMemStoreSize() {<a name="line.1950"></a>
-<span class="sourceLineNo">1951</span>    return this.memstore.size();<a name="line.1951"></a>
-<span class="sourceLineNo">1952</span>  }<a name="line.1952"></a>
-<span class="sourceLineNo">1953</span><a name="line.1953"></a>
-<span class="sourceLineNo">1954</span>  @Override<a name="line.1954"></a>
-<span class="sourceLineNo">1955</span>  public int getCompactPriority() {<a name="line.1955"></a>
-<span class="sourceLineNo">1956</span>    int priority = this.storeEngine.getStoreFileManager().getStoreCompactionPriority();<a name="line.1956"></a>
-<span class="sourceLineNo">1957</span>    if (priority == PRIORITY_USER) {<a name="line.1957"></a>
-<span class="sourceLineNo">1958</span>      LOG.warn("Compaction priority is USER despite there being no user compaction");<a name="line.1958"></a>
-<span class="sourceLineNo">1959</span>    }<a name="line.1959"></a>
-<span class="sourceLineNo">1960</span>    return priority;<a name="line.1960"></a>
-<span class="sourceLineNo">1961</span>  }<a name="line.1961"></a>
-<span class="sourceLineNo">1962</span><a name="line.1962"></a>
-<span class="sourceLineNo">1963</span>  @Override<a name="line.1963"></a>
-<span class="sourceLineNo">1964</span>  public boolean throttleCompaction(long compactionSize) {<a name="line.1964"></a>
-<span class="sourceLineNo">1965</span>    return storeEngine.getCompactionPolicy().throttleCompaction(compactionSize);<a name="line.1965"></a>
-<span class="sourceLineNo">1966</span>  }<a name="line.1966"></a>
-<span class="sourceLineNo">1967</span><a name="line.1967"></a>
-<span class="sourceLineNo">1968</span>  public HRegion getHRegion() {<a name="line.1968"></a>
-<span class="sourceLineNo">1969</span>    return this.region;<a name="line.1969"></a>
-<span class="sourceLineNo">1970</span>  }<a name="line.1970"></a>
-<span class="sourceLineNo">1971</span><a name="line.1971"></a>
-<span class="sourceLineNo">1972</span>  @Override<a name="line.1972"></a>
-<span class="sourceLineNo">1973</span>  public RegionCoprocessorHost getCoprocessorHost() {<a name="line.1973"></a>
-<span class="sourceLineNo">1974</span>    return this.region.getCoprocessorHost();<a name="line.1974"></a>
-<span class="sourceLineNo">1975</span>  }<a name="line.1975"></a>
-<span class="sourceLineNo">1976</span><a name="line.1976"></a>
-<span class="sourceLineNo">1977</span>  @Override<a name="line.1977"></a>
-<span class="sourceLineNo">1978</span>  public HRegionInfo getRegionInfo() {<a name="line.1978"></a>
-<span class="sourceLineNo">1979</span>    return this.fs.getRegionInfo();<a name="line.1979"></a>
-<span class="sourceLineNo">1980</span>  }<a name="line.1980"></a>
-<span class="sourceLineNo">1981</span><a name="line.1981"></a>
-<span class="sourceLineNo">1982</span>  @Override<a name="line.1982"></a>
-<span class="sourceLineNo">1983</span>  public boolean areWritesEnabled() {<a name="line.1983"></a>
-<span class="sourceLineNo">1984</span>    return this.region.areWritesEnabled();<a name="line.1984"></a>
-<span class="sourceLineNo">1985</span>  }<a name="line.1985"></a>
-<span class="sourceLineNo">1986</span><a name="line.1986"></a>
-<span class="sourceLineNo">1987</span>  @Override<a name="line.1987"></a>
-<span class="sourceLineNo">1988</span>  public long getSmallestReadPoint() {<a name="line.1988"></a>
-<span class="sourceLineNo">1989</span>    return this.region.getSmallestReadPoint();<a name="line.1989"></a>
+<span class="sourceLineNo">1946</span>    long avgTS = sum / count;<a name="line.1946"></a>
+<span class="sourceLineNo">1947</span>    long now = EnvironmentEdgeManager.currentTime();<a name="line.1947"></a>
+<span class="sourceLineNo">1948</span>    return now - avgTS;<a name="line.1948"></a>
+<span class="sourceLineNo">1949</span>  }<a name="line.1949"></a>
+<span class="sourceLineNo">1950</span><a name="line.1950"></a>
+<span class="sourceLineNo">1951</span>  @Override<a name="line.1951"></a>
+<span class="sourceLineNo">1952</span>  public long getNumReferenceFiles() {<a name="line.1952"></a>
+<span class="sourceLineNo">1953</span>    long numRefFiles = 0;<a name="line.1953"></a>
+<span class="sourceLineNo">1954</span>    for (StoreFile s : this.storeEngine.getStoreFileManager().getStorefiles()) {<a name="line.1954"></a>
+<span class="sourceLineNo">1955</span>      if (s.isReference()) {<a name="line.1955"></a>
+<span class="sourceLineNo">1956</span>        numRefFiles++;<a name="line.1956"></a>
+<span class="sourceLineNo">1957</span>      }<a name="line.1957"></a>
+<span class="sourceLineNo">1958</span>    }<a name="line.1958"></a>
+<span class="sourceLineNo">1959</span>    return numRefFiles;<a name="line.1959"></a>
+<span class="sourceLineNo">1960</span>  }<a name="line.1960"></a>
+<span class="sourceLineNo">1961</span><a name="line.1961"></a>
+<span class="sourceLineNo">1962</span>  @Override<a name="line.1962"></a>
+<span class="sourceLineNo">1963</span>  public long getNumHFiles() {<a name="line.1963"></a>
+<span class="sourceLineNo">1964</span>    long numHFiles = 0;<a name="line.1964"></a>
+<span class="sourceLineNo">1965</span>    for (StoreFile s : this.storeEngine.getStoreFileManager().getStorefiles()) {<a name="line.1965"></a>
+<span class="sourceLineNo">1966</span>      if (s.isHFile()) {<a name="line.1966"></a>
+<span class="sourceLineNo">1967</span>        numHFiles++;<a name="line.1967"></a>
+<span class="sourceLineNo">1968</span>      }<a name="line.1968"></a>
+<span class="sourceLineNo">1969</span>    }<a name="line.1969"></a>
+<span class="sourceLineNo">1970</span>    return numHFiles;<a name="line.1970"></a>
+<span class="sourceLineNo">1971</span>  }<a name="line.1971"></a>
+<span class="sourceLineNo">1972</span><a name="line.1972"></a>
+<span class="sourceLineNo">1973</span>  @Override<a name="line.1973"></a>
+<span class="sourceLineNo">1974</span>  public long getStoreSizeUncompressed() {<a name="line.1974"></a>
+<span class="sourceLineNo">1975</span>    return this.totalUncompressedBytes;<a name="line.1975"></a>
+<span class="sourceLineNo">1976</span>  }<a name="line.1976"></a>
+<span class="sourceLineNo">1977</span><a name="line.1977"></a>
+<span class="sourceLineNo">1978</span>  @Override<a name="line.1978"></a>
+<span class="sourceLineNo">1979</span>  public long getStorefilesSize() {<a name="line.1979"></a>
+<span class="sourceLineNo">1980</span>    long size = 0;<a name="line.1980"></a>
+<span class="sourceLineNo">1981</span>    for (StoreFile s: this.storeEngine.getStoreFileManager().getStorefiles()) {<a name="line.1981"></a>
+<span class="sourceLineNo">1982</span>      StoreFile.Reader r = s.getReader();<a name="line.1982"></a>
+<span class="sourceLineNo">1983</span>      if (r == null) {<a name="line.1983"></a>
+<span class="sourceLineNo">1984</span>        LOG.warn("StoreFile " + s + " has a null Reader");<a name="line.1984"></a>
+<span class="sourceLineNo">1985</span>        continue;<a name="line.1985"></a>
+<span class="sourceLineNo">1986</span>      }<a name="line.1986"></a>
+<span class="sourceLineNo">1987</span>      size += r.length();<a name="line.1987"></a>
+<span class="sourceLineNo">1988</span>    }<a name="line.1988"></a>
+<span class="sourceLineNo">1989</span>    return size;<a name="line.1989"></a>
 <span class="sourceLineNo">1990</span>  }<a name="line.1990"></a>
 <span class="sourceLineNo">1991</span><a name="line.1991"></a>
-<span class="sourceLineNo">1992</span>  /**<a name="line.1992"></a>
-<span class="sourceLineNo">1993</span>   * Updates the value for the given row/family/qualifier. This function will always be seen as<a name="line.1993"></a>
-<span class="sourceLineNo">1994</span>   * atomic by other readers because it only puts a single KV to memstore. Thus no read/write<a name="line.1994"></a>
-<span class="sourceLineNo">1995</span>   * control necessary.<a name="line.1995"></a>
-<span class="sourceLineNo">1996</span>   * @param row row to update<a name="line.1996"></a>
-<span class="sourceLineNo">1997</span>   * @param f family to update<a name="line.1997"></a>
-<span class="sourceLineNo">1998</span>   * @param qualifier qualifier to update<a name="line.1998"></a>
-<span class="sourceLineNo">1999</span>   * @param newValue the new value to set into memstore<a name="line.1999"></a>
-<span class="sourceLineNo">2000</span>   * @return memstore size delta<a name="line.2000"></a>
-<span class="sourceLineNo">2001</span>   * @throws IOException<a name="line.2001"></a>
-<span class="sourceLineNo">2002</span>   */<a name="line.2002"></a>
-<span class="sourceLineNo">2003</span>  @VisibleForTesting<a name="line.2003"></a>
-<span class="sourceLineNo">2004</span>  public long updateColumnValue(byte [] row, byte [] f,<a name="line.2004"></a>
-<span class="sourceLineNo">2005</span>                                byte [] qualifier, long newValue)<a name="line.2005"></a>
-<span class="sourceLineNo">2006</span>      throws IOException {<a name="line.2006"></a>
-<span class="sourceLineNo">2007</span><a name="line.2007"></a>
-<span class="sourceLineNo">2008</span>    this.lock.readLock().lock();<a name="line.2008"></a>
-<span class="sourceLineNo">2009</span>    try {<a name="line.2009"></a>
-<span class="sourceLineNo">2010</span>      long now = EnvironmentEdgeManager.currentTime();<a name="line.2010"></a>
-<span class="sourceLineNo">2011</span><a name="line.2011"></a>
-<span class="sourceLineNo">2012</span>      return this.memstore.updateColumnValue(row,<a name="line.2012"></a>
-<span class="sourceLineNo">2013</span>          f,<a name="line.2013"></a>
-<span class="sourceLineNo">2014</span>          qualifier,<a name="line.2014"></a>
-<span class="sourceLineNo">2015</span>          newValue,<a name="line.2015"></a>
-<span class="sourceLineNo">2016</span>          now);<a name="line.2016"></a>
-<span class="sourceLineNo">2017</span><a name="line.2017"></a>
-<span class="sourceLineNo">2018</span>    } finally {<a name="line.2018"></a>
-<span class="sourceLineNo">2019</span>      this.lock.readLock().unlock();<a name="line.2019"></a>
-<span class="sourceLineNo">2020</span>    }<a name="line.2020"></a>
-<span class="sourceLineNo">2021</span>  }<a name="line.2021"></a>
-<span class="sourceLineNo">2022</span><a name="line.2022"></a>
-<span class="sourceLineNo">2023</span>  @Override<a name="line.2023"></a>
-<span class="sourceLineNo">2024</span>  public long upsert(Iterable&lt;Cell&gt; cells, long readpoint) throws IOException {<a name="line.2024"></a>
-<span class="sourceLineNo">2025</span>    this.lock.readLock().lock();<a name="line.2025"></a>
-<span class="sourceLineNo">2026</span>    try {<a name="line.2026"></a>
-<span class="sourceLineNo">2027</span>      return this.memstore.upsert(cells, readpoint);<a name="line.2027"></a>
-<span class="sourceLineNo">2028</span>    } finally {<a name="line.2028"></a>
-<span class="sourceLineNo">2029</span>      this.lock.readLock().unlock();<a name="line.2029"></a>
-<span class="sourceLineNo">2030</span>    }<a name="line.2030"></a>
-<span class="sourceLineNo">2031</span>  }<a name="line.2031"></a>
-<span class="sourceLineNo">2032</span><a name="line.2032"></a>
-<span class="sourceLineNo">2033</span>  @Override<a name="line.2033"></a>
-<span class="sourceLineNo">2034</span>  public StoreFlushContext createFlushContext(long cacheFlushId) {<a name="line.2034"></a>
-<span class="sourceLineNo">2035</span>    return new StoreFlusherImpl(cacheFlushId);<a name="line.2035"></a>
-<span class="sourceLineNo">2036</span>  }<a name="line.2036"></a>
-<span class="sourceLineNo">2037</span><a name="line.2037"></a>
-<span class="sourceLineNo">2038</span>  private final class StoreFlusherImpl implements StoreFlushContext {<a name="line.2038"></a>
-<span class="sourceLineNo">2039</span><a name="line.2039"></a>
-<span class="sourceLineNo">2040</span>    private long cacheFlushSeqNum;<a name="line.2040"></a>
-<span class="sourceLineNo">2041</span>    private MemStoreSnapshot snapshot;<a name="line.2041"></a>
-<span class="sourceLineNo">2042</span>    private List&lt;Path&gt; tempFiles;<a name="line.2042"></a>
-<span class="sourceLineNo">2043</span>    private List&lt;Path&gt; committedFiles;<a name="line.2043"></a>
-<span class="sourceLineNo">2044</span>    private long cacheFlushCount;<a name="line.2044"></a>
-<span class="sourceLineNo">2045</span>    private long cacheFlushSize;<a name="line.2045"></a>
-<span class="sourceLineNo">2046</span><a name="line.2046"></a>
-<span class="sourceLineNo">2047</span>    private StoreFlusherImpl(long cacheFlushSeqNum) {<a name="line.2047"></a>
-<span class="sourceLineNo">2048</span>      this.cacheFlushSeqNum = cacheFlushSeqNum;<a name="line.2048"></a>
-<span class="sourceLineNo">2049</span>    }<a name="line.2049"></a>
+<span class="sourceLineNo">1992</span>  @Override<a name="line.1992"></a>
+<span class="sourceLineNo">1993</span>  public long getStorefilesIndexSize() {<a name="line.1993"></a>
+<span class="sourceLineNo">1994</span>    long size = 0;<a name="line.1994"></a>
+<span class="sourceLineNo">1995</span>    for (StoreFile s: this.storeEngine.getStoreFileManager().getStorefiles()) {<a name="line.1995"></a>
+<span class="sourceLineNo">1996</span>      StoreFile.Reader r = s.getReader();<a name="line.1996"></a>
+<span class="sourceLineNo">1997</span>      if (r == null) {<a name="line.1997"></a>
+<span class="sourceLineNo">1998</span>        LOG.warn("StoreFile " + s + " has a null Reader");<a name="line.1998"></a>
+<span class="sourceLineNo">1999</span>        continue;<a name="line.1999"></a>
+<span class="sourceLineNo">2000</span>      }<a name="line.2000"></a>
+<span class="sourceLineNo">2001</span>      size += r.indexSize();<a name="line.2001"></a>
+<span class="sourceLineNo">2002</span>    }<a name="line.2002"></a>
+<span class="sourceLineNo">2003</span>    return size;<a name="line.2003"></a>
+<span class="sourceLineNo">2004</span>  }<a name="line.2004"></a>
+<span class="sourceLineNo">2005</span><a name="line.2005"></a>
+<span class="sourceLineNo">2006</span>  @Override<a name="line.2006"></a>
+<span class="sourceLineNo">2007</span>  public long getTotalStaticIndexSize() {<a name="line.2007"></a>
+<span class="sourceLineNo">2008</span>    long size = 0;<a name="line.2008"></a>
+<span class="sourceLineNo">2009</span>    for (StoreFile s : this.storeEngine.getStoreFileManager().getStorefiles()) {<a name="line.2009"></a>
+<span class="sourceLineNo">2010</span>      StoreFile.Reader r = s.getReader();<a name="line.2010"></a>
+<span class="sourceLineNo">2011</span>      if (r == null) {<a name="line.2011"></a>
+<span class="sourceLineNo">2012</span>        continue;<a name="line.2012"></a>
+<span class="sourceLineNo">2013</span>      }<a name="line.2013"></a>
+<span class="sourceLineNo">2014</span>      size += r.getUncompressedDataIndexSize();<a name="line.2014"></a>
+<span class="sourceLineNo">2015</span>    }<a name="line.2015"></a>
+<span class="sourceLineNo">2016</span>    return size;<a name="line.2016"></a>
+<span class="sourceLineNo">2017</span>  }<a name="line.2017"></a>
+<span class="sourceLineNo">2018</span><a name="line.2018"></a>
+<span class="sourceLineNo">2019</span>  @Override<a name="line.2019"></a>
+<span class="sourceLineNo">2020</span>  public long getTotalStaticBloomSize() {<a name="line.2020"></a>
+<span class="sourceLineNo">2021</span>    long size = 0;<a name="line.2021"></a>
+<span class="sourceLineNo">2022</span>    for (StoreFile s : this.storeEngine.getStoreFileManager().getStorefiles()) {<a name="line.2022"></a>
+<span class="sourceLineNo">2023</span>      StoreFile.Reader r = s.getReader();<a name="line.2023"></a>
+<span class="sourceLineNo">2024</span>      if (r == null) {<a name="line.2024"></a>
+<span class="sourceLineNo">2025</span>        continue;<a name="line.2025"></a>
+<span class="sourceLineNo">2026</span>      }<a name="line.2026"></a>
+<span class="sourceLineNo">2027</span>      size += r.getTotalBloomSize();<a name="line.2027"></a>
+<span class="sourceLineNo">2028</span>    }<a name="line.2028"></a>
+<span class="sourceLineNo">2029</span>    return size;<a name="line.2029"></a>
+<span class="sourceLineNo">2030</span>  }<a name="line.2030"></a>
+<span class="sourceLineNo">2031</span><a name="line.2031"></a>
+<span class="sourceLineNo">2032</span>  @Override<a name="line.2032"></a>
+<span class="sourceLineNo">2033</span>  public long getMemStoreSize() {<a name="line.2033"></a>
+<span class="sourceLineNo">2034</span>    return this.memstore.size();<a name="line.2034"></a>
+<span class="sourceLineNo">2035</span>  }<a name="line.2035"></a>
+<span class="sourceLineNo">2036</span><a name="line.2036"></a>
+<span class="sourceLineNo">2037</span>  @Override<a name="line.2037"></a>
+<span class="sourceLineNo">2038</span>  public int getCompactPriority() {<a name="line.2038"></a>
+<span class="sourceLineNo">2039</span>    int priority = this.storeEngine.getStoreFileManager().getStoreCompactionPriority();<a name="line.2039"></a>
+<span class="sourceLineNo">2040</span>    if (priority == PRIORITY_USER) {<a name="line.2040"></a>
+<span class="sourceLineNo">2041</span>      LOG.warn("Compaction priority is USER despite there being no user compaction");<a name="line.2041"></a>
+<span class="sourceLineNo">2042</span>    }<a name="line.2042"></a>
+<span class="sourceLineNo">2043</span>    return priority;<a name="line.2043"></a>
+<span class="sourceLineNo">2044</span>  }<a name="line.2044"></a>
+<span class="sourceLineNo">2045</span><a name="line.2045"></a>
+<span class="sourceLineNo">2046</span>  @Override<a name="line.2046"></a>
+<span class="sourceLineNo">2047</span>  public boolean throttleCompaction(long compactionSize) {<a name="line.2047"></a>
+<span class="sourceLineNo">2048</span>    return storeEngine.getCompactionPolicy().throttleCompaction(compactionSize);<a name="line.2048"></a>
+<span class="sourceLineNo">2049</span>  }<a name="line.2049"></a>
 <span class="sourceLineNo">2050</span><a name="line.2050"></a>
-<span class="sourceLineNo">2051</span>    /**<a name="line.2051"></a>
-<span class="sourceLineNo">2052</span>     * This is not thread safe. The caller should have a lock on the region or the store.<a name="line.2052"></a>
-<span class="sourceLineNo">2053</span>     * If necessary, the lock can be added with the patch provided in HBASE-10087<a name="line.2053"></a>
-<span class="sourceLineNo">2054</span>     */<a name="line.2054"></a>
-<span class="sourceLineNo">2055</span>    @Override<a name="line.2055"></a>
-<span class="sourceLineNo">2056</span>    public void prepare() {<a name="line.2056"></a>
-<span class="sourceLineNo">2057</span>      // passing the current sequence number of the wal - to allow bookkeeping in the memstore<a name="line.2057"></a>
-<span class="sourceLineNo">2058</span>      this.snapshot = memstore.snapshot(cacheFlushSeqNum);<a name="line.2058"></a>
-<span class="sourceLineNo">2059</span>      this.cacheFlushCount = snapshot.getCellsCount();<a name="line.2059"></a>
-<span class="sourceLineNo">2060</span>      this.cacheFlushSize = snapshot.getSize();<a name="line.2060"></a>
-<span class="sourceLineNo">2061</span>      committedFiles = new ArrayList&lt;Path&gt;(1);<a name="line.2061"></a>
-<span class="sourceLineNo">2062</span>    }<a name="line.2062"></a>
-<span class="sourceLineNo">2063</span><a name="line.2063"></a>
-<span class="sourceLineNo">2064</span>    @Override<a name="line.2064"></a>
-<span class="sourceLineNo">2065</span>    public void flushCache(MonitoredTask status) throws IOException {<a name="line.2065"></a>
-<span class="sourceLineNo">2066</span>      RegionServerServices rsService = region.getRegionServerServices();<a name="line.2066"></a>
-<span class="sourceLineNo">2067</span>      ThroughputController throughputController =<a name="line.2067"></a>
-<span class="sourceLineNo">2068</span>          rsService == null ? null : rsService.getFlushThroughputController();<a name="line.2068"></a>
-<span class="sourceLineNo">2069</span>      tempFiles = HStore.this.flushCache(cacheFlushSeqNum, snapshot, status, throughputController);<a name="line.2069"></a>
-<span class="sourceLineNo">2070</span>    }<a name="line.2070"></a>
-<span class="sourceLineNo">2071</span><a name="line.2071"></a>
-<span class="sourceLineNo">2072</span>    @Override<a name="line.2072"></a>
-<span class="sourceLineNo">2073</span>    public boolean commit(MonitoredTask status) throws IOException {<a name="line.2073"></a>
-<span class="sourceLineNo">2074</span>      if (this.tempFiles == null || this.tempFiles.isEmpty()) {<a name="line.2074"></a>
-<span class="sourceLineNo">2075</span>        return false;<a name="line.2075"></a>
-<span class="sourceLineNo">2076</span>      }<a name="line.2076"></a>
-<span class="sourceLineNo">2077</span>      List&lt;StoreFile&gt; storeFiles = new ArrayList&lt;StoreFile&gt;(this.tempFiles.size());<a name="line.2077"></a>
-<span class="sourceLineNo">2078</span>      for (Path storeFilePath : tempFiles) {<a name="line.2078"></a>
-<span class="sourceLineNo">2079</span>        try {<a name="line.2079"></a>
-<span class="sourceLineNo">2080</span>          storeFiles.add(HStore.this.commitFile(storeFilePath, cacheFlushSeqNum, status));<a name="line.2080"></a>
-<span class="sourceLineNo">2081</span>        } catch (IOException ex) {<a name="line.2081"></a>
-<span class="sourceLineNo">2082</span>          LOG.error("Failed to commit store file " + storeFilePath, ex);<a name="line.2082"></a>
-<span class="sourceLineNo">2083</span>          // Try to delete the files we have committed before.<a name="line.2083"></a>
-<span class="sourceLineNo">2084</span>          for (StoreFile sf : storeFiles) {<a name="line.2084"></a>
-<span class="sourceLineNo">2085</span>            Path pathToDelete = sf.getPath();<a name="line.2085"></a>
-<span class="sourceLineNo">2086</span>            try {<a name="line.2086"></a>
-<span class="sourceLineNo">2087</span>              sf.deleteReader();<a name="line.2087"></a>
-<span class="sourceLineNo">2088</span>            } catch (IOException deleteEx) {<a name="line.2088"></a>
-<span class="sourceLineNo">2089</span>              LOG.fatal("Failed to delete store file we committed, halting " + pathToDelete, ex);<a name="line.2089"></a>
-<span class="sourceLineNo">2090</span>              Runtime.getRuntime().halt(1);<a name="line.2090"></a>
-<span class="sourceLineNo">2091</span>            }<a name="line.2091"></a>
-<span class="sourceLineNo">2092</span>          }<a name="line.2092"></a>
-<span class="sourceLineNo">2093</span>          throw new IOException("Failed to commit the flush", ex);<a name="line.2093"></a>
-<span class="sourceLineNo">2094</span>        }<a name="line.2094"></a>
-<span class="sourceLineNo">2095</span>      }<a name="line.2095"></a>
-<span class="sourceLineNo">2096</span><a name="line.2096"></a>
-<span class="sourceLineNo">2097</span>      for (StoreFile sf : storeFiles) {<a name="line.2097"></a>
-<span class="sourceLineNo">2098</span>        if (HStore.this.getCoprocessorHost() != null) {<a name="line.2098"></a>
-<span class="sourceLineNo">2099</span>          HStore.this.getCoprocessorHost().postFlush(HStore.this, sf);<a name="line.2099"></a>
-<span class="sourceLineNo">2100</span>        }<a name="line.2100"></a>
-<span class="sourceLineNo">2101</span>        committedFiles.add(sf.getPath());<a name="line.2101"></a>
-<span class="sourceLineNo">2102</span>      }<a name="line.2102"></a>
-<span class="sourceLineNo">2103</span><a name="line.2103"></a>
-<span class="sourceLineNo">2104</span>      HStore.this.flushedCellsCount += cacheFlushCount;<a name="line.2104"></a>
-<span class="sourceLineNo">2105</span>      HStore.this.flushedCellsSize += cacheFlushSize;<a name="line.2105"></a>
-<span class="sourceLineNo">2106</span><a name="line.2106"></a>
-<span class="sourceLineNo">2107</span>      // Add new file to store files.  Clear snapshot too while we have the Store write lock.<a name="line.2107"></a>
-<span class="sourceLineNo">2108</span>      return HStore.this.updateStorefiles(storeFiles, snapshot.getId());<a name="line.2108"></a>
-<span class="sourceLineNo">2109</span>    }<a name="line.2109"></a>
-<span class="sourceLineNo">2110</span><a name="line.2110"></a>
-<span class="sourceLineNo">2111</span>    @Override<a name="line.2111"></a>
-<span class="sourceLineNo">2112</span>    public List&lt;Path&gt; getCommittedFiles() {<a name="line.2112"></a>
-<span class="sourceLineNo">2113</span>      return committedFiles;<a name="line.2113"></a>
-<span class="sourceLineNo">2114</span>    }<a name="line.2114"></a>
+<span class="sourceLineNo">2051</span>  public HRegion getHRegion() {<a name="line.2051"></a>
+<span class="sourceLineNo">2052</span>    return this.region;<a name="line.2052"></a>
+<span class="sourceLineNo">2053</span>  }<a name="line.2053"></a>
+<span class="sourceLineNo">2054</span><a name="line.2054"></a>
+<span class="sourceLineNo">2055</span>  @Override<a name="line.2055"></a>
+<span class="sourceLineNo">2056</span>  public RegionCoprocessorHost getCoprocessorHost() {<a name="line.2056"></a>
+<span class="sourceLineNo">2057</span>    return this.region.getCoprocessorHost();<a name="line.2057"></a>
+<span class="sourceLineNo">2058</span>  }<a name="line.2058"></a>
+<span class="sourceLineNo">2059</span><a name="line.2059"></a>
+<span class="sourceLineNo">2060</span>  @Override<a name="line.2060"></a>
+<span class="sourceLineNo">2061</span>  public HRegionInfo getRegionInfo() {<a name="line.2061"></a>
+<span class="sourceLineNo">2062</span>    return this.fs.getRegionInfo();<a name="line.2062"></a>
+<span class="sourceLineNo">2063</span>  }<a name="line.2063"></a>
+<span class="sourceLineNo">2064</span><a name="line.2064"></a>
+<span class="sourceLineNo">2065</span>  @Override<a name="line.2065"></a>
+<span class="sourceLineNo">2066</span>  public boolean areWritesEnabled() {<a name="line.2066"></a>
+<span class="sourceLineNo">2067</span>    return this.region.areWritesEnabled();<a name="line.2067"></a>
+<span class="sourceLineNo">2068</span>  }<a name="line.2068"></a>
+<span class="sourceLineNo">2069</span><a name="line.2069"></a>
+<span class="sourceLineNo">2070</span>  @Override<a name="line.2070"></a>
+<span class="sourceLineNo">2071</span>  public long getSmallestReadPoint() {<a name="line.2071"></a>
+<span class="sourceLineNo">2072</span>    return this.region.getSmallestReadPoint();<a name="line.2072"></a>
+<span class="sourceLineNo">2073</span>  }<a name="line.2073"></a>
+<span class="sourceLineNo">2074</span><a name="line.2074"></a>
+<span class="sourceLineNo">2075</span>  /**<a name="line.2075"></a>
+<span class="sourceLineNo">2076</span>   * Updates the value for the given row/family/qualifier. This function will always be seen as<a name="line.2076"></a>
+<span class="sourceLineNo">2077</span>   * atomic by other readers because it only puts a single KV to memstore. Thus no read/write<a name="line.2077"></a>
+<span class="sourceLineNo">2078</span>   * control necessary.<a name="line.2078"></a>
+<span class="sourceLineNo">2079</span>   * @param row row to update<a name="line.2079"></a>
+<span class="sourceLineNo">2080</span>   * @param f family to update<a name="line.2080"></a>
+<span class="sourceLineNo">2081</span>   * @param qualifier qualifier to update<a name="line.2081"></a>
+<span class="sourceLineNo">2082</span>   * @param newValue the new value to set into memstore<a name="line.2082"></a>
+<span class="sourceLineNo">2083</span>   * @return memstore size delta<a name="line.2083"></a>
+<span class="sourceLineNo">2084</span>   * @throws IOException<a name="line.2084"></a>
+<span class="sourceLineNo">2085</span>   */<a name="line.2085"></a>
+<span class="sourceLineNo">2086</span>  @VisibleForTesting<a name="line.2086"></a>
+<span class="sourceLineNo">2087</span>  public long updateColumnValue(byte [] row, byte [] f,<a name="line.2087"></a>
+<span class="sourceLineNo">2088</span>                                byte [] qualifier, long newValue)<a name="line.2088"></a>
+<span class="sourceLineNo">2089</span>      throws IOException {<a name="line.2089"></a>
+<span class="sourceLineNo">2090</span><a name="line.2090"></a>
+<span class="sourceLineNo">2091</span>    this.lock.readLock().lock();<a name="line.2091"></a>
+<span class="sourceLineNo">2092</span>    try {<a name="line.2092"></a>
+<span class="sourceLineNo">2093</span>      long now = EnvironmentEdgeManager.currentTime();<a name="line.2093"></a>
+<span class="sourceLineNo">2094</span><a name="line.2094"></a>
+<span class="sourceLineNo">2095</span>      return this.memstore.updateColumnValue(row,<a name="line.2095"></a>
+<span class="sourceLineNo">2096</span>          f,<a name="line.2096"></a>
+<span class="sourceLineNo">2097</span>          qualifier,<a name="line.2097"></a>
+<span class="sourceLineNo">2098</span>          newValue,<a name="line.2098"></a>
+<span class="sourceLineNo">2099</span>          now);<a name="line.2099"></a>
+<span class="sourceLineNo">2100</span><a name="line.2100"></a>
+<span class="sourceLineNo">2101</span>    } finally {<a name="line.2101"></a>
+<span class="sourceLineNo">2102</span>      this.lock.readLock().unlock();<a name="line.2102"></a>
+<span class="sourceLineNo">2103</span>    }<a name="line.2103"></a>
+<span class="sourceLineNo">2104</span>  }<a name="line.2104"></a>
+<span class="sourceLineNo">2105</span><a name="line.2105"></a>
+<span class="sourceLineNo">2106</span>  @Override<a name="line.2106"></a>
+<span class="sourceLineNo">2107</span>  public long upsert(Iterable&lt;Cell&gt; cells, long readpoint) throws IOException {<a name="line.2107"></a>
+<span class="sourceLineNo">2108</span>    this.lock.readLock().lock();<a name="line.2108"></a>
+<span class="sourceLineNo">2109</span>    try {<a name="line.2109"></a>
+<span class="sourceLineNo">2110</span>      return this.memstore.upsert(cells, readpoint);<a name="line.2110"></a>
+<span class="sourceLineNo">2111</span>    } finally {<a name="line.2111"></a>
+<span class="sourceLineNo">2112</span>      this.lock.readLock().unlock();<a name="line.2112"></a>
+<span class="sourceLineNo">2113</span>    }<a name="line.2113"></a>
+<span class="sourceLineNo">2114</span>  }<a name="line.2114"></a>
 <span class="sourceLineNo">2115</span><a name="line.2115"></a>
-<span class="sourceLineNo">2116</span>    /**<a name="line.2116"></a>
-<span class="sourceLineNo">2117</span>     * Similar to commit, but called in secondary region replicas for replaying the<a name="line.2117"></a>
-<span class="sourceLineNo">2118</span>     * flush cache from primary region. Adds the new files to the store, and drops the<a name="line.2118"></a>
-<span class="sourceLineNo">2119</span>     * snapshot depending on dropMemstoreSnapshot argument.<a name="line.2119"></a>
-<span class="sourceLineNo">2120</span>     * @param fileNames names of the flushed files<a name="line.2120"></a>
-<span class="sourceLineNo">2121</span>     * @param dropMemstoreSnapshot whether to drop the prepared memstore snapshot<a name="line.2121"></a>
-<span class="sourceLineNo">2122</span>     * @throws IOException<a name="line.2122"></a>
-<span class="sourceLineNo">2123</span>     */<a name="line.2123"></a>
-<span class="sourceLineNo">2124</span>    @Override<a name="line.2124"></a>
-<span class="sourceLineNo">2125</span>    public void replayFlush(List&lt;String&gt; fileNames, boolean dropMemstoreSnapshot)<a name="line.2125"></a>
-<span class="sourceLineNo">2126</span>        throws IOException {<a name="line.2126"></a>
-<span class="sourceLineNo">2127</span>      List&lt;StoreFile&gt; storeFiles = new ArrayList&lt;StoreFile&gt;(fileNames.size());<a name="line.2127"></a>
-<span class="sourceLineNo">2128</span>      for (String file : fileNames) {<a name="line.2128"></a>
-<span class="sourceLineNo">2129</span>        // open the file as a store file (hfile link, etc)<a name="line.2129"></a>
-<span class="sourceLineNo">2130</span>        StoreFileInfo storeFileInfo = fs.getStoreFileInfo(getColumnFamilyName(), file);<a name="line.2130"></a>
-<span class="sourceLineNo">2131</span>        StoreFile storeFile = createStoreFileAndReader(storeFileInfo);<a name="line.2131"></a>
-<span class="sourceLineNo">2132</span>        storeFiles.add(storeFile);<a name="line.2132"></a>
-<span class="sourceLineNo">2133</span>        HStore.this.storeSize += storeFile.getReader().length();<a name="line.2133"></a>
-<span class="sourceLineNo">2134</span>        HStore.this.totalUncompressedBytes += storeFile.getReader().getTotalUncompressedBytes();<a name="line.2134"></a>
-<span class="sourceLineNo">2135</span>        if (LOG.isInfoEnabled()) {<a name="line.2135"></a>
-<span class="sourceLineNo">2136</span>          LOG.info("Region: " + HStore.this.getRegionInfo().getEncodedName() +<a name="line.2136"></a>
-<span class="sourceLineNo">2137</span>            " added " + storeFile + ", entries=" + storeFile.getReader().getEntries() +<a name="line.2137"></a>
-<span class="sourceLineNo">2138</span>            ", sequenceid=" +  + storeFile.getReader().getSequenceID() +<a name="line.2138"></a>
-<span class="sourceLineNo">2139</span>            ", filesize=" + StringUtils.humanReadableInt(storeFile.getReader().length()));<a name="line.2139"></a>
-<span class="sourceLineNo">2140</span>        }<a name="line.2140"></a>
-<span class="sourceLineNo">2141</span>      }<a name="line.2141"></a>
-<span class="sourceLineNo">2142</span><a name="line.2142"></a>
-<span class="sourceLineNo">2143</span>      long snapshotId = -1; // -1 means do not drop<a name="line.2143"></a>
-<span class="sourceLineNo">2144</span>      if (dropMemstoreSnapshot &amp;&amp; snapshot != null) {<a name="line.2144"></a>
-<span class="sourceLineNo">2145</span>        snapshotId = snapshot.getId();<a name="line.2145"></a>
-<span class="sourceLineNo">2146</span>      }<a name="line.2146"></a>
-<span class="sourceLineNo">2147</span>      HStore.this.updateStorefiles(storeFiles, snapshotId);<a name="line.2147"></a>
-<span class="sourceLineNo">2148</span>    }<a name="line.2148"></a>
-<span class="sourceLineNo">2149</span><a name="line.2149"></a>
-<span class="sourceLineNo">2150</span>    /**<a name="line.2150"></a>
-<span class="sourceLineNo">2151</span>     * Abort the snapshot preparation. Drops the snapshot if any.<a name="line.2151"></a>
-<span class="sourceLineNo">2152</span>     * @throws IOException<a name="line.2152"></a>
-<span class="sourceLineNo">2153</span>     */<a name="line.2153"></a>
-<span class="sourceLineNo">2154</span>    @Override<a name="line.2154"></a>
-<span class="sourceLineNo">2155</span>    public void abort() throws IOException {<a name="line.2155"></a>
-<span class="sourceLineNo">2156</span>      if (snapshot == null) {<a name="line.2156"></a>
-<span class="sourceLineNo">2157</span>        return;<a name="line.2157"></a>
-<span class="sourceLineNo">2158</span>      }<a name="line.2158"></a>
-<span class="sourceLineNo">2159</span>      HStore.this.updateStorefiles(new ArrayList&lt;StoreFile&gt;(0), snapshot.getId());<a name="line.2159"></a>
-<span class="sourceLineNo">2160</span>    }<a name="line.2160"></a>
-<span class="sourceLineNo">2161</span>  }<a name="line.2161"></a>
-<span class="sourceLineNo">2162</span><a name="line.2162"></a>
-<span class="sourceLineNo">2163</span>  @Override<a name="line.2163"></a>
-<span class="sourceLineNo">2164</span>  public boolean needsCompaction() {<a name="line.2164"></a>
-<span class="sourceLineNo">2165</span>    return this.storeEngine.needsCompaction(this.filesCompacting);<a name="line.2165"></a>
-<span class="sourceLineNo">2166</span>  }<a name="line.2166"></a>
-<span class="sourceLineNo">2167</span><a name="line.2167"></a>
-<span class="sourceLineNo">2168</span>  @Override<a name="line.2168"></a>
-<span class="sourceLineNo">2169</span>  public CacheConfig getCacheConfig() {<a name="line.2169"></a>
-<span class="sourceLineNo">2170</span>    return this.cacheConf;<a name="line.2170"></a>
-<span class="sourceLineNo">2171</span>  }<a name="line.2171"></a>
-<span class="sourceLineNo">2172</span><a name="line.2172"></a>
-<span class="sourceLineNo">2173</span>  public static final long FIXED_OVERHEAD =<a name="line.2173"></a>
-<span class="sourceLineNo">2174</span>      ClassSize.align(ClassSize.OBJECT + (16 * ClassSize.REFERENCE) + (10 * Bytes.SIZEOF_LONG)<a name="line.2174"></a>
-<span class="sourceLineNo">2175</span>              + (5 * Bytes.SIZEOF_INT) + (2 * Bytes.SIZEOF_BOOLEAN));<a name="line.2175"></a>
-<span class="sourceLineNo">2176</span><a name="line.2176"></a>
-<span class="sourceLineNo">2177</span>  public static final long DEEP_OVERHEAD = ClassSize.align(FIXED_OVERHEAD<a name="line.2177"></a>
-<span class="sourceLineNo">2178</span>      + ClassSize.OBJECT + ClassSize.REENTRANT_LOCK<a name="line.2178"></a>
-<span class="sourceLineNo">2179</span>      + ClassSize.CONCURRENT_SKIPLISTMAP<a name="line.2179"></a>
-<span class="sourceLineNo">2180</span>      + ClassSize.CONCURRENT_SKIPLISTMAP_ENTRY + ClassSize.OBJECT<a name="line.2180"></a>
-<span class="sourceLineNo">2181</span>      + ScanInfo.FIXED_OVERHEAD);<a name="line.2181"></a>
-<span class="sourceLineNo">2182</span><a name="line.2182"></a>
-<span class="sourceLineNo">2183</span>  @Override<a name="line.2183"></a>
-<span class="sourceLineNo">2184</span>  public long heapSize() {<a name="line.2184"></a>
-<span class="sourceLineNo">2185</span>    return DEEP_OVERHEAD + this.memstore.heapSize();<a name="line.2185"></a>
-<span class="sourceLineNo">2186</span>  }<a name="line.2186"></a>
-<span class="sourceLineNo">2187</span><a name="line.2187"></a>
-<span class="sourceLineNo">2188</span>  @Override<a name="line.2188"></a>
-<span class="sourceLineNo">2189</span>  public CellComparator getComparator() {<a name="line.2189"></a>
-<span class="sourceLineNo">2190</span>    return comparator;<a name="line.2190"></a>
-<span class="sourceLineNo">2191</span>  }<a name="line.2191"></a>
-<span class="sourceLineNo">2192</span><a name="line.2192"></a>
-<span class="sourceLineNo">2193</span>  @Override<a name="line.2193"></a>
-<span class="sourceLineNo">2194</span>  public ScanInfo getScanInfo() {<a name="line.2194"></a>
-<span class="sourceLineNo">2195</span>    return scanInfo;<a name="line.2195"></a>
-<span class="sourceLineNo">2196</span>  }<a name="line.2196"></a>
-<span class="sourceLineNo">2197</span><a name="line.2197"></a>
-<span class="sourceLineNo">2198</span>  /**<a name="line.2198"></a>
-<span class="sourceLineNo">2199</span>   * Set scan info, used by test<a name="line.2199"></a>
-<span class="sourceLineNo">2200</span>   * @param scanInfo new scan info to use for test<a name="line.2200"></a>
-<span class="sourceLineNo">2201</span>   */<a name="line.2201"></a>
-<span class="sourceLineNo">2202</span>  void setScanInfo(ScanInfo scanInfo) {<a name="line.2202"></a>
-<span class="sourceLineNo">2203</span>    this.scanInfo = scanInfo;<a name="line.2203"></a>
-<span class="sourceLineNo">2204</span>  }<a name="line.2204"></a>
-<span class="sourceLineNo">2205</span><a name="line.2205"></a>
-<span class="sourceLineNo">2206</span>  @Override<a name="line.2206"></a>
-<span class="sourceLineNo">2207</span>  public boolean hasTooManyStoreFiles() {<a name="line.2207"></a>
-<span class="sourceLineNo">2208</span>    return getStorefilesCount() &gt; this.blockingFileCount;<a name="line.2208"></a>
-<span class="sourceLineNo">2209</span>  }<a name="line.2209"></a>
-<span class="sourceLineNo">2210</span><a name="line.2210"></a>
-<span class="sourceLineNo">2211</span>  @Override<a name="line.2211"></a>
-<span class="sourceLineNo">2212</span>  public long getFlushedCellsCount() {<a name="line.2212"></a>
-<span class="sourceLineNo">2213</span>    return flushedCellsCount;<a name="line.2213"></a>
-<span class="sourceLineNo">2214</span>  }<a name="line.2214"></a>
-<span class="sourceLineNo">2215</span><a name="line.2215"></a>
-<span class="sourceLineNo">2216</span>  @Override<a name="line.2216"></a>
-<span class="sourceLineNo">2217</span>  public long getFlushedCellsSize() {<a name="line.2217"></a>
-<span class="sourceLineNo">2218</span>    return flushedCellsSize;<a name="line.2218"></a>
-<span class="sourceLineNo">2219</span>  }<a name="line.2219"></a>
-<span class="sourceLineNo">2220</span><a name="line.2220"></a>
-<span class="sourceLineNo">2221</span>  @Override<a name="line.2221"></a>
-<span class="sourceLineNo">2222</span>  public long getCompactedCellsCount() {<a name="line.2222"></a>
-<span class="sourceLineNo">2223</span>    return compactedCellsCount;<a name="line.2223"></a>
-<span class="sourceLineNo">2224</span>  }<a name="line.2224"></a>
+<span class="sourceLineNo">2116</span>  @Override<a name="line.2116"></a>
+<span class="sourceLineNo">2117</span>  public StoreFlushContext createFlushContext(long cacheFlushId) {<a name="line.2117"></a>
+<span class="sourceLineNo">2118</span>    return new StoreFlusherImpl(cacheFlushId);<a name="line.2118"></a>
+<span class="sourceLineNo">2119</span>  }<a name="line.2119"></a>
+<span class="sourceLineNo">2120</span><a name="line.2120"></a>
+<span class="sourceLineNo">2121</span>  private final class StoreFlusherImpl implements StoreFlushContext {<a name="line.2121"></a>
+<span class="sourceLineNo">2122</span><a name="line.2122"></a>
+<span class="sourceLineNo">2123</span>    private long cacheFlushSeqNum;<a name="line.2123"></a>
+<span class="sourceLineNo">2124</span>    private MemStoreSnapshot snapshot;<a name="line.2124"></a>
+<span class="sourceLineNo">2125</span>    private List&lt;Path&gt; tempFiles;<a name="line.2125"></a>
+<span class="sourceLineNo">2126</span>    private List&lt;Path&gt; committedFiles;<a name="line.2126"></a>
+<span class="sourceLineNo">2127</span>    private long cacheFlushCount;<a name="line.2127"></a>
+<span class="sourceLineNo">2128</span>    private long cacheFlushSize;<a name="line.2128"></a>
+<span class="sourceLineNo">2129</span><a name="line.2129"></a>
+<span class="sourceLineNo">2130</span>    private StoreFlusherImpl(long cacheFlushSeqNum) {<a name="line.2130"></a>
+<span class="sourceLineNo">2131</span>      this.cacheFlushSeqNum = cacheFlushSeqNum;<a name="line.2131"></a>
+<span class="sourceLineNo">2132</span>    }<a name="line.2132"></a>
+<span class="sourceLineNo">2133</span><a name="line.2133"></a>
+<span class="sourceLineNo">2134</span>    /**<a name="line.2134"></a>
+<span class="sourceLineNo">2135</span>     * This is not thread safe. The caller should have a lock on the region or the store.<a name="line.2135"></a>
+<span class="sourceLineNo">2136</span>     * If necessary, the lock can be added with the patch provided in HBASE-10087<a name="line.2136"></a>
+<span class="sourceLineNo">2137</span>     */<a name="line.2137"></a>
+<span class="sourceLineNo">2138</span>    @Override<a name="line.2138"></a>
+<span class="sourceLineNo">2139</span>    public void prepare() {<a name="line.2139"></a>
+<span class="sourceLineNo">2140</span>      // passing the current sequence number of the wal - to allow bookkeeping in the memstore<a name="line.2140"></a>
+<span class="sourceLineNo">2141</span>      this.snapshot = memstore.snapshot(cacheFlushSeqNum);<a name="line.2141"></a>
+<span class="sourceLineNo">2142</span>      this.cacheFlushCount = snapshot.getCellsCount();<a name="line.2142"></a>
+<span class="sourceLineNo">2143</span>      this.cacheFlushSize = snapshot.getSize();<a name="line.2143"></a>
+<span class="sourceLineNo">2144</span>      committedFiles = new ArrayList&lt;Path&gt;(1);<a name="line.2144"></a>
+<span class="sourceLineNo">2145</span>    }<a name="line.2145"></a>
+<span class="sourceLineNo">2146</span><a name="line.2146"></a>
+<span class="sourceLineNo">2147</span>    @Override<a name="line.2147"></a>
+<span class="sourceLineNo">2148</span>    public void flushCache(MonitoredTask status) throws IOException {<a name="line.2148"></a>
+<span class="sourceLineNo">2149</span>      RegionServerServices rsService = region.getRegionServerServices();<a name="line.2149"></a>
+<span class="sourceLineNo">2150</span>      ThroughputController throughputController =<a name="line.2150"></a>
+<span class="sourceLineNo">2151</span>          rsService == null ? null : rsService.getFlushThroughputController();<a name="line.2151"></a>
+<span class="sourceLineNo">2152</span>      tempFiles = HStore.this.flushCache(cacheFlushSeqNum, snapshot, status, throughputController);<a name="line.2152"></a>
+<span class="sourceLineNo">2153</span>    }<a name="line.2153"></a>
+<span class="sourceLineNo">2154</span><a name="line.2154"></a>
+<span class="sourceLineNo">2155</span>    @Override<a name="line.2155"></a>
+<span class="sourceLineNo">2156</span>    public boolean commit(MonitoredTask status) throws IOException {<a name="line.2156"></a>
+<span class="sourceLineNo">2157</span>      if (this.tempFiles == null || this.tempFiles.isEmpty()) {<a name="line.2157"></a>
+<span class="sourceLineNo">2158</span>        return false;<a name="line.2158"></a>
+<span class="sourceLineNo">2159</span>      }<a name="line.2159"></a>
+<span class="sourceLineNo">2160</span>      List&lt;StoreFile&gt; storeFiles = new ArrayList&lt;StoreFile&gt;(this.tempFiles.size());<a name="line.2160"></a>
+<span class="sourceLineNo">2161</span>      for (Path storeFilePath : tempFiles) {<a name="line.2161"></a>
+<span class="sourceLineNo">2162</span>        try {<a name="line.2162"></a>
+<span class="sourceLineNo">2163</span>          storeFiles.add(HStore.this.commitFile(storeFilePath, cacheFlushSeqNum, status));<a name="line.2163"></a>
+<span class="sourceLineNo">2164</span>        } catch (IOException ex) {<a name="line.2164"></a>
+<span class="sourceLineNo">2165</span>          LOG.error("Failed to commit store file " + storeFilePath, ex);<a name="line.2165"></a>
+<span class="sourceLineNo">2166</span>          // Try to delete the files we have committed before.<a name="line.2166"></a>
+<span class="sourceLineNo">2167</span>          for (StoreFile sf : storeFiles) {<a name="line.2167"></a>
+<span class="sourceLineNo">2168</span>            Path pathToDelete = sf.getPath();<a name="line.2168"></a>
+<span class="sourceLineNo">2169</span>            try {<a name="line.2169"></a>
+<span class="sourceLineNo">2170</span>              sf.deleteReader();<a name="line.2170"></a>
+<span class="sourceLineNo">2171</span>            } catch (IOException deleteEx) {<a name="line.2171"></a>
+<span class="sourceLineNo">2172</span>              LOG.fatal("Failed to delete store file we committed, halting " + pathToDelete, ex);<a name="line.2172"></a>
+<span class="sourceLineNo">2173</span>              Runtime.getRuntime().halt(1);<a name="line.2173"></a>
+<span class="sourceLineNo">2174</span>            }<a name="line.2174"></a>
+<span class="sourceLineNo">2175</span>          }<a name="line.2175"></a>
+<span class="sourceLineNo">2176</span>          throw new IOException("Failed to commit the flush", ex);<a name="line.2176"></a>
+<span class="sourceLineNo">2177</span>        }<a name="line.2177"></a>
+<span class="sourceLineNo">2178</span>      }<a name="line.2178"></a>
+<span class="sourceLineNo">2179</span><a name="line.2179"></a>
+<span class="sourceLineNo">2180</span>      for (StoreFile sf : storeFiles) {<a name="line.2180"></a>
+<span class="sourceLineNo">2181</span>        if (HStore.this.getCoprocessorHost() != null) {<a name="line.2181"></a>
+<span class="sourceLineNo">2182</span>          HStore.this.getCoprocessorHost().postFlush(HStore.this, sf);<a name="line.2182"></a>
+<span class="sourceLineNo">2183</span>        }<a name="line.2183"></a>
+<span class="sourceLineNo">2184</span>        committedFiles.add(sf.getPath());<a name="line.2184"></a>
+<span class="sourceLineNo">2185</span>      }<a name="line.2185"></a>
+<span class="sourceLineNo">2186</span><a name="line.2186"></a>
+<span class="sourceLineNo">2187</span>      HStore.this.flushedCellsCount += cacheFlushCount;<a name="line.2187"></a>
+<span class="sourceLineNo">2188</span>      HStore.this.flushedCellsSize += cacheFlushSize;<a name="line.2188"></a>
+<span class="sourceLineNo">2189</span><a name="line.2189"></a>
+<span class="sourceLineNo">2190</span>      // Add new file to store files.  Clear snapshot too while we have the Store write lock.<a name="line.2190"></a>
+<span class="sourceLineNo">2191</span>      return HStore.this.updateStorefiles(storeFiles, snapshot.getId());<a name="line.2191"></a>
+<span class="sourceLineNo">2192</span>    }<a name="line.2192"></a>
+<span class="sourceLineNo">2193</span><a name="line.2193"></a>
+<span class="sourceLineNo">2194</span>    @Override<a name="line.2194"></a>
+<span class="sourceLineNo">2195</span>    public List&lt;Path&gt; getCommittedFiles() {<a name="line.2195"></a>
+<span class="sourceLineNo">2196</span>      return committedFiles;<a name="line.2196"></a>
+<span class="sourceLineNo">2197</span>    }<a name="line.2197"></a>
+<span class="sourceLineNo">2198</span><a name="line.2198"></a>
+<span class="sourceLineNo">2199</span>    /**<a name="line.2199"></a>
+<span class="sourceLineNo">2200</span>     * Similar to commit, but called in secondary region replicas for replaying the<a name="line.2200"></a>
+<span class="sourceLineNo">2201</span>     * flush cache from primary region. Adds the new files to the store, and drops the<a name="line.2201"></a>
+<span class="sourceLineNo">2202</span>     * snapshot depending on dropMemstoreSnapshot argument.<a name="line.2202"></a>
+<span class="sourceLineNo">2203</span>     * @param fileNames names of the flushed files<a name="line.2203"></a>
+<span class="sourceLineNo">2204</span>     * @param dropMemstoreSnapshot whether to drop the prepared memstore snapshot<a name="line.2204"></a>
+<span class="sourceLineNo">2205</span>     * @throws IOException<a name="line.2205"></a>
+<span class="sourceLineNo">2206</span>     */<a name="line.2206"></a>
+<span class="sourceLineNo">2207</span>    @Override<a name="line.2207"></a>
+<span class="sourceLineNo">2208</span>    public void replayFlush(List&lt;String&gt; fileNames, boolean dropMemstoreSnapshot)<a name="line.2208"></a>
+<span class="sourceLineNo">2209</span>        throws IOException {<a name="line.2209"></a>
+<span class="sourceLineNo">2210</span>      List&lt;StoreFile&gt; storeFiles = new ArrayList&lt;StoreFile&gt;(fileNames.size());<a name="line.2210"></a>
+<span class="sourceLineNo">2211</span>      for (String file : fileNames) {<a name="line.2211"></a>
+<span class="sourceLineNo">2212</span>        // open the file as a store file (hfile link, etc)<a name="line.2212"></a>
+<span class="sourceLineNo">2213</span>        StoreFileInfo storeFileInfo = fs.getStoreFileInfo(getColumnFamilyName(), file);<a name="line.2213"></a>
+<span class="sourceLineNo">2214</span>        StoreFile storeFile = createStoreFileAndReader(storeFileInfo);<a name="line.2214"></a>
+<span class="sourceLineNo">2215</span>        storeFiles.add(storeFile);<a name="line.2215"></a>
+<span class="sourceLineNo">2216</span>        HStore.this.storeSize += storeFile.getReader().length();<a name="line.2216"></a>
+<span class="sourceLineNo">2217</span>        HStore.this.totalUncompressedBytes += storeFile.getReader().getTotalUncompressedBytes();<a name="line.2217"></a>
+<span class="sourceLineNo">2218</span>        if (LOG.isInfoEnabled()) {<a name="line.2218"></a>
+<span class="sourceLineNo">2219</span>          LOG.info("Region: " + HStore.this.getRegionInfo().getEncodedName() +<a name="line.2219"></a>
+<span class="sourceLineNo">2220</span>            " added " + storeFile + ", entries=" + storeFile.getReader().getEntries() +<a name="line.2220"></a>
+<span class="sourceLineNo">2221</span>            ", sequenceid=" +  + storeFile.getReader().getSequenceID() +<a name="line.2221"></a>
+<span class="sourceLineNo">2222</span>            ", filesize=" + StringUtils.humanReadableInt(storeFile.getReader().length()));<a name="line.2222"></a>
+<span class="sourceLineNo">2223</span>        }<a name="line.2223"></a>
+<span class="sourceLineNo">2224</span>      }<a name="line.2224"></a>
 <span class="sourceLineNo">2225</span><a name="line.2225"></a>
-<span class="sourceLineNo">2226</span>  @Override<a name="line.2226"></a>
-<span class="sourceLineNo">2227</span>  public long getCompactedCellsSize() {<a name="line.2227"></a>
-<span class="sourceLineNo">2228</span>    return compactedCellsSize;<a name="line.2228"></a>
-<span class="sourceLineNo">2229</span>  }<a name="line.2229"></a>
-<span class="sourceLineNo">2230</span><a name="line.2230"></a>
-<span class="sourceLineNo">2231</span>  @Override<a name="line.2231"></a>
-<span class="sourceLineNo">2232</span>  public long getMajorCompactedCellsCount() {<a name="line.2232"></a>
-<span class="sourceLineNo">2233</span>    return majorCompactedCellsCount;<a name="line.2233"></a>
-<span class="sourceLineNo">2234</span>  }<a name="line.2234"></a>
-<span class="sourceLineNo">2235</span><a name="line.2235"></a>
-<span class="sourceLineNo">2236</span>  @Override<a name="line.2236"></a>
-<span class="sourceLineNo">2237</span>  public long getMajorCompactedCellsSize() {<a name="line.2237"></a>
-<span class="sourceLineNo">2238</span>    return majorCompactedCellsSize;<a name="line.2238"></a>
-<span class="sourceLineNo">2239</span>  }<a name="line.2239"></a>
-<span class="sourceLineNo">2240</span><a name="line.2240"></a>
-<span class="sourceLineNo">2241</span>  /**<a name="line.2241"></a>
-<span class="sourceLineNo">2242</span>   * Returns the StoreEngine that is backing this concrete implementation of Store.<a name="line.2242"></a>
-<span class="sourceLineNo">2243</span>   * @return Returns the {@link StoreEngine} object used internally inside this HStore object.<a name="line.2243"></a>
-<span class="sourceLineNo">2244</span>   */<a name="line.2244"></a>
-<span class="sourceLineNo">2245</span>  @VisibleForTesting<a name="line.2245"></a>
-<span class="sourceLineNo">2246</span>  public StoreEngine&lt;?, ?, ?, ?&gt; getStoreEngine() {<a name="line.2246"></a>
-<span class="sourceLineNo">2247</span>    return this.storeEngine;<a name="line.2247"></a>
-<span class="sourceLineNo">2248</span>  }<a name="line.2248"></a>
-<span class="sourceLineNo">2249</span><a name="line.2249"></a>
-<span class="sourceLineNo">2250</span>  protected OffPeakHours getOffPeakHours() {<a name="line.2250"></a>
-<span class="sourceLineNo">2251</span>    return this.offPeakHours;<a name="line.2251"></a>
-<span class="sourceLineNo">2252</span>  }<a name="line.2252"></a>
-<span class="sourceLineNo">2253</span><a name="line.2253"></a>
-<span class="sourceLineNo">2254</span>  /**<a name="line.2254"></a>
-<span class="sourceLineNo">2255</span>   * {@inheritDoc}<a name="line.2255"></a>
-<span class="sourceLineNo">2256</span>   */<a name="line.2256"></a>
-<span class="sourceLineNo">2257</span>  @Override<a name="line.2257"></a>
-<span class="sourceLineNo">2258</span>  public void onConfigurationChange(Configuration conf) {<a name="line.2258"></a>
-<span class="sourceLineNo">2259</span>    this.conf = new CompoundConfiguration()<a name="line.2259"></a>
-<span class="sourceLineNo">2260</span>            .add(conf)<a name="line.2260"></a>
-<span class="sourceLineNo">2261</span>            .addBytesMap(family.getValues());<a name="line.2261"></a>
-<span class="sourceLineNo">2262</span>    this.storeEngine.compactionPolicy.setConf(conf);<a name="line.2262"></a>
-<span class="sourceLineNo">2263</span>    this.offPeakHours = OffPeakHours.getInstance(conf);<a name="line.2263"></a>
-<span class="sourceLineNo">2264</span>  }<a name="line.2264"></a>
+<span class="sourceLineNo">2226</span>      long snapshotId = -1; // -1 means do not drop<a name="line.2226"></a>
+<span class="sourceLineNo">2227</span>      if (dropMemstoreSnapshot &amp;&amp; snapshot != null) {<a name="line.2227"></a>
+<span class="sourceLineNo">2228</span>        snapshotId = snapshot.getId();<a name="line.2228"></a>
+<span class="sourceLineNo">2229</span>      }<a name="line.2229"></a>
+<span class="sourceLineNo">2230</span>      HStore.this.updateStorefiles(storeFiles, snapshotId);<a name="line.2230"></a>
+<span class="sourceLineNo">2231</span>    }<a name="line.2231"></a>
+<span class="sourceLineNo">2232</span><a name="line.2232"></a>
+<span class="sourceLineNo">2233</span>    /**<a name="line.2233"></a>
+<span class="sourceLineNo">2234</span>     * Abort the snapshot preparation. Drops the snapshot if any.<a name="line.2234"></a>
+<span class="sourceLineNo">2235</span>     * @throws IOException<a name="line.2235"></a>
+<span class="sourceLineNo">2236</span>     */<a name="line.2236"></a>
+<span class="sourceLineNo">2237</span>    @Override<a name="line.2237"></a>
+<span class="sourceLineNo">2238</span>    public void abort() throws IOException {<a name="line.2238"></a>
+<span class="sourceLineNo">2239</span>      if (snapshot == null) {<a name="line.2239"></a>
+<span class="sourceLineNo">2240</span>        return;<a name="line.2240"></a>
+<span class="sourceLineNo">2241</span>      }<a name="line.2241"></a>
+<span class="sourceLineNo">2242</span>      HStore.this.updateStorefiles(new ArrayList&lt;StoreFile&gt;(0), snapshot.getId());<a name="line.2242"></a>
+<span class="sourceLineNo">2243</span>    }<a name="line.2243"></a>
+<span class="sourceLineNo">2244</span>  }<a name="line.2244"></a>
+<span class="sourceLineNo">2245</span><a name="line.2245"></a>
+<span class="sourceLineNo">2246</span>  @Override<a name="line.2246"></a>
+<span class="sourceLineNo">2247</span>  public boolean needsCompaction() {<a name="line.2247"></a>
+<span class="sourceLineNo">2248</span>    return this.storeEngine.needsCompaction(this.filesCompacting);<a name="line.2248"></a>
+<span class="sourceLineNo">2249</span>  }<a name="line.2249"></a>
+<span class="sourceLineNo">2250</span><a name="line.2250"></a>
+<span class="sourceLineNo">2251</span>  @Override<a name="line.2251"></a>
+<span class="sourceLineNo">2252</span>  public CacheConfig getCacheConfig() {<a name="line.2252"></a>
+<span class="sourceLineNo">2253</span>    return this.cacheConf;<a name="line.2253"></a>
+<span class="sourceLineNo">2254</span>  }<a name="line.2254"></a>
+<span class="sourceLineNo">2255</span><a name="line.2255"></a>
+<span class="sourceLineNo">2256</span>  public static final long FIXED_OVERHEAD =<a name="line.2256"></a>
+<span class="sourceLineNo">2257</span>      ClassSize.align(ClassSize.OBJECT + (16 * ClassSize.REFERENCE) + (10 * Bytes.SIZEOF_LONG)<a name="line.2257"></a>
+<span class="sourceLineNo">2258</span>              + (5 * Bytes.SIZEOF_INT) + (2 * Bytes.SIZEOF_BOOLEAN));<a name="line.2258"></a>
+<span class="sourceLineNo">2259</span><a name="line.2259"></a>
+<span class="sourceLineNo">2260</span>  public static final long DEEP_OVERHEAD = ClassSize.align(FIXED_OVERHEAD<a name="line.2260"></a>
+<span class="sourceLineNo">2261</span>      + ClassSize.OBJECT + ClassSize.REENTRANT_LOCK<a name="line.2261"></a>
+<span class="sourceLineNo">2262</span>      + ClassSize.CONCURRENT_SKIPLISTMAP<a name="line.2262"></a>
+<span class="sourceLineNo">2263</span>      + ClassSize.CONCURRENT_SKIPLISTMAP_ENTRY + ClassSize.OBJECT<a name="line.2263"></a>
+<span class="sourceLineNo">2264</span>      + ScanInfo.FIXED_OVERHEAD);<a name="line.2264"></a>
 <span class="sourceLineNo">2265</span><a name="line.2265"></a>
-<span class="sourceLineNo">2266</span>  /**<a name="line.2266"></a>
-<span class="sourceLineNo">2267</span>   * {@inheritDoc}<a name="line.2267"></a>
-<span class="sourceLineNo">2268</span>   */<a name="line.2268"></a>
-<span class="sourceLineNo">2269</span>  @Override<a name="line.2269"></a>
-<span class="sourceLineNo">2270</span>  public void registerChildren(ConfigurationManager manager) {<a name="line.2270"></a>
-<span class="sourceLineNo">2271</span>    // No children to register<a name="line.2271"></a>
-<span class="sourceLineNo">2272</span>  }<a name="line.2272"></a>
-<span class="sourceLineNo">2273</span><a name="line.2273"></a>
-<span class="sourceLineNo">2274</span>  /**<a name="line.2274"></a>
-<span class="sourceLineNo">2275</span>   * {@inheritDoc}<a name="line.2275"></a>
-<span class="sourceLineNo">2276</span>   */<a name="line.2276"></a>
-<span class="sourceLineNo">2277</span>  @Override<a name="line.2277"></a>
-<span class="sourceLineNo">2278</span>  public void deregisterChildren(ConfigurationManager manager) {<a name="line.2278"></a>
-<span class="sourceLineNo">2279</span>    // No children to deregister<a name="line.2279"></a>
-<span class="sourceLineNo">2280</span>  }<a name="line.2280"></a>
-<span class="sourceLineNo">2281</span><a name="line.2281"></a>
-<span class="sourceLineNo">2282</span>  @Override<a name="line.2282"></a>
-<span class="sourceLineNo">2283</span>  public double getCompactionPressure() {<a name="line.2283"></a>
-<span class="sourceLineNo">2284</span>    return storeEngine.getStoreFileManager().getCompactionPressure();<a name="line.2284"></a>
-<span class="sourceLineNo">2285</span>  }<a name="line.2285"></a>
-<span class="sourceLineNo">2286</span><a name="line.2286"></a>
-<span class="sourceLineNo">2287</span>  @Override<a name="line.2287"></a>
-<span class="sourceLineNo">2288</span>  public boolean isPrimaryReplicaStore() {<a name="line.2288"></a>
-<span class="sourceLineNo">2289</span>     return getRegionInfo().getReplicaId() == HRegionInfo.DEFAULT_REPLICA_ID;<a name="line.2289"></a>
-<span class="sourceLineNo">2290</span>  }<a name="line.2290"></a>
-<span class="sourceLineNo">2291</span><a name="line.2291"></a>
-<span class="sourceLineNo">2292</span>  @Override<a name="line.2292"></a>
-<span class="sourceLineNo">2293</span>  public void closeAndArchiveCompactedFiles() throws IOException {<a name="line.2293"></a>
-<span class="sourceLineNo">2294</span>    lock.readLock().lock();<a name="line.2294"></a>
-<span class="sourceLineNo">2295</span>    Collection&lt;StoreFile&gt; copyCompactedfiles = null;<a name="line.2295"></a>
-<span class="sourceLineNo">2296</span>    try {<a name="line.2296"></a>
-<span class="sourceLineNo">2297</span>      Collection&lt;StoreFile&gt; compactedfiles =<a name="line.2297"></a>
-<span class="sourceLineNo">2298</span>          this.getStoreEngine().getStoreFileManager().getCompactedfiles();<a name="line.2298"></a>
-<span class="sourceLineNo">2299</span>      if (compactedfiles != null &amp;&amp; compactedfiles.size() != 0) {<a name="line.2299"></a>
-<span class="sourceLineNo">2300</span>        // Do a copy under read lock<a name="line.2300"></a>
-<span class="sourceLineNo">2301</span>        copyCompactedfiles = new ArrayList&lt;StoreFile&gt;(compactedfiles);<a name="line.2301"></a>
-<span class="sourceLineNo">2302</span>      } else {<a name="line.2302"></a>
-<span class="sourceLineNo">2303</span>        if (LOG.isTraceEnabled()) {<a name="line.2303"></a>
-<span class="sourceLineNo">2304</span>          LOG.trace("No compacted files to archive");<a name="line.2304"></a>
-<span class="sourceLineNo">2305</span>          return;<a name="line.2305"></a>
-<span class="sourceLineNo">2306</span>        }<a name="line.2306"></a>
-<span class="sourceLineNo">2307</span>      }<a name="line.2307"></a>
-<span class="sourceLineNo">2308</span>    } finally {<a name="line.2308"></a>
-<span class="sourceLineNo">2309</span>      lock.readLock().unlock();<a name="line.2309"></a>
-<span class="sourceLineNo">2310</span>    }<a name="line.2310"></a>
-<span class="sourceLineNo">2311</span>    if (copyCompactedfiles != null &amp;&amp; !copyCompactedfiles.isEmpty()) {<a name="line.2311"></a>
-<span class="sourceLineNo">2312</span>      removeCompactedfiles(copyCompactedfiles);<a name="line.2312"></a>
-<span class="sourceLineNo">2313</span>    }<a name="line.2313"></a>
-<span class="sourceLineNo">2314</span>  }<a name="line.2314"></a>
-<span class="sourceLineNo">2315</span><a name="line.2315"></a>
-<span class="sourceLineNo">2316</span>  /**<a name="line.2316"></a>
-<span class="sourceLineNo">2317</span>   * Archives and removes the compacted files<a name="line.2317"></a>
-<span class="sourceLineNo">2318</span>   * @param compactedfiles The compacted files in this store that are not active in reads<a name="line.2318"></a>
-<span class="sourceLineNo">2319</span>   * @throws IOException<a name="line.2319"></a>
-<span class="sourceLineNo">2320</span>   */<a name="line.2320"></a>
-<span class="sourceLineNo">2321</span>  private void removeCompactedfiles(Collection&lt;StoreFile&gt; compactedfiles)<a name="line.2321"></a>
-<span class="sourceLineNo">2322</span>      throws IOException {<a name="line.2322"></a>
-<span class="sourceLineNo">2323</span>    final List&lt;StoreFile&gt; filesToRemove = new ArrayList&lt;StoreFile&gt;(compactedfiles.size());<a name="line.2323"></a>
-<span class="sourceLineNo">2324</span>    for (final StoreFile file : compactedfiles) {<a name="line.2324"></a>
-<span class="sourceLineNo">2325</span>      synchronized (file) {<a name="line.2325"></a>
-<span class="sourceLineNo">2326</span>        try {<a name="line.2326"></a>
-<span class="sourceLineNo">2327</span>          StoreFile.Reader r = file.getReader();<a name="line.2327"></a>
-<span class="sourceLineNo">2328</span>          if (r == null) {<a name="line.2328"></a>
-<span class="sourceLineNo">2329</span>            if (LOG.isDebugEnabled()) {<a name="line.2329"></a>
-<span class="sourceLineNo">2330</span>              LOG.debug("The file " + file + " was closed but still not archived.");<a name="line.2330"></a>
-<span class="sourceLineNo">2331</span>            }<a name="line.2331"></a>
-<span class="sourceLineNo">2332</span>            filesToRemove.add(file);<a name="line.2332"></a>
-<span class="sourceLineNo">2333</span>          }<a name="line.2333"></a>
-<span class="sourceLineNo">2334</span>          if (r != null &amp;&amp; r.isCompactedAway() &amp;&amp; !r.isReferencedInReads()) {<a name="line.2334"></a>
-<span class="sourceLineNo">2335</span>            // Even if deleting fails we need not bother as any new scanners won't be<a name="line.2335"></a>
-<span class="sourceLineNo">2336</span>            // able to use the compacted file as the status is already compactedAway<a name="line.2336"></a>
-<span class="sourceLineNo">2337</span>            if (LOG.isTraceEnabled()) {<a name="line.2337"></a>
-<span class="sourceLineNo">2338</span>              LOG.trace("Closing and archiving the file " + file.getPath());<a name="line.2338"></a>
-<span class="sourceLineNo">2339</span>            }<a name="line.2339"></a>
-<span class="sourceLineNo">2340</span>            r.close(true);<a name="line.2340"></a>
-<span class="sourceLineNo">2341</span>            // Just close and return<a name="line.2341"></a>
-<span class="sourceLineNo">2342</span>            filesToRemove.add(file);<a name="line.2342"></a>
-<span class="sourceLineNo">2343</span>          }<a name="line.2343"></a>
-<span class="sourceLineNo">2344</span>        } catch (Exception e) {<a name="line.2344"></a>
-<span class="sourceLineNo">2345</span>          LOG.error(<a name="line.2345"></a>
-<span class="sourceLineNo">2346</span>            "Exception while trying to close the compacted store file " + file.getPath().getName());<a name="line.2346"></a>
-<span class="sourceLineNo">2347</span>        }<a name="line.2347"></a>
-<span class="sourceLineNo">2348</span>      }<a name="line.2348"></a>
-<span class="sourceLineNo">2349</span>    }<a name="line.2349"></a>
-<span class="sourceLineNo">2350</span>    if (this.isPrimaryReplicaStore()) {<a name="line.2350"></a>
-<span class="sourceLineNo">2351</span>      // Only the primary region is allowed to move the file to archive.<a name="line.2351"></a>
-<span class="sourceLineNo">2352</span>      // The secondary region does not move the files to archive. Any active reads from<a name="line.2352"></a>
-<span class="sourceLineNo">2353</span>      // the secondary region will still work because the file as such has active readers on it.<a name="line.2353"></a>
-<span class="sourceLineNo">2354</span>      if (!filesToRemove.isEmpty()) {<a name="line.2354"></a>
-<span class="sourceLineNo">2355</span>        if (LOG.isDebugEnabled()) {<a name="line.2355"></a>
-<span class="sourceLineNo">2356</span>          LOG.debug("Moving the files " + filesToRemove + " to archive");<a name="line.2356"></a>
-<span class="sourceLineNo">2357</span>        }<a name="line.2357"></a>
-<span class="sourceLineNo">2358</span>        // Only if this is successful it has to be removed<a name="line.2358"></a>
-<span class="sourceLineNo">2359</span>        this.fs.removeStoreFiles(this.getFamily().getNameAsString(), filesToRemove);<a name="line.2359"></a>
-<span class="sourceLineNo">2360</span>      }<a name="line.2360"></a>
-<span class="sourceLineNo">2361</span>    }<a name="line.2361"></a>
-<span class="sourceLineNo">2362</span>    if (!filesToRemove.isEmpty()) {<a name="line.2362"></a>
-<span class="sourceLineNo">2363</span>      // Clear the compactedfiles from the store file manager<a name="line.2363"></a>
-<span class="sourceLineNo">2364</span>      clearCompactedfiles(filesToRemove);<a name="line.2364"></a>
-<span class="sourceLineNo">2365</span>    }<a name="line.2365"></a>
-<span class="sourceLineNo">2366</span>  }<a name="line.2366"></a>
-<span class="sourceLineNo">2367</span><a name="line.2367"></a>
-<span class="sourceLineNo">2368</span>  private void clearCompactedfiles(final List&lt;StoreFile&gt; filesToRemove) throws IOException {<a name="line.2368"></a>
-<span class="sourceLineNo">2369</span>    if (LOG.isTraceEnabled()) {<a name="line.2369"></a>
-<span class="sourceLineNo">2370</span>      LOG.trace("Clearing the compacted file " + filesToRemove + " from this store");<a name="line.2370"></a>
-<span class="sourceLineNo">2371</span>    }<a name="line.2371"></a>
-<span class="sourceLineNo">2372</span>    try {<a name="line.2372"></a>
-<span class="sourceLineNo">2373</span>      lock.writeLock().lock();<a name="line.2373"></a>
-<span class="sourceLineNo">2374</span>      this.getStoreEngine().getStoreFileManager().removeCompactedFiles(filesToRemove);<a name="line.2374"></a>
-<span class="sourceLineNo">2375</span>    } finally {<a name="line.2375"></a>
-<span class="sourceLineNo">2376</span>      lock.writeLock().unlock();<a name="line.2376"></a>
-<span class="sourceLineNo">2377</span>    }<a name="line.2377"></a>
-<span class="sourceLineNo">2378</span>  }<a name="line.2378"></a>
-<span class="sourceLineNo">2379</span>}<a name="line.2379"></a>
+<span class="sourceLineNo">2266</span>  @Override<a name="line.2266"></a>
+<span class="sourceLineNo">2267</span>  public long heapSize() {<a name="line.2267"></a>
+<span class="sourceLineNo">2268</span>    return DEEP_OVERHEAD + this.memstore.heapSize();<a name="line.2268"></a>
+<span class="sourceLineNo">2269</span>  }<a name="line.2269"></a>
+<span class="sourceLineNo">2270</span><a name="line.2270"></a>
+<span class="sourceLineNo">2271</span>  @Override<a name="line.2271"></a>
+<span class="sourceLineNo">2272</span>  public CellComparator getComparator() {<a name="line.2272"></a>
+<span class="sourceLineNo">2273</span>    return comparator;<a name="line.2273"></a>
+<span class="sourceLineNo">2274</span>  }<a name="line.2274"></a>
+<span class="sourceLineNo">2275</span><a name="line.2275"></a>
+<span class="sourceLineNo">2276</span>  @Override<a name="line.2276"></a>
+<span class="sourceLineNo">2277</span>  public ScanInfo getScanInfo() {<a name="line.2277"></a>
+<span class="sourceLineNo">2278</span>    return scanInfo;<a name="line.2278"></a>
+<span class="sourceLineNo">2279</span>  }<a name="line.2279"></a>
+<span class="sourceLineNo">2280</span><a name="line.2280"></a>
+<span class="sourceLineNo">2281</span>  /**<a name="line.2281"></a>
+<span class="sourceLineNo">2282</span>   * Set scan info, used by test<a name="line.2282"></a>
+<span class="sourceLineNo">2283</span>   * @param scanInfo new scan info to use for test<a name="line.2283"></a>
+<span class="sourceLineNo">2284</span>   */<a name="line.2284"></a>
+<span class="sourceLineNo">2285</span>  void setScanInfo(ScanInfo scanInfo) {<a name="line.2285"></a>
+<span class="sourceLineNo">2286</span>    this.scanInfo = scanInfo;<a name="line.2286"></a>
+<span class="sourceLineNo">2287</span>  }<a name="line.2287"></a>
+<span class="sourceLineNo">2288</span><a name="line.2288"></a>
+<span class="sourceLineNo">2289</span>  @Override<a name="line.2289"></a>
+<span class="sourceLineNo">2290</span>  public boolean hasTooManyStoreFiles() {<a name="line.2290"></a>
+<span class="sourceLineNo">2291</span>    return getStorefilesCount() &gt; this.blockingFileCount;<a name="line.2291"></a>
+<span class="sourceLineNo">2292</span>  }<a name="line.2292"></a>
+<span class="sourceLineNo">2293</span><a name="line.2293"></a>
+<span class="sourceLineNo">2294</span>  @Override<a name="line.2294"></a>
+<span class="sourceLineNo">2295</span>  public long getFlushedCellsCount() {<a name="line.2295"></a>
+<span class="sourceLineNo">2296</span>    return flushedCellsCount;<a name="line.2296"></a>
+<span class="sourceLineNo">2297</span>  }<a name="line.2297"></a>
+<span class="sourceLineNo">2298</span><a name="line.2298"></a>
+<span class="sourceLineNo">2299</span>  @Override<a name="line.2299"></a>
+<span class="sourceLineNo">2300</span>  public long getFlushedCellsSize() {<a name="line.2300"></a>
+<span class="sourceLineNo">2301</span>    return flushedCellsSize;<a name="line.2301"></a>
+<span class="sourceLineNo">2302</span>  }<a name="line.2302"></a>
+<span class="sourceLineNo">2303</span><a name="line.2303"></a>
+<span class="sourceLineNo">2304</span>  @Override<a name="line.2304"></a>
+<span class="sourceLineNo">2305</span>  public long getCompactedCellsCount() {<a name="line.2305"></a>
+<span class="sourceLineNo">2306</span>    return compactedCellsCount;<a name="line.2306"></a>
+<span class="sourceLineNo">2307</span>  }<a name="line.2307"></a>
+<span class="sourceLineNo">2308</span><a name="line.2308"></a>
+<span class="sourceLineNo">2309</span>  @Override<a name="line.2309"></a>
+<span class="sourceLineNo">2310</span>  public long getCompactedCellsSize() {<a name="line.2310"></a>
+<span class="sourceLineNo">2311</span>    return compactedCellsSize;<a name="line.2311"></a>
+<span class="sourceLineNo">2312</span>  }<a name="line.2312"></a>
+<span class="sourceLineNo">2313</span><a name="line.2313"></a>
+<span class="sourceLineNo">2314</span>  @Override<a name="line.2314"></a>
+<span class="sourceLineNo">2315</span>  public long getMajorCompactedCellsCount() {<a name="line.2315"></a>
+<span class="sourceLineNo">2316</span>    return majorCompactedCellsCount;<a name="line.2316"></a>
+<span class="sourceLineNo">2317</span>  }<a name="line.2317"></a>
+<span class="sourceLineNo">2318</span><a name="line.2318"></a>
+<span class="sourceLineNo">2319</span>  @Override<a name="line.2319"></a>
+<span class="sourceLineNo">2320</span>  public long getMajorCompactedCellsSize() {<a name="line.2320"></a>
+<span class="sourceLineNo">2321</span>    return majorCompactedCellsSize;<a name="line.2321"></a>
+<span class="sourceLineNo">2322</span>  }<a name="line.2322"></a>
+<span class="sourceLineNo">2323</span><a name="line.2323"></a>
+<span class="sourceLineNo">2324</span>  /**<a name="line.2324"></a>
+<span class="sourceLineNo">2325</span>   * Returns the StoreEngine that is backing this concrete implementation of Store.<a name="line.2325"></a>
+<span class="sourceLineNo">2326</span>   * @return Returns the {@link StoreEngine} object used internally inside this HStore object.<a name="line.2326"></a>
+<span class="sourceLineNo">2327</span>   */<a name="line.2327"></a>
+<span class="sourceLineNo">2328</span>  @VisibleForTesting<a name="line.2328"></a>
+<span class="sourceLineNo">2329</span>  public StoreEngine&lt;?, ?, ?, ?&gt; getStoreEngine() {<a name="line.2329"></a>
+<span class="sourceLineNo">2330</span>    return this.storeEngine;<a name="line.2330"></a>
+<span class="sourceLineNo">2331</span>  }<a name="line.2331"></a>
+<span class="sourceLineNo">2332</span><a name="line.2332"></a>
+<span class="sourceLineNo">2333</span>  protected OffPeakHours getOffPeakHours() {<a name="line.2333"></a>
+<span class="sourceLineNo">2334</span>    return this.offPeakHours;<a name="line.2334"></a>
+<span class="sourceLineNo">2335</span>  }<a name="line.2335"></a>
+<span class="sourceLineNo">2336</span><a name="line.2336"></a>
+<span class="sourceLineNo">2337</span>  /**<a name="line.2337"></a>
+<span class="sourceLineNo">2338</span>   * {@inheritDoc}<a name="line.2338"></a>
+<span class="sourceLineNo">2339</span>   */<a name="line.2339"></a>
+<span class="sourceLineNo">2340</span>  @Override<a name="line.2340"></a>
+<span class="sourceLineNo">2341</span>  public void onConfigurationChange(Configuration conf) {<a name="line.2341"></a>
+<span class="sourceLineNo">2342</span>    this.conf = new CompoundConfiguration()<a name="line.2342"></a>
+<span class="sourceLineNo">2343</span>            .add(conf)<a name="line.2343"></a>
+<span class="sourceLineNo">2344</span>            .addBytesMap(family.getValues());<a name="line.2344"></a>
+<span class="sourceLineNo">2345</span>    this.storeEngine.compactionPolicy.setConf(conf);<a name="line.2345"></a>
+<span class="sourceLineNo">2346</span>    this.offPeakHours = OffPeakHours.getInstance(conf);<a name="line.2346"></a>
+<span class="sourceLineNo">2347</span>  }<a name="line.2347"></a>
+<span class="sourceLineNo">2348</span><a name="line.2348"></a>
+<span class="sourceLineNo">2349</span>  /**<a name="line.2349"></a>
+<span class="sourceLineNo">2350</span>   * {@inheritDoc}<a name="line.2350"></a>
+<span class="sourceLineNo">2351</span>   */<a name="line.2351"></a>
+<span class="sourceLineNo">2352</span>  @Override<a name="line.2352"></a>
+<span class="sourceLineNo">2353</span>  public void registerChildren(ConfigurationManager manager) {<a name="line.2353"></a>
+<span class="sourceLineNo">2354</span>    // No children to register<a name="line.2354"></a>
+<span class="sourceLineNo">2355</span>  }<a name="line.2355"></a>
+<span class="sourceLineNo">2356</span><a name="line.2356"></a>
+<span class="sourceLineNo">2357</span>  /**<a name="line.2357"></a>
+<span class="sourceLineNo">2358</span>   * {@inheritDoc}<a name="line.2358"></a>
+<span class="sourceLineNo">2359</span>   */<a name="line.2359"></a>
+<span class="sourceLineNo">2360</span>  @Override<a name="line.2360"></a>
+<span class="sourceLineNo">2361</span>  public void deregisterChildren(ConfigurationManager manager) {<a name="line.2361"></a>
+<span class="sourceLineNo">2362</span>    // No children to deregister<a name="line.2362"></a>
+<span class="sourceLineNo">2363</span>  }<a name="line.2363"></a>
+<span class="sourceLineNo">2364</span><a name="line.2364"></a>
+<span class="sourceLineNo">2365</span>  @Override<a name="line.2365"></a>
+<span class="sourceLineNo">2366</span>  public double getCompactionPressure() {<a name="line.2366"></a>
+<span class="sourceLineNo">2367</span>    return storeEngine.getStoreFileManager().getCompactionPressure();<a name="line.2367"></a>
+<span class="sourceLineNo">2368</span>  }<a name="line.2368"></a>

<TRUNCATED>

Mime
View raw message