hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From git-site-r...@apache.org
Subject [11/51] [partial] hbase-site git commit: Published site at 82d554e3783372cc6b05489452c815b57c06f6cd.
Date Sat, 10 Jun 2017 15:00:01 GMT
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/476c54ed/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/Store.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/Store.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/Store.html
index a9e679e..a56c63f 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/Store.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/Store.html
@@ -410,149 +410,154 @@
 <span class="sourceLineNo">402</span>  long getStorefilesSize();<a name="line.402"></a>
 <span class="sourceLineNo">403</span><a name="line.403"></a>
 <span class="sourceLineNo">404</span>  /**<a name="line.404"></a>
-<span class="sourceLineNo">405</span>   * @return The size of the store file indexes, in bytes.<a name="line.405"></a>
+<span class="sourceLineNo">405</span>   * @return The size of only the store files which are HFiles, in bytes.<a name="line.405"></a>
 <span class="sourceLineNo">406</span>   */<a name="line.406"></a>
-<span class="sourceLineNo">407</span>  long getStorefilesIndexSize();<a name="line.407"></a>
+<span class="sourceLineNo">407</span>  long getHFilesSize();<a name="line.407"></a>
 <span class="sourceLineNo">408</span><a name="line.408"></a>
 <span class="sourceLineNo">409</span>  /**<a name="line.409"></a>
-<span class="sourceLineNo">410</span>   * Returns the total size of all index blocks in the data block indexes, including the root level,<a name="line.410"></a>
-<span class="sourceLineNo">411</span>   * intermediate levels, and the leaf level for multi-level indexes, or just the root level for<a name="line.411"></a>
-<span class="sourceLineNo">412</span>   * single-level indexes.<a name="line.412"></a>
-<span class="sourceLineNo">413</span>   * @return the total size of block indexes in the store<a name="line.413"></a>
-<span class="sourceLineNo">414</span>   */<a name="line.414"></a>
-<span class="sourceLineNo">415</span>  long getTotalStaticIndexSize();<a name="line.415"></a>
-<span class="sourceLineNo">416</span><a name="line.416"></a>
-<span class="sourceLineNo">417</span>  /**<a name="line.417"></a>
-<span class="sourceLineNo">418</span>   * Returns the total byte size of all Bloom filter bit arrays. For compound Bloom filters even the<a name="line.418"></a>
-<span class="sourceLineNo">419</span>   * Bloom blocks currently not loaded into the block cache are counted.<a name="line.419"></a>
-<span class="sourceLineNo">420</span>   * @return the total size of all Bloom filters in the store<a name="line.420"></a>
-<span class="sourceLineNo">421</span>   */<a name="line.421"></a>
-<span class="sourceLineNo">422</span>  long getTotalStaticBloomSize();<a name="line.422"></a>
-<span class="sourceLineNo">423</span><a name="line.423"></a>
-<span class="sourceLineNo">424</span>  // Test-helper methods<a name="line.424"></a>
-<span class="sourceLineNo">425</span><a name="line.425"></a>
-<span class="sourceLineNo">426</span>  /**<a name="line.426"></a>
-<span class="sourceLineNo">427</span>   * Used for tests.<a name="line.427"></a>
-<span class="sourceLineNo">428</span>   * @return cache configuration for this Store.<a name="line.428"></a>
-<span class="sourceLineNo">429</span>   */<a name="line.429"></a>
-<span class="sourceLineNo">430</span>  CacheConfig getCacheConfig();<a name="line.430"></a>
-<span class="sourceLineNo">431</span><a name="line.431"></a>
-<span class="sourceLineNo">432</span>  /**<a name="line.432"></a>
-<span class="sourceLineNo">433</span>   * @return the parent region info hosting this store<a name="line.433"></a>
+<span class="sourceLineNo">410</span>   * @return The size of the store file indexes, in bytes.<a name="line.410"></a>
+<span class="sourceLineNo">411</span>   */<a name="line.411"></a>
+<span class="sourceLineNo">412</span>  long getStorefilesIndexSize();<a name="line.412"></a>
+<span class="sourceLineNo">413</span><a name="line.413"></a>
+<span class="sourceLineNo">414</span>  /**<a name="line.414"></a>
+<span class="sourceLineNo">415</span>   * Returns the total size of all index blocks in the data block indexes, including the root level,<a name="line.415"></a>
+<span class="sourceLineNo">416</span>   * intermediate levels, and the leaf level for multi-level indexes, or just the root level for<a name="line.416"></a>
+<span class="sourceLineNo">417</span>   * single-level indexes.<a name="line.417"></a>
+<span class="sourceLineNo">418</span>   * @return the total size of block indexes in the store<a name="line.418"></a>
+<span class="sourceLineNo">419</span>   */<a name="line.419"></a>
+<span class="sourceLineNo">420</span>  long getTotalStaticIndexSize();<a name="line.420"></a>
+<span class="sourceLineNo">421</span><a name="line.421"></a>
+<span class="sourceLineNo">422</span>  /**<a name="line.422"></a>
+<span class="sourceLineNo">423</span>   * Returns the total byte size of all Bloom filter bit arrays. For compound Bloom filters even the<a name="line.423"></a>
+<span class="sourceLineNo">424</span>   * Bloom blocks currently not loaded into the block cache are counted.<a name="line.424"></a>
+<span class="sourceLineNo">425</span>   * @return the total size of all Bloom filters in the store<a name="line.425"></a>
+<span class="sourceLineNo">426</span>   */<a name="line.426"></a>
+<span class="sourceLineNo">427</span>  long getTotalStaticBloomSize();<a name="line.427"></a>
+<span class="sourceLineNo">428</span><a name="line.428"></a>
+<span class="sourceLineNo">429</span>  // Test-helper methods<a name="line.429"></a>
+<span class="sourceLineNo">430</span><a name="line.430"></a>
+<span class="sourceLineNo">431</span>  /**<a name="line.431"></a>
+<span class="sourceLineNo">432</span>   * Used for tests.<a name="line.432"></a>
+<span class="sourceLineNo">433</span>   * @return cache configuration for this Store.<a name="line.433"></a>
 <span class="sourceLineNo">434</span>   */<a name="line.434"></a>
-<span class="sourceLineNo">435</span>  HRegionInfo getRegionInfo();<a name="line.435"></a>
+<span class="sourceLineNo">435</span>  CacheConfig getCacheConfig();<a name="line.435"></a>
 <span class="sourceLineNo">436</span><a name="line.436"></a>
-<span class="sourceLineNo">437</span>  RegionCoprocessorHost getCoprocessorHost();<a name="line.437"></a>
-<span class="sourceLineNo">438</span><a name="line.438"></a>
-<span class="sourceLineNo">439</span>  boolean areWritesEnabled();<a name="line.439"></a>
-<span class="sourceLineNo">440</span><a name="line.440"></a>
-<span class="sourceLineNo">441</span>  /**<a name="line.441"></a>
-<span class="sourceLineNo">442</span>   * @return The smallest mvcc readPoint across all the scanners in this<a name="line.442"></a>
-<span class="sourceLineNo">443</span>   * region. Writes older than this readPoint, are included  in every<a name="line.443"></a>
-<span class="sourceLineNo">444</span>   * read operation.<a name="line.444"></a>
-<span class="sourceLineNo">445</span>   */<a name="line.445"></a>
-<span class="sourceLineNo">446</span>  long getSmallestReadPoint();<a name="line.446"></a>
-<span class="sourceLineNo">447</span><a name="line.447"></a>
-<span class="sourceLineNo">448</span>  String getColumnFamilyName();<a name="line.448"></a>
-<span class="sourceLineNo">449</span><a name="line.449"></a>
-<span class="sourceLineNo">450</span>  TableName getTableName();<a name="line.450"></a>
-<span class="sourceLineNo">451</span><a name="line.451"></a>
-<span class="sourceLineNo">452</span>  /**<a name="line.452"></a>
-<span class="sourceLineNo">453</span>   * @return The number of cells flushed to disk<a name="line.453"></a>
-<span class="sourceLineNo">454</span>   */<a name="line.454"></a>
-<span class="sourceLineNo">455</span>  long getFlushedCellsCount();<a name="line.455"></a>
+<span class="sourceLineNo">437</span>  /**<a name="line.437"></a>
+<span class="sourceLineNo">438</span>   * @return the parent region info hosting this store<a name="line.438"></a>
+<span class="sourceLineNo">439</span>   */<a name="line.439"></a>
+<span class="sourceLineNo">440</span>  HRegionInfo getRegionInfo();<a name="line.440"></a>
+<span class="sourceLineNo">441</span><a name="line.441"></a>
+<span class="sourceLineNo">442</span>  RegionCoprocessorHost getCoprocessorHost();<a name="line.442"></a>
+<span class="sourceLineNo">443</span><a name="line.443"></a>
+<span class="sourceLineNo">444</span>  boolean areWritesEnabled();<a name="line.444"></a>
+<span class="sourceLineNo">445</span><a name="line.445"></a>
+<span class="sourceLineNo">446</span>  /**<a name="line.446"></a>
+<span class="sourceLineNo">447</span>   * @return The smallest mvcc readPoint across all the scanners in this<a name="line.447"></a>
+<span class="sourceLineNo">448</span>   * region. Writes older than this readPoint, are included  in every<a name="line.448"></a>
+<span class="sourceLineNo">449</span>   * read operation.<a name="line.449"></a>
+<span class="sourceLineNo">450</span>   */<a name="line.450"></a>
+<span class="sourceLineNo">451</span>  long getSmallestReadPoint();<a name="line.451"></a>
+<span class="sourceLineNo">452</span><a name="line.452"></a>
+<span class="sourceLineNo">453</span>  String getColumnFamilyName();<a name="line.453"></a>
+<span class="sourceLineNo">454</span><a name="line.454"></a>
+<span class="sourceLineNo">455</span>  TableName getTableName();<a name="line.455"></a>
 <span class="sourceLineNo">456</span><a name="line.456"></a>
 <span class="sourceLineNo">457</span>  /**<a name="line.457"></a>
-<span class="sourceLineNo">458</span>   * @return The total size of data flushed to disk, in bytes<a name="line.458"></a>
+<span class="sourceLineNo">458</span>   * @return The number of cells flushed to disk<a name="line.458"></a>
 <span class="sourceLineNo">459</span>   */<a name="line.459"></a>
-<span class="sourceLineNo">460</span>  long getFlushedCellsSize();<a name="line.460"></a>
+<span class="sourceLineNo">460</span>  long getFlushedCellsCount();<a name="line.460"></a>
 <span class="sourceLineNo">461</span><a name="line.461"></a>
 <span class="sourceLineNo">462</span>  /**<a name="line.462"></a>
-<span class="sourceLineNo">463</span>   * @return The total size of out output files on disk, in bytes<a name="line.463"></a>
+<span class="sourceLineNo">463</span>   * @return The total size of data flushed to disk, in bytes<a name="line.463"></a>
 <span class="sourceLineNo">464</span>   */<a name="line.464"></a>
-<span class="sourceLineNo">465</span>  long getFlushedOutputFileSize();<a name="line.465"></a>
+<span class="sourceLineNo">465</span>  long getFlushedCellsSize();<a name="line.465"></a>
 <span class="sourceLineNo">466</span><a name="line.466"></a>
 <span class="sourceLineNo">467</span>  /**<a name="line.467"></a>
-<span class="sourceLineNo">468</span>   * @return The number of cells processed during minor compactions<a name="line.468"></a>
+<span class="sourceLineNo">468</span>   * @return The total size of out output files on disk, in bytes<a name="line.468"></a>
 <span class="sourceLineNo">469</span>   */<a name="line.469"></a>
-<span class="sourceLineNo">470</span>  long getCompactedCellsCount();<a name="line.470"></a>
+<span class="sourceLineNo">470</span>  long getFlushedOutputFileSize();<a name="line.470"></a>
 <span class="sourceLineNo">471</span><a name="line.471"></a>
 <span class="sourceLineNo">472</span>  /**<a name="line.472"></a>
-<span class="sourceLineNo">473</span>   * @return The total amount of data processed during minor compactions, in bytes<a name="line.473"></a>
+<span class="sourceLineNo">473</span>   * @return The number of cells processed during minor compactions<a name="line.473"></a>
 <span class="sourceLineNo">474</span>   */<a name="line.474"></a>
-<span class="sourceLineNo">475</span>  long getCompactedCellsSize();<a name="line.475"></a>
+<span class="sourceLineNo">475</span>  long getCompactedCellsCount();<a name="line.475"></a>
 <span class="sourceLineNo">476</span><a name="line.476"></a>
 <span class="sourceLineNo">477</span>  /**<a name="line.477"></a>
-<span class="sourceLineNo">478</span>   * @return The number of cells processed during major compactions<a name="line.478"></a>
+<span class="sourceLineNo">478</span>   * @return The total amount of data processed during minor compactions, in bytes<a name="line.478"></a>
 <span class="sourceLineNo">479</span>   */<a name="line.479"></a>
-<span class="sourceLineNo">480</span>  long getMajorCompactedCellsCount();<a name="line.480"></a>
+<span class="sourceLineNo">480</span>  long getCompactedCellsSize();<a name="line.480"></a>
 <span class="sourceLineNo">481</span><a name="line.481"></a>
 <span class="sourceLineNo">482</span>  /**<a name="line.482"></a>
-<span class="sourceLineNo">483</span>   * @return The total amount of data processed during major compactions, in bytes<a name="line.483"></a>
+<span class="sourceLineNo">483</span>   * @return The number of cells processed during major compactions<a name="line.483"></a>
 <span class="sourceLineNo">484</span>   */<a name="line.484"></a>
-<span class="sourceLineNo">485</span>  long getMajorCompactedCellsSize();<a name="line.485"></a>
+<span class="sourceLineNo">485</span>  long getMajorCompactedCellsCount();<a name="line.485"></a>
 <span class="sourceLineNo">486</span><a name="line.486"></a>
-<span class="sourceLineNo">487</span>  /*<a name="line.487"></a>
-<span class="sourceLineNo">488</span>   * @param o Observer who wants to know about changes in set of Readers<a name="line.488"></a>
+<span class="sourceLineNo">487</span>  /**<a name="line.487"></a>
+<span class="sourceLineNo">488</span>   * @return The total amount of data processed during major compactions, in bytes<a name="line.488"></a>
 <span class="sourceLineNo">489</span>   */<a name="line.489"></a>
-<span class="sourceLineNo">490</span>  void addChangedReaderObserver(ChangedReadersObserver o);<a name="line.490"></a>
+<span class="sourceLineNo">490</span>  long getMajorCompactedCellsSize();<a name="line.490"></a>
 <span class="sourceLineNo">491</span><a name="line.491"></a>
 <span class="sourceLineNo">492</span>  /*<a name="line.492"></a>
-<span class="sourceLineNo">493</span>   * @param o Observer no longer interested in changes in set of Readers.<a name="line.493"></a>
+<span class="sourceLineNo">493</span>   * @param o Observer who wants to know about changes in set of Readers<a name="line.493"></a>
 <span class="sourceLineNo">494</span>   */<a name="line.494"></a>
-<span class="sourceLineNo">495</span>  void deleteChangedReaderObserver(ChangedReadersObserver o);<a name="line.495"></a>
+<span class="sourceLineNo">495</span>  void addChangedReaderObserver(ChangedReadersObserver o);<a name="line.495"></a>
 <span class="sourceLineNo">496</span><a name="line.496"></a>
-<span class="sourceLineNo">497</span>  /**<a name="line.497"></a>
-<span class="sourceLineNo">498</span>   * @return Whether this store has too many store files.<a name="line.498"></a>
+<span class="sourceLineNo">497</span>  /*<a name="line.497"></a>
+<span class="sourceLineNo">498</span>   * @param o Observer no longer interested in changes in set of Readers.<a name="line.498"></a>
 <span class="sourceLineNo">499</span>   */<a name="line.499"></a>
-<span class="sourceLineNo">500</span>  boolean hasTooManyStoreFiles();<a name="line.500"></a>
+<span class="sourceLineNo">500</span>  void deleteChangedReaderObserver(ChangedReadersObserver o);<a name="line.500"></a>
 <span class="sourceLineNo">501</span><a name="line.501"></a>
 <span class="sourceLineNo">502</span>  /**<a name="line.502"></a>
-<span class="sourceLineNo">503</span>   * Checks the underlying store files, and opens the files that  have not<a name="line.503"></a>
-<span class="sourceLineNo">504</span>   * been opened, and removes the store file readers for store files no longer<a name="line.504"></a>
-<span class="sourceLineNo">505</span>   * available. Mainly used by secondary region replicas to keep up to date with<a name="line.505"></a>
-<span class="sourceLineNo">506</span>   * the primary region files.<a name="line.506"></a>
-<span class="sourceLineNo">507</span>   * @throws IOException<a name="line.507"></a>
-<span class="sourceLineNo">508</span>   */<a name="line.508"></a>
-<span class="sourceLineNo">509</span>  void refreshStoreFiles() throws IOException;<a name="line.509"></a>
-<span class="sourceLineNo">510</span><a name="line.510"></a>
-<span class="sourceLineNo">511</span>  /**<a name="line.511"></a>
-<span class="sourceLineNo">512</span>   * This value can represent the degree of emergency of compaction for this store. It should be<a name="line.512"></a>
-<span class="sourceLineNo">513</span>   * greater than or equal to 0.0, any value greater than 1.0 means we have too many store files.<a name="line.513"></a>
-<span class="sourceLineNo">514</span>   * &lt;ul&gt;<a name="line.514"></a>
-<span class="sourceLineNo">515</span>   * &lt;li&gt;if getStorefilesCount &amp;lt;= getMinFilesToCompact, return 0.0&lt;/li&gt;<a name="line.515"></a>
-<span class="sourceLineNo">516</span>   * &lt;li&gt;return (getStorefilesCount - getMinFilesToCompact) / (blockingFileCount -<a name="line.516"></a>
-<span class="sourceLineNo">517</span>   * getMinFilesToCompact)&lt;/li&gt;<a name="line.517"></a>
-<span class="sourceLineNo">518</span>   * &lt;/ul&gt;<a name="line.518"></a>
-<span class="sourceLineNo">519</span>   * &lt;p&gt;<a name="line.519"></a>
-<span class="sourceLineNo">520</span>   * And for striped stores, we should calculate this value by the files in each stripe separately<a name="line.520"></a>
-<span class="sourceLineNo">521</span>   * and return the maximum value.<a name="line.521"></a>
-<span class="sourceLineNo">522</span>   * &lt;p&gt;<a name="line.522"></a>
-<span class="sourceLineNo">523</span>   * It is similar to {@link #getCompactPriority()} except that it is more suitable to use in a<a name="line.523"></a>
-<span class="sourceLineNo">524</span>   * linear formula.<a name="line.524"></a>
-<span class="sourceLineNo">525</span>   */<a name="line.525"></a>
-<span class="sourceLineNo">526</span>  double getCompactionPressure();<a name="line.526"></a>
-<span class="sourceLineNo">527</span><a name="line.527"></a>
-<span class="sourceLineNo">528</span>   /**<a name="line.528"></a>
-<span class="sourceLineNo">529</span>    * Replaces the store files that the store has with the given files. Mainly used by<a name="line.529"></a>
-<span class="sourceLineNo">530</span>    * secondary region replicas to keep up to date with<a name="line.530"></a>
-<span class="sourceLineNo">531</span>    * the primary region files.<a name="line.531"></a>
-<span class="sourceLineNo">532</span>    * @throws IOException<a name="line.532"></a>
-<span class="sourceLineNo">533</span>    */<a name="line.533"></a>
-<span class="sourceLineNo">534</span>  void refreshStoreFiles(Collection&lt;String&gt; newFiles) throws IOException;<a name="line.534"></a>
-<span class="sourceLineNo">535</span><a name="line.535"></a>
-<span class="sourceLineNo">536</span>  boolean isPrimaryReplicaStore();<a name="line.536"></a>
-<span class="sourceLineNo">537</span><a name="line.537"></a>
-<span class="sourceLineNo">538</span>  /**<a name="line.538"></a>
-<span class="sourceLineNo">539</span>   * Closes and archives the compacted files under this store<a name="line.539"></a>
-<span class="sourceLineNo">540</span>   */<a name="line.540"></a>
-<span class="sourceLineNo">541</span>  void closeAndArchiveCompactedFiles() throws IOException;<a name="line.541"></a>
+<span class="sourceLineNo">503</span>   * @return Whether this store has too many store files.<a name="line.503"></a>
+<span class="sourceLineNo">504</span>   */<a name="line.504"></a>
+<span class="sourceLineNo">505</span>  boolean hasTooManyStoreFiles();<a name="line.505"></a>
+<span class="sourceLineNo">506</span><a name="line.506"></a>
+<span class="sourceLineNo">507</span>  /**<a name="line.507"></a>
+<span class="sourceLineNo">508</span>   * Checks the underlying store files, and opens the files that  have not<a name="line.508"></a>
+<span class="sourceLineNo">509</span>   * been opened, and removes the store file readers for store files no longer<a name="line.509"></a>
+<span class="sourceLineNo">510</span>   * available. Mainly used by secondary region replicas to keep up to date with<a name="line.510"></a>
+<span class="sourceLineNo">511</span>   * the primary region files.<a name="line.511"></a>
+<span class="sourceLineNo">512</span>   * @throws IOException<a name="line.512"></a>
+<span class="sourceLineNo">513</span>   */<a name="line.513"></a>
+<span class="sourceLineNo">514</span>  void refreshStoreFiles() throws IOException;<a name="line.514"></a>
+<span class="sourceLineNo">515</span><a name="line.515"></a>
+<span class="sourceLineNo">516</span>  /**<a name="line.516"></a>
+<span class="sourceLineNo">517</span>   * This value can represent the degree of emergency of compaction for this store. It should be<a name="line.517"></a>
+<span class="sourceLineNo">518</span>   * greater than or equal to 0.0, any value greater than 1.0 means we have too many store files.<a name="line.518"></a>
+<span class="sourceLineNo">519</span>   * &lt;ul&gt;<a name="line.519"></a>
+<span class="sourceLineNo">520</span>   * &lt;li&gt;if getStorefilesCount &amp;lt;= getMinFilesToCompact, return 0.0&lt;/li&gt;<a name="line.520"></a>
+<span class="sourceLineNo">521</span>   * &lt;li&gt;return (getStorefilesCount - getMinFilesToCompact) / (blockingFileCount -<a name="line.521"></a>
+<span class="sourceLineNo">522</span>   * getMinFilesToCompact)&lt;/li&gt;<a name="line.522"></a>
+<span class="sourceLineNo">523</span>   * &lt;/ul&gt;<a name="line.523"></a>
+<span class="sourceLineNo">524</span>   * &lt;p&gt;<a name="line.524"></a>
+<span class="sourceLineNo">525</span>   * And for striped stores, we should calculate this value by the files in each stripe separately<a name="line.525"></a>
+<span class="sourceLineNo">526</span>   * and return the maximum value.<a name="line.526"></a>
+<span class="sourceLineNo">527</span>   * &lt;p&gt;<a name="line.527"></a>
+<span class="sourceLineNo">528</span>   * It is similar to {@link #getCompactPriority()} except that it is more suitable to use in a<a name="line.528"></a>
+<span class="sourceLineNo">529</span>   * linear formula.<a name="line.529"></a>
+<span class="sourceLineNo">530</span>   */<a name="line.530"></a>
+<span class="sourceLineNo">531</span>  double getCompactionPressure();<a name="line.531"></a>
+<span class="sourceLineNo">532</span><a name="line.532"></a>
+<span class="sourceLineNo">533</span>   /**<a name="line.533"></a>
+<span class="sourceLineNo">534</span>    * Replaces the store files that the store has with the given files. Mainly used by<a name="line.534"></a>
+<span class="sourceLineNo">535</span>    * secondary region replicas to keep up to date with<a name="line.535"></a>
+<span class="sourceLineNo">536</span>    * the primary region files.<a name="line.536"></a>
+<span class="sourceLineNo">537</span>    * @throws IOException<a name="line.537"></a>
+<span class="sourceLineNo">538</span>    */<a name="line.538"></a>
+<span class="sourceLineNo">539</span>  void refreshStoreFiles(Collection&lt;String&gt; newFiles) throws IOException;<a name="line.539"></a>
+<span class="sourceLineNo">540</span><a name="line.540"></a>
+<span class="sourceLineNo">541</span>  boolean isPrimaryReplicaStore();<a name="line.541"></a>
 <span class="sourceLineNo">542</span><a name="line.542"></a>
 <span class="sourceLineNo">543</span>  /**<a name="line.543"></a>
-<span class="sourceLineNo">544</span>   * @return true if the memstore may need some extra memory space<a name="line.544"></a>
+<span class="sourceLineNo">544</span>   * Closes and archives the compacted files under this store<a name="line.544"></a>
 <span class="sourceLineNo">545</span>   */<a name="line.545"></a>
-<span class="sourceLineNo">546</span>  boolean isSloppyMemstore();<a name="line.546"></a>
-<span class="sourceLineNo">547</span>}<a name="line.547"></a>
+<span class="sourceLineNo">546</span>  void closeAndArchiveCompactedFiles() throws IOException;<a name="line.546"></a>
+<span class="sourceLineNo">547</span><a name="line.547"></a>
+<span class="sourceLineNo">548</span>  /**<a name="line.548"></a>
+<span class="sourceLineNo">549</span>   * @return true if the memstore may need some extra memory space<a name="line.549"></a>
+<span class="sourceLineNo">550</span>   */<a name="line.550"></a>
+<span class="sourceLineNo">551</span>  boolean isSloppyMemstore();<a name="line.551"></a>
+<span class="sourceLineNo">552</span>}<a name="line.552"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/476c54ed/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/MetricsSource.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/MetricsSource.html b/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/MetricsSource.html
index 8cf0549..3d87ef1 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/MetricsSource.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/MetricsSource.html
@@ -48,152 +48,152 @@
 <span class="sourceLineNo">040</span><a name="line.40"></a>
 <span class="sourceLineNo">041</span>  // tracks last shipped timestamp for each wal group<a name="line.41"></a>
 <span class="sourceLineNo">042</span>  private Map&lt;String, Long&gt; lastTimeStamps = new HashMap&lt;&gt;();<a name="line.42"></a>
-<span class="sourceLineNo">043</span>  private int lastQueueSize = 0;<a name="line.43"></a>
-<span class="sourceLineNo">044</span>  private long lastHFileRefsQueueSize = 0;<a name="line.44"></a>
-<span class="sourceLineNo">045</span>  private String id;<a name="line.45"></a>
-<span class="sourceLineNo">046</span><a name="line.46"></a>
-<span class="sourceLineNo">047</span>  private final MetricsReplicationSourceSource singleSourceSource;<a name="line.47"></a>
-<span class="sourceLineNo">048</span>  private final MetricsReplicationSourceSource globalSourceSource;<a name="line.48"></a>
+<span class="sourceLineNo">043</span>  private long lastHFileRefsQueueSize = 0;<a name="line.43"></a>
+<span class="sourceLineNo">044</span>  private String id;<a name="line.44"></a>
+<span class="sourceLineNo">045</span><a name="line.45"></a>
+<span class="sourceLineNo">046</span>  private final MetricsReplicationSourceSource singleSourceSource;<a name="line.46"></a>
+<span class="sourceLineNo">047</span>  private final MetricsReplicationSourceSource globalSourceSource;<a name="line.47"></a>
+<span class="sourceLineNo">048</span><a name="line.48"></a>
 <span class="sourceLineNo">049</span><a name="line.49"></a>
-<span class="sourceLineNo">050</span><a name="line.50"></a>
-<span class="sourceLineNo">051</span>  /**<a name="line.51"></a>
-<span class="sourceLineNo">052</span>   * Constructor used to register the metrics<a name="line.52"></a>
-<span class="sourceLineNo">053</span>   *<a name="line.53"></a>
-<span class="sourceLineNo">054</span>   * @param id Name of the source this class is monitoring<a name="line.54"></a>
-<span class="sourceLineNo">055</span>   */<a name="line.55"></a>
-<span class="sourceLineNo">056</span>  public MetricsSource(String id) {<a name="line.56"></a>
-<span class="sourceLineNo">057</span>    this.id = id;<a name="line.57"></a>
-<span class="sourceLineNo">058</span>    singleSourceSource =<a name="line.58"></a>
-<span class="sourceLineNo">059</span>        CompatibilitySingletonFactory.getInstance(MetricsReplicationSourceFactory.class)<a name="line.59"></a>
-<span class="sourceLineNo">060</span>            .getSource(id);<a name="line.60"></a>
-<span class="sourceLineNo">061</span>    globalSourceSource = CompatibilitySingletonFactory.getInstance(MetricsReplicationSourceFactory.class).getGlobalSource();<a name="line.61"></a>
-<span class="sourceLineNo">062</span>  }<a name="line.62"></a>
-<span class="sourceLineNo">063</span><a name="line.63"></a>
-<span class="sourceLineNo">064</span>  /**<a name="line.64"></a>
-<span class="sourceLineNo">065</span>   * Constructor for injecting custom (or test) MetricsReplicationSourceSources<a name="line.65"></a>
-<span class="sourceLineNo">066</span>   * @param id Name of the source this class is monitoring<a name="line.66"></a>
-<span class="sourceLineNo">067</span>   * @param singleSourceSource Class to monitor id-scoped metrics<a name="line.67"></a>
-<span class="sourceLineNo">068</span>   * @param globalSourceSource Class to monitor global-scoped metrics<a name="line.68"></a>
-<span class="sourceLineNo">069</span>   */<a name="line.69"></a>
-<span class="sourceLineNo">070</span>  public MetricsSource(String id, MetricsReplicationSourceSource singleSourceSource,<a name="line.70"></a>
-<span class="sourceLineNo">071</span>                       MetricsReplicationSourceSource globalSourceSource) {<a name="line.71"></a>
-<span class="sourceLineNo">072</span>    this.id = id;<a name="line.72"></a>
-<span class="sourceLineNo">073</span>    this.singleSourceSource = singleSourceSource;<a name="line.73"></a>
-<span class="sourceLineNo">074</span>    this.globalSourceSource = globalSourceSource;<a name="line.74"></a>
-<span class="sourceLineNo">075</span>  }<a name="line.75"></a>
-<span class="sourceLineNo">076</span><a name="line.76"></a>
-<span class="sourceLineNo">077</span>  /**<a name="line.77"></a>
-<span class="sourceLineNo">078</span>   * Set the age of the last edit that was shipped<a name="line.78"></a>
-<span class="sourceLineNo">079</span>   * @param timestamp write time of the edit<a name="line.79"></a>
-<span class="sourceLineNo">080</span>   * @param walGroup which group we are setting<a name="line.80"></a>
-<span class="sourceLineNo">081</span>   */<a name="line.81"></a>
-<span class="sourceLineNo">082</span>  public void setAgeOfLastShippedOp(long timestamp, String walGroup) {<a name="line.82"></a>
-<span class="sourceLineNo">083</span>    long age = EnvironmentEdgeManager.currentTime() - timestamp;<a name="line.83"></a>
-<span class="sourceLineNo">084</span>    singleSourceSource.setLastShippedAge(age);<a name="line.84"></a>
-<span class="sourceLineNo">085</span>    globalSourceSource.setLastShippedAge(age);<a name="line.85"></a>
-<span class="sourceLineNo">086</span>    this.lastTimeStamps.put(walGroup, timestamp);<a name="line.86"></a>
-<span class="sourceLineNo">087</span>  }<a name="line.87"></a>
-<span class="sourceLineNo">088</span><a name="line.88"></a>
-<span class="sourceLineNo">089</span>  /**<a name="line.89"></a>
-<span class="sourceLineNo">090</span>   * Convenience method to use the last given timestamp to refresh the age of the last edit. Used<a name="line.90"></a>
-<span class="sourceLineNo">091</span>   * when replication fails and need to keep that metric accurate.<a name="line.91"></a>
-<span class="sourceLineNo">092</span>   * @param walGroupId id of the group to update<a name="line.92"></a>
-<span class="sourceLineNo">093</span>   */<a name="line.93"></a>
-<span class="sourceLineNo">094</span>  public void refreshAgeOfLastShippedOp(String walGroupId) {<a name="line.94"></a>
-<span class="sourceLineNo">095</span>    Long lastTimestamp = this.lastTimeStamps.get(walGroupId);<a name="line.95"></a>
-<span class="sourceLineNo">096</span>    if (lastTimestamp == null) {<a name="line.96"></a>
-<span class="sourceLineNo">097</span>      this.lastTimeStamps.put(walGroupId, 0L);<a name="line.97"></a>
-<span class="sourceLineNo">098</span>      lastTimestamp = 0L;<a name="line.98"></a>
-<span class="sourceLineNo">099</span>    }<a name="line.99"></a>
-<span class="sourceLineNo">100</span>    if (lastTimestamp &gt; 0) {<a name="line.100"></a>
-<span class="sourceLineNo">101</span>      setAgeOfLastShippedOp(lastTimestamp, walGroupId);<a name="line.101"></a>
-<span class="sourceLineNo">102</span>    }<a name="line.102"></a>
-<span class="sourceLineNo">103</span>  }<a name="line.103"></a>
-<span class="sourceLineNo">104</span><a name="line.104"></a>
-<span class="sourceLineNo">105</span>  /**<a name="line.105"></a>
-<span class="sourceLineNo">106</span>   * Increment size of the log queue.<a name="line.106"></a>
-<span class="sourceLineNo">107</span>   */<a name="line.107"></a>
-<span class="sourceLineNo">108</span>  public void incrSizeOfLogQueue() {<a name="line.108"></a>
-<span class="sourceLineNo">109</span>    singleSourceSource.incrSizeOfLogQueue(1);<a name="line.109"></a>
-<span class="sourceLineNo">110</span>    globalSourceSource.incrSizeOfLogQueue(1);<a name="line.110"></a>
-<span class="sourceLineNo">111</span>  }<a name="line.111"></a>
-<span class="sourceLineNo">112</span><a name="line.112"></a>
-<span class="sourceLineNo">113</span>  public void decrSizeOfLogQueue() {<a name="line.113"></a>
-<span class="sourceLineNo">114</span>    singleSourceSource.decrSizeOfLogQueue(1);<a name="line.114"></a>
-<span class="sourceLineNo">115</span>    globalSourceSource.decrSizeOfLogQueue(1);<a name="line.115"></a>
-<span class="sourceLineNo">116</span>  }<a name="line.116"></a>
-<span class="sourceLineNo">117</span><a name="line.117"></a>
-<span class="sourceLineNo">118</span>  /**<a name="line.118"></a>
-<span class="sourceLineNo">119</span>   * Add on the the number of log edits read<a name="line.119"></a>
-<span class="sourceLineNo">120</span>   *<a name="line.120"></a>
-<span class="sourceLineNo">121</span>   * @param delta the number of log edits read.<a name="line.121"></a>
-<span class="sourceLineNo">122</span>   */<a name="line.122"></a>
-<span class="sourceLineNo">123</span>  private void incrLogEditsRead(long delta) {<a name="line.123"></a>
-<span class="sourceLineNo">124</span>    singleSourceSource.incrLogReadInEdits(delta);<a name="line.124"></a>
-<span class="sourceLineNo">125</span>    globalSourceSource.incrLogReadInEdits(delta);<a name="line.125"></a>
-<span class="sourceLineNo">126</span>  }<a name="line.126"></a>
-<span class="sourceLineNo">127</span><a name="line.127"></a>
-<span class="sourceLineNo">128</span>  /** Increment the number of log edits read by one. */<a name="line.128"></a>
-<span class="sourceLineNo">129</span>  public void incrLogEditsRead() {<a name="line.129"></a>
-<span class="sourceLineNo">130</span>    incrLogEditsRead(1);<a name="line.130"></a>
-<span class="sourceLineNo">131</span>  }<a name="line.131"></a>
-<span class="sourceLineNo">132</span><a name="line.132"></a>
-<span class="sourceLineNo">133</span>  /**<a name="line.133"></a>
-<span class="sourceLineNo">134</span>   * Add on the number of log edits filtered<a name="line.134"></a>
-<span class="sourceLineNo">135</span>   *<a name="line.135"></a>
-<span class="sourceLineNo">136</span>   * @param delta the number filtered.<a name="line.136"></a>
-<span class="sourceLineNo">137</span>   */<a name="line.137"></a>
-<span class="sourceLineNo">138</span>  public void incrLogEditsFiltered(long delta) {<a name="line.138"></a>
-<span class="sourceLineNo">139</span>    singleSourceSource.incrLogEditsFiltered(delta);<a name="line.139"></a>
-<span class="sourceLineNo">140</span>    globalSourceSource.incrLogEditsFiltered(delta);<a name="line.140"></a>
-<span class="sourceLineNo">141</span>  }<a name="line.141"></a>
-<span class="sourceLineNo">142</span><a name="line.142"></a>
-<span class="sourceLineNo">143</span>  /** The number of log edits filtered out. */<a name="line.143"></a>
-<span class="sourceLineNo">144</span>  public void incrLogEditsFiltered() {<a name="line.144"></a>
-<span class="sourceLineNo">145</span>    incrLogEditsFiltered(1);<a name="line.145"></a>
-<span class="sourceLineNo">146</span>  }<a name="line.146"></a>
-<span class="sourceLineNo">147</span><a name="line.147"></a>
-<span class="sourceLineNo">148</span>  /**<a name="line.148"></a>
-<span class="sourceLineNo">149</span>   * Convience method to apply changes to metrics do to shipping a batch of logs.<a name="line.149"></a>
-<span class="sourceLineNo">150</span>   *<a name="line.150"></a>
-<span class="sourceLineNo">151</span>   * @param batchSize the size of the batch that was shipped to sinks.<a name="line.151"></a>
-<span class="sourceLineNo">152</span>   */<a name="line.152"></a>
-<span class="sourceLineNo">153</span>  public void shipBatch(long batchSize, int sizeInBytes) {<a name="line.153"></a>
-<span class="sourceLineNo">154</span>    singleSourceSource.incrBatchesShipped(1);<a name="line.154"></a>
-<span class="sourceLineNo">155</span>    globalSourceSource.incrBatchesShipped(1);<a name="line.155"></a>
-<span class="sourceLineNo">156</span><a name="line.156"></a>
-<span class="sourceLineNo">157</span>    singleSourceSource.incrOpsShipped(batchSize);<a name="line.157"></a>
-<span class="sourceLineNo">158</span>    globalSourceSource.incrOpsShipped(batchSize);<a name="line.158"></a>
-<span class="sourceLineNo">159</span><a name="line.159"></a>
-<span class="sourceLineNo">160</span>    singleSourceSource.incrShippedBytes(sizeInBytes);<a name="line.160"></a>
-<span class="sourceLineNo">161</span>    globalSourceSource.incrShippedBytes(sizeInBytes);<a name="line.161"></a>
-<span class="sourceLineNo">162</span>  }<a name="line.162"></a>
-<span class="sourceLineNo">163</span><a name="line.163"></a>
-<span class="sourceLineNo">164</span>  /**<a name="line.164"></a>
-<span class="sourceLineNo">165</span>   * Convience method to apply changes to metrics do to shipping a batch of logs.<a name="line.165"></a>
-<span class="sourceLineNo">166</span>   *<a name="line.166"></a>
-<span class="sourceLineNo">167</span>   * @param batchSize the size of the batch that was shipped to sinks.<a name="line.167"></a>
-<span class="sourceLineNo">168</span>   * @param hfiles total number of hfiles shipped to sinks.<a name="line.168"></a>
-<span class="sourceLineNo">169</span>   */<a name="line.169"></a>
-<span class="sourceLineNo">170</span>  public void shipBatch(long batchSize, int sizeInBytes, long hfiles) {<a name="line.170"></a>
-<span class="sourceLineNo">171</span>    shipBatch(batchSize, sizeInBytes);<a name="line.171"></a>
-<span class="sourceLineNo">172</span>    singleSourceSource.incrHFilesShipped(hfiles);<a name="line.172"></a>
-<span class="sourceLineNo">173</span>    globalSourceSource.incrHFilesShipped(hfiles);<a name="line.173"></a>
-<span class="sourceLineNo">174</span>  }<a name="line.174"></a>
-<span class="sourceLineNo">175</span><a name="line.175"></a>
-<span class="sourceLineNo">176</span>  /** increase the byte number read by source from log file */<a name="line.176"></a>
-<span class="sourceLineNo">177</span>  public void incrLogReadInBytes(long readInBytes) {<a name="line.177"></a>
-<span class="sourceLineNo">178</span>    singleSourceSource.incrLogReadInBytes(readInBytes);<a name="line.178"></a>
-<span class="sourceLineNo">179</span>    globalSourceSource.incrLogReadInBytes(readInBytes);<a name="line.179"></a>
-<span class="sourceLineNo">180</span>  }<a name="line.180"></a>
-<span class="sourceLineNo">181</span><a name="line.181"></a>
-<span class="sourceLineNo">182</span>  /** Removes all metrics about this Source. */<a name="line.182"></a>
-<span class="sourceLineNo">183</span>  public void clear() {<a name="line.183"></a>
-<span class="sourceLineNo">184</span>    singleSourceSource.clear();<a name="line.184"></a>
-<span class="sourceLineNo">185</span>    globalSourceSource.decrSizeOfLogQueue(lastQueueSize);<a name="line.185"></a>
-<span class="sourceLineNo">186</span>    globalSourceSource.decrSizeOfHFileRefsQueue(lastHFileRefsQueueSize);<a name="line.186"></a>
-<span class="sourceLineNo">187</span>    lastTimeStamps.clear();<a name="line.187"></a>
-<span class="sourceLineNo">188</span>    lastQueueSize = 0;<a name="line.188"></a>
+<span class="sourceLineNo">050</span>  /**<a name="line.50"></a>
+<span class="sourceLineNo">051</span>   * Constructor used to register the metrics<a name="line.51"></a>
+<span class="sourceLineNo">052</span>   *<a name="line.52"></a>
+<span class="sourceLineNo">053</span>   * @param id Name of the source this class is monitoring<a name="line.53"></a>
+<span class="sourceLineNo">054</span>   */<a name="line.54"></a>
+<span class="sourceLineNo">055</span>  public MetricsSource(String id) {<a name="line.55"></a>
+<span class="sourceLineNo">056</span>    this.id = id;<a name="line.56"></a>
+<span class="sourceLineNo">057</span>    singleSourceSource =<a name="line.57"></a>
+<span class="sourceLineNo">058</span>        CompatibilitySingletonFactory.getInstance(MetricsReplicationSourceFactory.class)<a name="line.58"></a>
+<span class="sourceLineNo">059</span>            .getSource(id);<a name="line.59"></a>
+<span class="sourceLineNo">060</span>    globalSourceSource = CompatibilitySingletonFactory.getInstance(MetricsReplicationSourceFactory.class).getGlobalSource();<a name="line.60"></a>
+<span class="sourceLineNo">061</span>  }<a name="line.61"></a>
+<span class="sourceLineNo">062</span><a name="line.62"></a>
+<span class="sourceLineNo">063</span>  /**<a name="line.63"></a>
+<span class="sourceLineNo">064</span>   * Constructor for injecting custom (or test) MetricsReplicationSourceSources<a name="line.64"></a>
+<span class="sourceLineNo">065</span>   * @param id Name of the source this class is monitoring<a name="line.65"></a>
+<span class="sourceLineNo">066</span>   * @param singleSourceSource Class to monitor id-scoped metrics<a name="line.66"></a>
+<span class="sourceLineNo">067</span>   * @param globalSourceSource Class to monitor global-scoped metrics<a name="line.67"></a>
+<span class="sourceLineNo">068</span>   */<a name="line.68"></a>
+<span class="sourceLineNo">069</span>  public MetricsSource(String id, MetricsReplicationSourceSource singleSourceSource,<a name="line.69"></a>
+<span class="sourceLineNo">070</span>                       MetricsReplicationSourceSource globalSourceSource) {<a name="line.70"></a>
+<span class="sourceLineNo">071</span>    this.id = id;<a name="line.71"></a>
+<span class="sourceLineNo">072</span>    this.singleSourceSource = singleSourceSource;<a name="line.72"></a>
+<span class="sourceLineNo">073</span>    this.globalSourceSource = globalSourceSource;<a name="line.73"></a>
+<span class="sourceLineNo">074</span>  }<a name="line.74"></a>
+<span class="sourceLineNo">075</span><a name="line.75"></a>
+<span class="sourceLineNo">076</span>  /**<a name="line.76"></a>
+<span class="sourceLineNo">077</span>   * Set the age of the last edit that was shipped<a name="line.77"></a>
+<span class="sourceLineNo">078</span>   * @param timestamp write time of the edit<a name="line.78"></a>
+<span class="sourceLineNo">079</span>   * @param walGroup which group we are setting<a name="line.79"></a>
+<span class="sourceLineNo">080</span>   */<a name="line.80"></a>
+<span class="sourceLineNo">081</span>  public void setAgeOfLastShippedOp(long timestamp, String walGroup) {<a name="line.81"></a>
+<span class="sourceLineNo">082</span>    long age = EnvironmentEdgeManager.currentTime() - timestamp;<a name="line.82"></a>
+<span class="sourceLineNo">083</span>    singleSourceSource.setLastShippedAge(age);<a name="line.83"></a>
+<span class="sourceLineNo">084</span>    globalSourceSource.setLastShippedAge(age);<a name="line.84"></a>
+<span class="sourceLineNo">085</span>    this.lastTimeStamps.put(walGroup, timestamp);<a name="line.85"></a>
+<span class="sourceLineNo">086</span>  }<a name="line.86"></a>
+<span class="sourceLineNo">087</span><a name="line.87"></a>
+<span class="sourceLineNo">088</span>  /**<a name="line.88"></a>
+<span class="sourceLineNo">089</span>   * Convenience method to use the last given timestamp to refresh the age of the last edit. Used<a name="line.89"></a>
+<span class="sourceLineNo">090</span>   * when replication fails and need to keep that metric accurate.<a name="line.90"></a>
+<span class="sourceLineNo">091</span>   * @param walGroupId id of the group to update<a name="line.91"></a>
+<span class="sourceLineNo">092</span>   */<a name="line.92"></a>
+<span class="sourceLineNo">093</span>  public void refreshAgeOfLastShippedOp(String walGroupId) {<a name="line.93"></a>
+<span class="sourceLineNo">094</span>    Long lastTimestamp = this.lastTimeStamps.get(walGroupId);<a name="line.94"></a>
+<span class="sourceLineNo">095</span>    if (lastTimestamp == null) {<a name="line.95"></a>
+<span class="sourceLineNo">096</span>      this.lastTimeStamps.put(walGroupId, 0L);<a name="line.96"></a>
+<span class="sourceLineNo">097</span>      lastTimestamp = 0L;<a name="line.97"></a>
+<span class="sourceLineNo">098</span>    }<a name="line.98"></a>
+<span class="sourceLineNo">099</span>    if (lastTimestamp &gt; 0) {<a name="line.99"></a>
+<span class="sourceLineNo">100</span>      setAgeOfLastShippedOp(lastTimestamp, walGroupId);<a name="line.100"></a>
+<span class="sourceLineNo">101</span>    }<a name="line.101"></a>
+<span class="sourceLineNo">102</span>  }<a name="line.102"></a>
+<span class="sourceLineNo">103</span><a name="line.103"></a>
+<span class="sourceLineNo">104</span>  /**<a name="line.104"></a>
+<span class="sourceLineNo">105</span>   * Increment size of the log queue.<a name="line.105"></a>
+<span class="sourceLineNo">106</span>   */<a name="line.106"></a>
+<span class="sourceLineNo">107</span>  public void incrSizeOfLogQueue() {<a name="line.107"></a>
+<span class="sourceLineNo">108</span>    singleSourceSource.incrSizeOfLogQueue(1);<a name="line.108"></a>
+<span class="sourceLineNo">109</span>    globalSourceSource.incrSizeOfLogQueue(1);<a name="line.109"></a>
+<span class="sourceLineNo">110</span>  }<a name="line.110"></a>
+<span class="sourceLineNo">111</span><a name="line.111"></a>
+<span class="sourceLineNo">112</span>  public void decrSizeOfLogQueue() {<a name="line.112"></a>
+<span class="sourceLineNo">113</span>    singleSourceSource.decrSizeOfLogQueue(1);<a name="line.113"></a>
+<span class="sourceLineNo">114</span>    globalSourceSource.decrSizeOfLogQueue(1);<a name="line.114"></a>
+<span class="sourceLineNo">115</span>  }<a name="line.115"></a>
+<span class="sourceLineNo">116</span><a name="line.116"></a>
+<span class="sourceLineNo">117</span>  /**<a name="line.117"></a>
+<span class="sourceLineNo">118</span>   * Add on the the number of log edits read<a name="line.118"></a>
+<span class="sourceLineNo">119</span>   *<a name="line.119"></a>
+<span class="sourceLineNo">120</span>   * @param delta the number of log edits read.<a name="line.120"></a>
+<span class="sourceLineNo">121</span>   */<a name="line.121"></a>
+<span class="sourceLineNo">122</span>  private void incrLogEditsRead(long delta) {<a name="line.122"></a>
+<span class="sourceLineNo">123</span>    singleSourceSource.incrLogReadInEdits(delta);<a name="line.123"></a>
+<span class="sourceLineNo">124</span>    globalSourceSource.incrLogReadInEdits(delta);<a name="line.124"></a>
+<span class="sourceLineNo">125</span>  }<a name="line.125"></a>
+<span class="sourceLineNo">126</span><a name="line.126"></a>
+<span class="sourceLineNo">127</span>  /** Increment the number of log edits read by one. */<a name="line.127"></a>
+<span class="sourceLineNo">128</span>  public void incrLogEditsRead() {<a name="line.128"></a>
+<span class="sourceLineNo">129</span>    incrLogEditsRead(1);<a name="line.129"></a>
+<span class="sourceLineNo">130</span>  }<a name="line.130"></a>
+<span class="sourceLineNo">131</span><a name="line.131"></a>
+<span class="sourceLineNo">132</span>  /**<a name="line.132"></a>
+<span class="sourceLineNo">133</span>   * Add on the number of log edits filtered<a name="line.133"></a>
+<span class="sourceLineNo">134</span>   *<a name="line.134"></a>
+<span class="sourceLineNo">135</span>   * @param delta the number filtered.<a name="line.135"></a>
+<span class="sourceLineNo">136</span>   */<a name="line.136"></a>
+<span class="sourceLineNo">137</span>  public void incrLogEditsFiltered(long delta) {<a name="line.137"></a>
+<span class="sourceLineNo">138</span>    singleSourceSource.incrLogEditsFiltered(delta);<a name="line.138"></a>
+<span class="sourceLineNo">139</span>    globalSourceSource.incrLogEditsFiltered(delta);<a name="line.139"></a>
+<span class="sourceLineNo">140</span>  }<a name="line.140"></a>
+<span class="sourceLineNo">141</span><a name="line.141"></a>
+<span class="sourceLineNo">142</span>  /** The number of log edits filtered out. */<a name="line.142"></a>
+<span class="sourceLineNo">143</span>  public void incrLogEditsFiltered() {<a name="line.143"></a>
+<span class="sourceLineNo">144</span>    incrLogEditsFiltered(1);<a name="line.144"></a>
+<span class="sourceLineNo">145</span>  }<a name="line.145"></a>
+<span class="sourceLineNo">146</span><a name="line.146"></a>
+<span class="sourceLineNo">147</span>  /**<a name="line.147"></a>
+<span class="sourceLineNo">148</span>   * Convience method to apply changes to metrics do to shipping a batch of logs.<a name="line.148"></a>
+<span class="sourceLineNo">149</span>   *<a name="line.149"></a>
+<span class="sourceLineNo">150</span>   * @param batchSize the size of the batch that was shipped to sinks.<a name="line.150"></a>
+<span class="sourceLineNo">151</span>   */<a name="line.151"></a>
+<span class="sourceLineNo">152</span>  public void shipBatch(long batchSize, int sizeInBytes) {<a name="line.152"></a>
+<span class="sourceLineNo">153</span>    singleSourceSource.incrBatchesShipped(1);<a name="line.153"></a>
+<span class="sourceLineNo">154</span>    globalSourceSource.incrBatchesShipped(1);<a name="line.154"></a>
+<span class="sourceLineNo">155</span><a name="line.155"></a>
+<span class="sourceLineNo">156</span>    singleSourceSource.incrOpsShipped(batchSize);<a name="line.156"></a>
+<span class="sourceLineNo">157</span>    globalSourceSource.incrOpsShipped(batchSize);<a name="line.157"></a>
+<span class="sourceLineNo">158</span><a name="line.158"></a>
+<span class="sourceLineNo">159</span>    singleSourceSource.incrShippedBytes(sizeInBytes);<a name="line.159"></a>
+<span class="sourceLineNo">160</span>    globalSourceSource.incrShippedBytes(sizeInBytes);<a name="line.160"></a>
+<span class="sourceLineNo">161</span>  }<a name="line.161"></a>
+<span class="sourceLineNo">162</span><a name="line.162"></a>
+<span class="sourceLineNo">163</span>  /**<a name="line.163"></a>
+<span class="sourceLineNo">164</span>   * Convience method to apply changes to metrics do to shipping a batch of logs.<a name="line.164"></a>
+<span class="sourceLineNo">165</span>   *<a name="line.165"></a>
+<span class="sourceLineNo">166</span>   * @param batchSize the size of the batch that was shipped to sinks.<a name="line.166"></a>
+<span class="sourceLineNo">167</span>   * @param hfiles total number of hfiles shipped to sinks.<a name="line.167"></a>
+<span class="sourceLineNo">168</span>   */<a name="line.168"></a>
+<span class="sourceLineNo">169</span>  public void shipBatch(long batchSize, int sizeInBytes, long hfiles) {<a name="line.169"></a>
+<span class="sourceLineNo">170</span>    shipBatch(batchSize, sizeInBytes);<a name="line.170"></a>
+<span class="sourceLineNo">171</span>    singleSourceSource.incrHFilesShipped(hfiles);<a name="line.171"></a>
+<span class="sourceLineNo">172</span>    globalSourceSource.incrHFilesShipped(hfiles);<a name="line.172"></a>
+<span class="sourceLineNo">173</span>  }<a name="line.173"></a>
+<span class="sourceLineNo">174</span><a name="line.174"></a>
+<span class="sourceLineNo">175</span>  /** increase the byte number read by source from log file */<a name="line.175"></a>
+<span class="sourceLineNo">176</span>  public void incrLogReadInBytes(long readInBytes) {<a name="line.176"></a>
+<span class="sourceLineNo">177</span>    singleSourceSource.incrLogReadInBytes(readInBytes);<a name="line.177"></a>
+<span class="sourceLineNo">178</span>    globalSourceSource.incrLogReadInBytes(readInBytes);<a name="line.178"></a>
+<span class="sourceLineNo">179</span>  }<a name="line.179"></a>
+<span class="sourceLineNo">180</span><a name="line.180"></a>
+<span class="sourceLineNo">181</span>  /** Removes all metrics about this Source. */<a name="line.181"></a>
+<span class="sourceLineNo">182</span>  public void clear() {<a name="line.182"></a>
+<span class="sourceLineNo">183</span>    int lastQueueSize = singleSourceSource.getSizeOfLogQueue();<a name="line.183"></a>
+<span class="sourceLineNo">184</span>    globalSourceSource.decrSizeOfLogQueue(lastQueueSize);<a name="line.184"></a>
+<span class="sourceLineNo">185</span>    singleSourceSource.decrSizeOfLogQueue(lastQueueSize);<a name="line.185"></a>
+<span class="sourceLineNo">186</span>    singleSourceSource.clear();<a name="line.186"></a>
+<span class="sourceLineNo">187</span>    globalSourceSource.decrSizeOfHFileRefsQueue(lastHFileRefsQueueSize);<a name="line.187"></a>
+<span class="sourceLineNo">188</span>    lastTimeStamps.clear();<a name="line.188"></a>
 <span class="sourceLineNo">189</span>    lastHFileRefsQueueSize = 0;<a name="line.189"></a>
 <span class="sourceLineNo">190</span>  }<a name="line.190"></a>
 <span class="sourceLineNo">191</span><a name="line.191"></a>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/476c54ed/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/RecoveredReplicationSource.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/RecoveredReplicationSource.html b/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/RecoveredReplicationSource.html
index 2cc1a7f..5e9c67d 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/RecoveredReplicationSource.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/RecoveredReplicationSource.html
@@ -168,14 +168,14 @@
 <span class="sourceLineNo">160</span>    // use synchronize to make sure one last thread will clean the queue<a name="line.160"></a>
 <span class="sourceLineNo">161</span>    synchronized (workerThreads) {<a name="line.161"></a>
 <span class="sourceLineNo">162</span>      Threads.sleep(100);// wait a short while for other worker thread to fully exit<a name="line.162"></a>
-<span class="sourceLineNo">163</span>      boolean allOtherTaskDone = true;<a name="line.163"></a>
+<span class="sourceLineNo">163</span>      boolean allTasksDone = true;<a name="line.163"></a>
 <span class="sourceLineNo">164</span>      for (ReplicationSourceShipperThread worker : workerThreads.values()) {<a name="line.164"></a>
-<span class="sourceLineNo">165</span>        if (worker.isActive()) {<a name="line.165"></a>
-<span class="sourceLineNo">166</span>          allOtherTaskDone = false;<a name="line.166"></a>
+<span class="sourceLineNo">165</span>        if (!worker.isFinished()) {<a name="line.165"></a>
+<span class="sourceLineNo">166</span>          allTasksDone = false;<a name="line.166"></a>
 <span class="sourceLineNo">167</span>          break;<a name="line.167"></a>
 <span class="sourceLineNo">168</span>        }<a name="line.168"></a>
 <span class="sourceLineNo">169</span>      }<a name="line.169"></a>
-<span class="sourceLineNo">170</span>      if (allOtherTaskDone) {<a name="line.170"></a>
+<span class="sourceLineNo">170</span>      if (allTasksDone) {<a name="line.170"></a>
 <span class="sourceLineNo">171</span>        manager.closeRecoveredQueue(this);<a name="line.171"></a>
 <span class="sourceLineNo">172</span>        LOG.info("Finished recovering queue " + peerClusterZnode + " with the following stats: "<a name="line.172"></a>
 <span class="sourceLineNo">173</span>            + getStats());<a name="line.173"></a>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/476c54ed/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/RecoveredReplicationSourceShipperThread.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/RecoveredReplicationSourceShipperThread.html b/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/RecoveredReplicationSourceShipperThread.html
index 089dc2e..27886a9 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/RecoveredReplicationSourceShipperThread.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/RecoveredReplicationSourceShipperThread.html
@@ -59,100 +59,104 @@
 <span class="sourceLineNo">051</span><a name="line.51"></a>
 <span class="sourceLineNo">052</span>  @Override<a name="line.52"></a>
 <span class="sourceLineNo">053</span>  public void run() {<a name="line.53"></a>
-<span class="sourceLineNo">054</span>    // Loop until we close down<a name="line.54"></a>
-<span class="sourceLineNo">055</span>    while (isActive()) {<a name="line.55"></a>
-<span class="sourceLineNo">056</span>      int sleepMultiplier = 1;<a name="line.56"></a>
-<span class="sourceLineNo">057</span>      // Sleep until replication is enabled again<a name="line.57"></a>
-<span class="sourceLineNo">058</span>      if (!source.isPeerEnabled()) {<a name="line.58"></a>
-<span class="sourceLineNo">059</span>        if (source.sleepForRetries("Replication is disabled", sleepMultiplier)) {<a name="line.59"></a>
-<span class="sourceLineNo">060</span>          sleepMultiplier++;<a name="line.60"></a>
-<span class="sourceLineNo">061</span>        }<a name="line.61"></a>
-<span class="sourceLineNo">062</span>        continue;<a name="line.62"></a>
-<span class="sourceLineNo">063</span>      }<a name="line.63"></a>
-<span class="sourceLineNo">064</span><a name="line.64"></a>
-<span class="sourceLineNo">065</span>      while (entryReader == null) {<a name="line.65"></a>
-<span class="sourceLineNo">066</span>        if (source.sleepForRetries("Replication WAL entry reader thread not initialized",<a name="line.66"></a>
-<span class="sourceLineNo">067</span>          sleepMultiplier)) {<a name="line.67"></a>
-<span class="sourceLineNo">068</span>          sleepMultiplier++;<a name="line.68"></a>
-<span class="sourceLineNo">069</span>        }<a name="line.69"></a>
-<span class="sourceLineNo">070</span>      }<a name="line.70"></a>
-<span class="sourceLineNo">071</span><a name="line.71"></a>
-<span class="sourceLineNo">072</span>      try {<a name="line.72"></a>
-<span class="sourceLineNo">073</span>        WALEntryBatch entryBatch = entryReader.take();<a name="line.73"></a>
-<span class="sourceLineNo">074</span>        shipEdits(entryBatch);<a name="line.74"></a>
-<span class="sourceLineNo">075</span>        if (entryBatch.getWalEntries().isEmpty()<a name="line.75"></a>
-<span class="sourceLineNo">076</span>            &amp;&amp; entryBatch.getLastSeqIds().isEmpty()) {<a name="line.76"></a>
-<span class="sourceLineNo">077</span>          LOG.debug("Finished recovering queue for group " + walGroupId + " of peer "<a name="line.77"></a>
-<span class="sourceLineNo">078</span>              + source.getPeerClusterZnode());<a name="line.78"></a>
-<span class="sourceLineNo">079</span>          source.getSourceMetrics().incrCompletedRecoveryQueue();<a name="line.79"></a>
-<span class="sourceLineNo">080</span>          setWorkerRunning(false);<a name="line.80"></a>
-<span class="sourceLineNo">081</span>          continue;<a name="line.81"></a>
-<span class="sourceLineNo">082</span>        }<a name="line.82"></a>
-<span class="sourceLineNo">083</span>      } catch (InterruptedException e) {<a name="line.83"></a>
-<span class="sourceLineNo">084</span>        LOG.trace("Interrupted while waiting for next replication entry batch", e);<a name="line.84"></a>
-<span class="sourceLineNo">085</span>        Thread.currentThread().interrupt();<a name="line.85"></a>
-<span class="sourceLineNo">086</span>      }<a name="line.86"></a>
-<span class="sourceLineNo">087</span>    }<a name="line.87"></a>
-<span class="sourceLineNo">088</span><a name="line.88"></a>
+<span class="sourceLineNo">054</span>    setWorkerState(WorkerState.RUNNING);<a name="line.54"></a>
+<span class="sourceLineNo">055</span>    // Loop until we close down<a name="line.55"></a>
+<span class="sourceLineNo">056</span>    while (isActive()) {<a name="line.56"></a>
+<span class="sourceLineNo">057</span>      int sleepMultiplier = 1;<a name="line.57"></a>
+<span class="sourceLineNo">058</span>      // Sleep until replication is enabled again<a name="line.58"></a>
+<span class="sourceLineNo">059</span>      if (!source.isPeerEnabled()) {<a name="line.59"></a>
+<span class="sourceLineNo">060</span>        if (source.sleepForRetries("Replication is disabled", sleepMultiplier)) {<a name="line.60"></a>
+<span class="sourceLineNo">061</span>          sleepMultiplier++;<a name="line.61"></a>
+<span class="sourceLineNo">062</span>        }<a name="line.62"></a>
+<span class="sourceLineNo">063</span>        continue;<a name="line.63"></a>
+<span class="sourceLineNo">064</span>      }<a name="line.64"></a>
+<span class="sourceLineNo">065</span><a name="line.65"></a>
+<span class="sourceLineNo">066</span>      while (entryReader == null) {<a name="line.66"></a>
+<span class="sourceLineNo">067</span>        if (source.sleepForRetries("Replication WAL entry reader thread not initialized",<a name="line.67"></a>
+<span class="sourceLineNo">068</span>          sleepMultiplier)) {<a name="line.68"></a>
+<span class="sourceLineNo">069</span>          sleepMultiplier++;<a name="line.69"></a>
+<span class="sourceLineNo">070</span>        }<a name="line.70"></a>
+<span class="sourceLineNo">071</span>      }<a name="line.71"></a>
+<span class="sourceLineNo">072</span><a name="line.72"></a>
+<span class="sourceLineNo">073</span>      try {<a name="line.73"></a>
+<span class="sourceLineNo">074</span>        WALEntryBatch entryBatch = entryReader.take();<a name="line.74"></a>
+<span class="sourceLineNo">075</span>        shipEdits(entryBatch);<a name="line.75"></a>
+<span class="sourceLineNo">076</span>        if (entryBatch.getWalEntries().isEmpty()<a name="line.76"></a>
+<span class="sourceLineNo">077</span>            &amp;&amp; entryBatch.getLastSeqIds().isEmpty()) {<a name="line.77"></a>
+<span class="sourceLineNo">078</span>          LOG.debug("Finished recovering queue for group " + walGroupId + " of peer "<a name="line.78"></a>
+<span class="sourceLineNo">079</span>              + source.getPeerClusterZnode());<a name="line.79"></a>
+<span class="sourceLineNo">080</span>          source.getSourceMetrics().incrCompletedRecoveryQueue();<a name="line.80"></a>
+<span class="sourceLineNo">081</span>          setWorkerState(WorkerState.FINISHED);<a name="line.81"></a>
+<span class="sourceLineNo">082</span>          continue;<a name="line.82"></a>
+<span class="sourceLineNo">083</span>        }<a name="line.83"></a>
+<span class="sourceLineNo">084</span>      } catch (InterruptedException e) {<a name="line.84"></a>
+<span class="sourceLineNo">085</span>        LOG.trace("Interrupted while waiting for next replication entry batch", e);<a name="line.85"></a>
+<span class="sourceLineNo">086</span>        Thread.currentThread().interrupt();<a name="line.86"></a>
+<span class="sourceLineNo">087</span>      }<a name="line.87"></a>
+<span class="sourceLineNo">088</span>    }<a name="line.88"></a>
 <span class="sourceLineNo">089</span>    source.tryFinish();<a name="line.89"></a>
-<span class="sourceLineNo">090</span>  }<a name="line.90"></a>
-<span class="sourceLineNo">091</span><a name="line.91"></a>
-<span class="sourceLineNo">092</span>  @Override<a name="line.92"></a>
-<span class="sourceLineNo">093</span>  public long getStartPosition() {<a name="line.93"></a>
-<span class="sourceLineNo">094</span>    long startPosition = getRecoveredQueueStartPos();<a name="line.94"></a>
-<span class="sourceLineNo">095</span>    int numRetries = 0;<a name="line.95"></a>
-<span class="sourceLineNo">096</span>    while (numRetries &lt;= maxRetriesMultiplier) {<a name="line.96"></a>
-<span class="sourceLineNo">097</span>      try {<a name="line.97"></a>
-<span class="sourceLineNo">098</span>        source.locateRecoveredPaths(queue);<a name="line.98"></a>
-<span class="sourceLineNo">099</span>        break;<a name="line.99"></a>
-<span class="sourceLineNo">100</span>      } catch (IOException e) {<a name="line.100"></a>
-<span class="sourceLineNo">101</span>        LOG.error("Error while locating recovered queue paths, attempt #" + numRetries);<a name="line.101"></a>
-<span class="sourceLineNo">102</span>        numRetries++;<a name="line.102"></a>
-<span class="sourceLineNo">103</span>      }<a name="line.103"></a>
-<span class="sourceLineNo">104</span>    }<a name="line.104"></a>
-<span class="sourceLineNo">105</span>    return startPosition;<a name="line.105"></a>
-<span class="sourceLineNo">106</span>  }<a name="line.106"></a>
-<span class="sourceLineNo">107</span><a name="line.107"></a>
-<span class="sourceLineNo">108</span>  // If this is a recovered queue, the queue is already full and the first log<a name="line.108"></a>
-<span class="sourceLineNo">109</span>  // normally has a position (unless the RS failed between 2 logs)<a name="line.109"></a>
-<span class="sourceLineNo">110</span>  private long getRecoveredQueueStartPos() {<a name="line.110"></a>
-<span class="sourceLineNo">111</span>    long startPosition = 0;<a name="line.111"></a>
-<span class="sourceLineNo">112</span>    String peerClusterZnode = source.getPeerClusterZnode();<a name="line.112"></a>
-<span class="sourceLineNo">113</span>    try {<a name="line.113"></a>
-<span class="sourceLineNo">114</span>      startPosition = this.replicationQueues.getLogPosition(peerClusterZnode,<a name="line.114"></a>
-<span class="sourceLineNo">115</span>        this.queue.peek().getName());<a name="line.115"></a>
-<span class="sourceLineNo">116</span>      if (LOG.isTraceEnabled()) {<a name="line.116"></a>
-<span class="sourceLineNo">117</span>        LOG.trace("Recovered queue started with log " + this.queue.peek() + " at position "<a name="line.117"></a>
-<span class="sourceLineNo">118</span>            + startPosition);<a name="line.118"></a>
-<span class="sourceLineNo">119</span>      }<a name="line.119"></a>
-<span class="sourceLineNo">120</span>    } catch (ReplicationException e) {<a name="line.120"></a>
-<span class="sourceLineNo">121</span>      terminate("Couldn't get the position of this recovered queue " + peerClusterZnode, e);<a name="line.121"></a>
-<span class="sourceLineNo">122</span>    }<a name="line.122"></a>
-<span class="sourceLineNo">123</span>    return startPosition;<a name="line.123"></a>
-<span class="sourceLineNo">124</span>  }<a name="line.124"></a>
-<span class="sourceLineNo">125</span><a name="line.125"></a>
-<span class="sourceLineNo">126</span>  @Override<a name="line.126"></a>
-<span class="sourceLineNo">127</span>  protected void updateLogPosition(long lastReadPosition) {<a name="line.127"></a>
-<span class="sourceLineNo">128</span>    source.getSourceManager().logPositionAndCleanOldLogs(currentPath, source.getPeerClusterZnode(),<a name="line.128"></a>
-<span class="sourceLineNo">129</span>      lastReadPosition, true, false);<a name="line.129"></a>
-<span class="sourceLineNo">130</span>    lastLoggedPosition = lastReadPosition;<a name="line.130"></a>
-<span class="sourceLineNo">131</span>  }<a name="line.131"></a>
-<span class="sourceLineNo">132</span><a name="line.132"></a>
-<span class="sourceLineNo">133</span>  private void terminate(String reason, Exception cause) {<a name="line.133"></a>
-<span class="sourceLineNo">134</span>    if (cause == null) {<a name="line.134"></a>
-<span class="sourceLineNo">135</span>      LOG.info("Closing worker for wal group " + this.walGroupId + " because: " + reason);<a name="line.135"></a>
+<span class="sourceLineNo">090</span>    // If the worker exits run loop without finishing its task, mark it as stopped.<a name="line.90"></a>
+<span class="sourceLineNo">091</span>    if (!isFinished()) {<a name="line.91"></a>
+<span class="sourceLineNo">092</span>      setWorkerState(WorkerState.STOPPED);<a name="line.92"></a>
+<span class="sourceLineNo">093</span>    }<a name="line.93"></a>
+<span class="sourceLineNo">094</span>  }<a name="line.94"></a>
+<span class="sourceLineNo">095</span><a name="line.95"></a>
+<span class="sourceLineNo">096</span>  @Override<a name="line.96"></a>
+<span class="sourceLineNo">097</span>  public long getStartPosition() {<a name="line.97"></a>
+<span class="sourceLineNo">098</span>    long startPosition = getRecoveredQueueStartPos();<a name="line.98"></a>
+<span class="sourceLineNo">099</span>    int numRetries = 0;<a name="line.99"></a>
+<span class="sourceLineNo">100</span>    while (numRetries &lt;= maxRetriesMultiplier) {<a name="line.100"></a>
+<span class="sourceLineNo">101</span>      try {<a name="line.101"></a>
+<span class="sourceLineNo">102</span>        source.locateRecoveredPaths(queue);<a name="line.102"></a>
+<span class="sourceLineNo">103</span>        break;<a name="line.103"></a>
+<span class="sourceLineNo">104</span>      } catch (IOException e) {<a name="line.104"></a>
+<span class="sourceLineNo">105</span>        LOG.error("Error while locating recovered queue paths, attempt #" + numRetries);<a name="line.105"></a>
+<span class="sourceLineNo">106</span>        numRetries++;<a name="line.106"></a>
+<span class="sourceLineNo">107</span>      }<a name="line.107"></a>
+<span class="sourceLineNo">108</span>    }<a name="line.108"></a>
+<span class="sourceLineNo">109</span>    return startPosition;<a name="line.109"></a>
+<span class="sourceLineNo">110</span>  }<a name="line.110"></a>
+<span class="sourceLineNo">111</span><a name="line.111"></a>
+<span class="sourceLineNo">112</span>  // If this is a recovered queue, the queue is already full and the first log<a name="line.112"></a>
+<span class="sourceLineNo">113</span>  // normally has a position (unless the RS failed between 2 logs)<a name="line.113"></a>
+<span class="sourceLineNo">114</span>  private long getRecoveredQueueStartPos() {<a name="line.114"></a>
+<span class="sourceLineNo">115</span>    long startPosition = 0;<a name="line.115"></a>
+<span class="sourceLineNo">116</span>    String peerClusterZnode = source.getPeerClusterZnode();<a name="line.116"></a>
+<span class="sourceLineNo">117</span>    try {<a name="line.117"></a>
+<span class="sourceLineNo">118</span>      startPosition = this.replicationQueues.getLogPosition(peerClusterZnode,<a name="line.118"></a>
+<span class="sourceLineNo">119</span>        this.queue.peek().getName());<a name="line.119"></a>
+<span class="sourceLineNo">120</span>      if (LOG.isTraceEnabled()) {<a name="line.120"></a>
+<span class="sourceLineNo">121</span>        LOG.trace("Recovered queue started with log " + this.queue.peek() + " at position "<a name="line.121"></a>
+<span class="sourceLineNo">122</span>            + startPosition);<a name="line.122"></a>
+<span class="sourceLineNo">123</span>      }<a name="line.123"></a>
+<span class="sourceLineNo">124</span>    } catch (ReplicationException e) {<a name="line.124"></a>
+<span class="sourceLineNo">125</span>      terminate("Couldn't get the position of this recovered queue " + peerClusterZnode, e);<a name="line.125"></a>
+<span class="sourceLineNo">126</span>    }<a name="line.126"></a>
+<span class="sourceLineNo">127</span>    return startPosition;<a name="line.127"></a>
+<span class="sourceLineNo">128</span>  }<a name="line.128"></a>
+<span class="sourceLineNo">129</span><a name="line.129"></a>
+<span class="sourceLineNo">130</span>  @Override<a name="line.130"></a>
+<span class="sourceLineNo">131</span>  protected void updateLogPosition(long lastReadPosition) {<a name="line.131"></a>
+<span class="sourceLineNo">132</span>    source.getSourceManager().logPositionAndCleanOldLogs(currentPath, source.getPeerClusterZnode(),<a name="line.132"></a>
+<span class="sourceLineNo">133</span>      lastReadPosition, true, false);<a name="line.133"></a>
+<span class="sourceLineNo">134</span>    lastLoggedPosition = lastReadPosition;<a name="line.134"></a>
+<span class="sourceLineNo">135</span>  }<a name="line.135"></a>
 <span class="sourceLineNo">136</span><a name="line.136"></a>
-<span class="sourceLineNo">137</span>    } else {<a name="line.137"></a>
-<span class="sourceLineNo">138</span>      LOG.error("Closing worker for wal group " + this.walGroupId<a name="line.138"></a>
-<span class="sourceLineNo">139</span>          + " because an error occurred: " + reason, cause);<a name="line.139"></a>
-<span class="sourceLineNo">140</span>    }<a name="line.140"></a>
-<span class="sourceLineNo">141</span>    entryReader.interrupt();<a name="line.141"></a>
-<span class="sourceLineNo">142</span>    Threads.shutdown(entryReader, sleepForRetries);<a name="line.142"></a>
-<span class="sourceLineNo">143</span>    this.interrupt();<a name="line.143"></a>
-<span class="sourceLineNo">144</span>    Threads.shutdown(this, sleepForRetries);<a name="line.144"></a>
-<span class="sourceLineNo">145</span>    LOG.info("ReplicationSourceWorker " + this.getName() + " terminated");<a name="line.145"></a>
-<span class="sourceLineNo">146</span>  }<a name="line.146"></a>
-<span class="sourceLineNo">147</span>}<a name="line.147"></a>
+<span class="sourceLineNo">137</span>  private void terminate(String reason, Exception cause) {<a name="line.137"></a>
+<span class="sourceLineNo">138</span>    if (cause == null) {<a name="line.138"></a>
+<span class="sourceLineNo">139</span>      LOG.info("Closing worker for wal group " + this.walGroupId + " because: " + reason);<a name="line.139"></a>
+<span class="sourceLineNo">140</span><a name="line.140"></a>
+<span class="sourceLineNo">141</span>    } else {<a name="line.141"></a>
+<span class="sourceLineNo">142</span>      LOG.error("Closing worker for wal group " + this.walGroupId<a name="line.142"></a>
+<span class="sourceLineNo">143</span>          + " because an error occurred: " + reason, cause);<a name="line.143"></a>
+<span class="sourceLineNo">144</span>    }<a name="line.144"></a>
+<span class="sourceLineNo">145</span>    entryReader.interrupt();<a name="line.145"></a>
+<span class="sourceLineNo">146</span>    Threads.shutdown(entryReader, sleepForRetries);<a name="line.146"></a>
+<span class="sourceLineNo">147</span>    this.interrupt();<a name="line.147"></a>
+<span class="sourceLineNo">148</span>    Threads.shutdown(this, sleepForRetries);<a name="line.148"></a>
+<span class="sourceLineNo">149</span>    LOG.info("ReplicationSourceWorker " + this.getName() + " terminated");<a name="line.149"></a>
+<span class="sourceLineNo">150</span>  }<a name="line.150"></a>
+<span class="sourceLineNo">151</span>}<a name="line.151"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/476c54ed/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/Replication.ReplicationStatisticsThread.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/Replication.ReplicationStatisticsThread.html b/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/Replication.ReplicationStatisticsThread.html
index a36f4dd..8d5ab1b 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/Replication.ReplicationStatisticsThread.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/Replication.ReplicationStatisticsThread.html
@@ -376,24 +376,22 @@
 <span class="sourceLineNo">368</span>    // get source<a name="line.368"></a>
 <span class="sourceLineNo">369</span>    List&lt;ReplicationSourceInterface&gt; sources = this.replicationManager.getSources();<a name="line.369"></a>
 <span class="sourceLineNo">370</span>    for (ReplicationSourceInterface source : sources) {<a name="line.370"></a>
-<span class="sourceLineNo">371</span>      if (source instanceof ReplicationSource) {<a name="line.371"></a>
-<span class="sourceLineNo">372</span>        sourceMetricsList.add(((ReplicationSource) source).getSourceMetrics());<a name="line.372"></a>
-<span class="sourceLineNo">373</span>      }<a name="line.373"></a>
-<span class="sourceLineNo">374</span>    }<a name="line.374"></a>
-<span class="sourceLineNo">375</span><a name="line.375"></a>
-<span class="sourceLineNo">376</span>    // get old source<a name="line.376"></a>
-<span class="sourceLineNo">377</span>    List&lt;ReplicationSourceInterface&gt; oldSources = this.replicationManager.getOldSources();<a name="line.377"></a>
-<span class="sourceLineNo">378</span>    for (ReplicationSourceInterface source : oldSources) {<a name="line.378"></a>
-<span class="sourceLineNo">379</span>      if (source instanceof ReplicationSource) {<a name="line.379"></a>
-<span class="sourceLineNo">380</span>        sourceMetricsList.add(((ReplicationSource) source).getSourceMetrics());<a name="line.380"></a>
-<span class="sourceLineNo">381</span>      }<a name="line.381"></a>
-<span class="sourceLineNo">382</span>    }<a name="line.382"></a>
-<span class="sourceLineNo">383</span><a name="line.383"></a>
-<span class="sourceLineNo">384</span>    // get sink<a name="line.384"></a>
-<span class="sourceLineNo">385</span>    MetricsSink sinkMetrics = this.replicationSink.getSinkMetrics();<a name="line.385"></a>
-<span class="sourceLineNo">386</span>    this.replicationLoad.buildReplicationLoad(sourceMetricsList, sinkMetrics);<a name="line.386"></a>
-<span class="sourceLineNo">387</span>  }<a name="line.387"></a>
-<span class="sourceLineNo">388</span>}<a name="line.388"></a>
+<span class="sourceLineNo">371</span>      sourceMetricsList.add(source.getSourceMetrics());<a name="line.371"></a>
+<span class="sourceLineNo">372</span>    }<a name="line.372"></a>
+<span class="sourceLineNo">373</span><a name="line.373"></a>
+<span class="sourceLineNo">374</span>    // get old source<a name="line.374"></a>
+<span class="sourceLineNo">375</span>    List&lt;ReplicationSourceInterface&gt; oldSources = this.replicationManager.getOldSources();<a name="line.375"></a>
+<span class="sourceLineNo">376</span>    for (ReplicationSourceInterface source : oldSources) {<a name="line.376"></a>
+<span class="sourceLineNo">377</span>      if (source instanceof ReplicationSource) {<a name="line.377"></a>
+<span class="sourceLineNo">378</span>        sourceMetricsList.add(((ReplicationSource) source).getSourceMetrics());<a name="line.378"></a>
+<span class="sourceLineNo">379</span>      }<a name="line.379"></a>
+<span class="sourceLineNo">380</span>    }<a name="line.380"></a>
+<span class="sourceLineNo">381</span><a name="line.381"></a>
+<span class="sourceLineNo">382</span>    // get sink<a name="line.382"></a>
+<span class="sourceLineNo">383</span>    MetricsSink sinkMetrics = this.replicationSink.getSinkMetrics();<a name="line.383"></a>
+<span class="sourceLineNo">384</span>    this.replicationLoad.buildReplicationLoad(sourceMetricsList, sinkMetrics);<a name="line.384"></a>
+<span class="sourceLineNo">385</span>  }<a name="line.385"></a>
+<span class="sourceLineNo">386</span>}<a name="line.386"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/476c54ed/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/Replication.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/Replication.html b/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/Replication.html
index a36f4dd..8d5ab1b 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/Replication.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/Replication.html
@@ -376,24 +376,22 @@
 <span class="sourceLineNo">368</span>    // get source<a name="line.368"></a>
 <span class="sourceLineNo">369</span>    List&lt;ReplicationSourceInterface&gt; sources = this.replicationManager.getSources();<a name="line.369"></a>
 <span class="sourceLineNo">370</span>    for (ReplicationSourceInterface source : sources) {<a name="line.370"></a>
-<span class="sourceLineNo">371</span>      if (source instanceof ReplicationSource) {<a name="line.371"></a>
-<span class="sourceLineNo">372</span>        sourceMetricsList.add(((ReplicationSource) source).getSourceMetrics());<a name="line.372"></a>
-<span class="sourceLineNo">373</span>      }<a name="line.373"></a>
-<span class="sourceLineNo">374</span>    }<a name="line.374"></a>
-<span class="sourceLineNo">375</span><a name="line.375"></a>
-<span class="sourceLineNo">376</span>    // get old source<a name="line.376"></a>
-<span class="sourceLineNo">377</span>    List&lt;ReplicationSourceInterface&gt; oldSources = this.replicationManager.getOldSources();<a name="line.377"></a>
-<span class="sourceLineNo">378</span>    for (ReplicationSourceInterface source : oldSources) {<a name="line.378"></a>
-<span class="sourceLineNo">379</span>      if (source instanceof ReplicationSource) {<a name="line.379"></a>
-<span class="sourceLineNo">380</span>        sourceMetricsList.add(((ReplicationSource) source).getSourceMetrics());<a name="line.380"></a>
-<span class="sourceLineNo">381</span>      }<a name="line.381"></a>
-<span class="sourceLineNo">382</span>    }<a name="line.382"></a>
-<span class="sourceLineNo">383</span><a name="line.383"></a>
-<span class="sourceLineNo">384</span>    // get sink<a name="line.384"></a>
-<span class="sourceLineNo">385</span>    MetricsSink sinkMetrics = this.replicationSink.getSinkMetrics();<a name="line.385"></a>
-<span class="sourceLineNo">386</span>    this.replicationLoad.buildReplicationLoad(sourceMetricsList, sinkMetrics);<a name="line.386"></a>
-<span class="sourceLineNo">387</span>  }<a name="line.387"></a>
-<span class="sourceLineNo">388</span>}<a name="line.388"></a>
+<span class="sourceLineNo">371</span>      sourceMetricsList.add(source.getSourceMetrics());<a name="line.371"></a>
+<span class="sourceLineNo">372</span>    }<a name="line.372"></a>
+<span class="sourceLineNo">373</span><a name="line.373"></a>
+<span class="sourceLineNo">374</span>    // get old source<a name="line.374"></a>
+<span class="sourceLineNo">375</span>    List&lt;ReplicationSourceInterface&gt; oldSources = this.replicationManager.getOldSources();<a name="line.375"></a>
+<span class="sourceLineNo">376</span>    for (ReplicationSourceInterface source : oldSources) {<a name="line.376"></a>
+<span class="sourceLineNo">377</span>      if (source instanceof ReplicationSource) {<a name="line.377"></a>
+<span class="sourceLineNo">378</span>        sourceMetricsList.add(((ReplicationSource) source).getSourceMetrics());<a name="line.378"></a>
+<span class="sourceLineNo">379</span>      }<a name="line.379"></a>
+<span class="sourceLineNo">380</span>    }<a name="line.380"></a>
+<span class="sourceLineNo">381</span><a name="line.381"></a>
+<span class="sourceLineNo">382</span>    // get sink<a name="line.382"></a>
+<span class="sourceLineNo">383</span>    MetricsSink sinkMetrics = this.replicationSink.getSinkMetrics();<a name="line.383"></a>
+<span class="sourceLineNo">384</span>    this.replicationLoad.buildReplicationLoad(sourceMetricsList, sinkMetrics);<a name="line.384"></a>
+<span class="sourceLineNo">385</span>  }<a name="line.385"></a>
+<span class="sourceLineNo">386</span>}<a name="line.386"></a>
 
 
 


Mime
View raw message