hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bus...@apache.org
Subject [07/51] [partial] hbase-site git commit: Published site at ce318a2906817058ae7b2fce6e9b54d9d6230f9b.
Date Wed, 27 Apr 2016 17:06:15 GMT
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/4131cace/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/compactions/DateTieredCompactionPolicy.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/compactions/DateTieredCompactionPolicy.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/compactions/DateTieredCompactionPolicy.html
index 0941f08..4bec2fc 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/compactions/DateTieredCompactionPolicy.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/compactions/DateTieredCompactionPolicy.html
@@ -120,223 +120,230 @@
 <span class="sourceLineNo">112</span>    throws IOException {<a name="line.112"></a>
 <span class="sourceLineNo">113</span>    long mcTime = getNextMajorCompactTime(filesToCompact);<a name="line.113"></a>
 <span class="sourceLineNo">114</span>    if (filesToCompact == null || mcTime == 0) {<a name="line.114"></a>
-<span class="sourceLineNo">115</span>      return false;<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>    // TODO: Use better method for determining stamp of last major (HBASE-2990)<a name="line.118"></a>
-<span class="sourceLineNo">119</span>    long lowTimestamp = StoreUtils.getLowestTimestamp(filesToCompact);<a name="line.119"></a>
-<span class="sourceLineNo">120</span>    long now = EnvironmentEdgeManager.currentTime();<a name="line.120"></a>
-<span class="sourceLineNo">121</span>    if (lowTimestamp &lt;= 0L || lowTimestamp &gt;= (now - mcTime)) {<a name="line.121"></a>
-<span class="sourceLineNo">122</span>      return false;<a name="line.122"></a>
-<span class="sourceLineNo">123</span>    }<a name="line.123"></a>
-<span class="sourceLineNo">124</span><a name="line.124"></a>
-<span class="sourceLineNo">125</span>    long cfTTL = this.storeConfigInfo.getStoreFileTtl();<a name="line.125"></a>
-<span class="sourceLineNo">126</span>    HDFSBlocksDistribution hdfsBlocksDistribution = new HDFSBlocksDistribution();<a name="line.126"></a>
-<span class="sourceLineNo">127</span>    List&lt;Long&gt; boundaries = getCompactBoundariesForMajor(filesToCompact, now);<a name="line.127"></a>
-<span class="sourceLineNo">128</span>    boolean[] filesInWindow = new boolean[boundaries.size()];<a name="line.128"></a>
-<span class="sourceLineNo">129</span><a name="line.129"></a>
-<span class="sourceLineNo">130</span>    for (StoreFile file: filesToCompact) {<a name="line.130"></a>
-<span class="sourceLineNo">131</span>      Long minTimestamp = file.getMinimumTimestamp();<a name="line.131"></a>
-<span class="sourceLineNo">132</span>      long oldest = (minTimestamp == null) ? Long.MIN_VALUE : now - minTimestamp.longValue();<a name="line.132"></a>
-<span class="sourceLineNo">133</span>      if (cfTTL != Long.MAX_VALUE &amp;&amp; oldest &gt;= cfTTL) {<a name="line.133"></a>
-<span class="sourceLineNo">134</span>        LOG.debug("Major compaction triggered on store " + this<a name="line.134"></a>
-<span class="sourceLineNo">135</span>          + "; for TTL maintenance");<a name="line.135"></a>
-<span class="sourceLineNo">136</span>        return true;<a name="line.136"></a>
-<span class="sourceLineNo">137</span>      }<a name="line.137"></a>
-<span class="sourceLineNo">138</span>      if (!file.isMajorCompaction() || file.isBulkLoadResult()) {<a name="line.138"></a>
-<span class="sourceLineNo">139</span>        LOG.debug("Major compaction triggered on store " + this<a name="line.139"></a>
-<span class="sourceLineNo">140</span>          + ", because there are new files and time since last major compaction "<a name="line.140"></a>
-<span class="sourceLineNo">141</span>          + (now - lowTimestamp) + "ms");<a name="line.141"></a>
-<span class="sourceLineNo">142</span>        return true;<a name="line.142"></a>
-<span class="sourceLineNo">143</span>      }<a name="line.143"></a>
-<span class="sourceLineNo">144</span><a name="line.144"></a>
-<span class="sourceLineNo">145</span>      int lowerWindowIndex = Collections.binarySearch(boundaries,<a name="line.145"></a>
-<span class="sourceLineNo">146</span>        minTimestamp == null ? (Long)Long.MAX_VALUE : minTimestamp);<a name="line.146"></a>
-<span class="sourceLineNo">147</span>      int upperWindowIndex = Collections.binarySearch(boundaries,<a name="line.147"></a>
-<span class="sourceLineNo">148</span>        file.getMaximumTimestamp() == null ? (Long)Long.MAX_VALUE : file.getMaximumTimestamp());<a name="line.148"></a>
-<span class="sourceLineNo">149</span>      if (lowerWindowIndex != upperWindowIndex) {<a name="line.149"></a>
-<span class="sourceLineNo">150</span>        LOG.debug("Major compaction triggered on store " + this + "; because file "<a name="line.150"></a>
-<span class="sourceLineNo">151</span>          + file.getPath() + " has data with timestamps cross window boundaries");<a name="line.151"></a>
-<span class="sourceLineNo">152</span>        return true;<a name="line.152"></a>
-<span class="sourceLineNo">153</span>      } else if (filesInWindow[upperWindowIndex]) {<a name="line.153"></a>
-<span class="sourceLineNo">154</span>        LOG.debug("Major compaction triggered on store " + this +<a name="line.154"></a>
-<span class="sourceLineNo">155</span>          "; because there are more than one file in some windows");<a name="line.155"></a>
-<span class="sourceLineNo">156</span>        return true;<a name="line.156"></a>
-<span class="sourceLineNo">157</span>      } else {<a name="line.157"></a>
-<span class="sourceLineNo">158</span>        filesInWindow[upperWindowIndex] = true;<a name="line.158"></a>
-<span class="sourceLineNo">159</span>      }<a name="line.159"></a>
-<span class="sourceLineNo">160</span>      hdfsBlocksDistribution.add(file.getHDFSBlockDistribution());<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>    float blockLocalityIndex = hdfsBlocksDistribution<a name="line.163"></a>
-<span class="sourceLineNo">164</span>        .getBlockLocalityIndex(RSRpcServices.getHostname(comConf.conf, false));<a name="line.164"></a>
-<span class="sourceLineNo">165</span>    if (blockLocalityIndex &lt; comConf.getMinLocalityToForceCompact()) {<a name="line.165"></a>
-<span class="sourceLineNo">166</span>      LOG.debug("Major compaction triggered on store " + this<a name="line.166"></a>
-<span class="sourceLineNo">167</span>        + "; to make hdfs blocks local, current blockLocalityIndex is "<a name="line.167"></a>
-<span class="sourceLineNo">168</span>        + blockLocalityIndex + " (min " + comConf.getMinLocalityToForceCompact() + ")");<a name="line.168"></a>
-<span class="sourceLineNo">169</span>      return true;<a name="line.169"></a>
-<span class="sourceLineNo">170</span>    }<a name="line.170"></a>
-<span class="sourceLineNo">171</span><a name="line.171"></a>
-<span class="sourceLineNo">172</span>    LOG.debug("Skipping major compaction of " + this +<a name="line.172"></a>
-<span class="sourceLineNo">173</span>      ", because the files are already major compacted");<a name="line.173"></a>
-<span class="sourceLineNo">174</span>    return false;<a name="line.174"></a>
-<span class="sourceLineNo">175</span>  }<a name="line.175"></a>
-<span class="sourceLineNo">176</span><a name="line.176"></a>
-<span class="sourceLineNo">177</span>  @Override<a name="line.177"></a>
-<span class="sourceLineNo">178</span>  protected CompactionRequest createCompactionRequest(ArrayList&lt;StoreFile&gt; candidateSelection,<a name="line.178"></a>
-<span class="sourceLineNo">179</span>    boolean tryingMajor, boolean mayUseOffPeak, boolean mayBeStuck) throws IOException {<a name="line.179"></a>
-<span class="sourceLineNo">180</span>    CompactionRequest result = tryingMajor ? selectMajorCompaction(candidateSelection)<a name="line.180"></a>
-<span class="sourceLineNo">181</span>      : selectMinorCompaction(candidateSelection, mayUseOffPeak, mayBeStuck);<a name="line.181"></a>
-<span class="sourceLineNo">182</span>    if (LOG.isDebugEnabled()) {<a name="line.182"></a>
-<span class="sourceLineNo">183</span>      LOG.debug("Generated compaction request: " + result);<a name="line.183"></a>
-<span class="sourceLineNo">184</span>    }<a name="line.184"></a>
-<span class="sourceLineNo">185</span>    return result;<a name="line.185"></a>
-<span class="sourceLineNo">186</span>  }<a name="line.186"></a>
-<span class="sourceLineNo">187</span><a name="line.187"></a>
-<span class="sourceLineNo">188</span>  public CompactionRequest selectMajorCompaction(ArrayList&lt;StoreFile&gt; candidateSelection) {<a name="line.188"></a>
-<span class="sourceLineNo">189</span>    long now = EnvironmentEdgeManager.currentTime();<a name="line.189"></a>
-<span class="sourceLineNo">190</span>    return new DateTieredCompactionRequest(candidateSelection,<a name="line.190"></a>
-<span class="sourceLineNo">191</span>      this.getCompactBoundariesForMajor(candidateSelection, now));<a name="line.191"></a>
-<span class="sourceLineNo">192</span>  }<a name="line.192"></a>
-<span class="sourceLineNo">193</span><a name="line.193"></a>
-<span class="sourceLineNo">194</span>  /**<a name="line.194"></a>
-<span class="sourceLineNo">195</span>   * We receive store files sorted in ascending order by seqId then scan the list of files. If the<a name="line.195"></a>
-<span class="sourceLineNo">196</span>   * current file has a maxTimestamp older than last known maximum, treat this file as it carries<a name="line.196"></a>
-<span class="sourceLineNo">197</span>   * the last known maximum. This way both seqId and timestamp are in the same order. If files carry<a name="line.197"></a>
-<span class="sourceLineNo">198</span>   * the same maxTimestamps, they are ordered by seqId. We then reverse the list so they are ordered<a name="line.198"></a>
-<span class="sourceLineNo">199</span>   * by seqId and maxTimestamp in descending order and build the time windows. All the out-of-order<a name="line.199"></a>
-<span class="sourceLineNo">200</span>   * data into the same compaction windows, guaranteeing contiguous compaction based on sequence id.<a name="line.200"></a>
-<span class="sourceLineNo">201</span>   */<a name="line.201"></a>
-<span class="sourceLineNo">202</span>  public CompactionRequest selectMinorCompaction(ArrayList&lt;StoreFile&gt; candidateSelection,<a name="line.202"></a>
-<span class="sourceLineNo">203</span>      boolean mayUseOffPeak, boolean mayBeStuck) throws IOException {<a name="line.203"></a>
-<span class="sourceLineNo">204</span>    long now = EnvironmentEdgeManager.currentTime();<a name="line.204"></a>
-<span class="sourceLineNo">205</span>    long oldestToCompact = getOldestToCompact(comConf.getDateTieredMaxStoreFileAgeMillis(), now);<a name="line.205"></a>
-<span class="sourceLineNo">206</span><a name="line.206"></a>
-<span class="sourceLineNo">207</span>    List&lt;Pair&lt;StoreFile, Long&gt;&gt; storefileMaxTimestampPairs =<a name="line.207"></a>
-<span class="sourceLineNo">208</span>        Lists.newArrayListWithCapacity(candidateSelection.size());<a name="line.208"></a>
-<span class="sourceLineNo">209</span>    long maxTimestampSeen = Long.MIN_VALUE;<a name="line.209"></a>
-<span class="sourceLineNo">210</span>    for (StoreFile storeFile : candidateSelection) {<a name="line.210"></a>
-<span class="sourceLineNo">211</span>      // if there is out-of-order data,<a name="line.211"></a>
-<span class="sourceLineNo">212</span>      // we put them in the same window as the last file in increasing order<a name="line.212"></a>
-<span class="sourceLineNo">213</span>      maxTimestampSeen = Math.max(maxTimestampSeen,<a name="line.213"></a>
-<span class="sourceLineNo">214</span>        storeFile.getMaximumTimestamp() == null? Long.MIN_VALUE : storeFile.getMaximumTimestamp());<a name="line.214"></a>
-<span class="sourceLineNo">215</span>      storefileMaxTimestampPairs.add(new Pair&lt;StoreFile, Long&gt;(storeFile, maxTimestampSeen));<a name="line.215"></a>
-<span class="sourceLineNo">216</span>    }<a name="line.216"></a>
-<span class="sourceLineNo">217</span>    Collections.reverse(storefileMaxTimestampPairs);<a name="line.217"></a>
-<span class="sourceLineNo">218</span><a name="line.218"></a>
-<span class="sourceLineNo">219</span>    CompactionWindow window = getIncomingWindow(now);<a name="line.219"></a>
-<span class="sourceLineNo">220</span>    int minThreshold = comConf.getDateTieredIncomingWindowMin();<a name="line.220"></a>
-<span class="sourceLineNo">221</span>    PeekingIterator&lt;Pair&lt;StoreFile, Long&gt;&gt; it =<a name="line.221"></a>
-<span class="sourceLineNo">222</span>        Iterators.peekingIterator(storefileMaxTimestampPairs.iterator());<a name="line.222"></a>
-<span class="sourceLineNo">223</span>    while (it.hasNext()) {<a name="line.223"></a>
-<span class="sourceLineNo">224</span>      if (window.compareToTimestamp(oldestToCompact) &lt; 0) {<a name="line.224"></a>
-<span class="sourceLineNo">225</span>        break;<a name="line.225"></a>
-<span class="sourceLineNo">226</span>      }<a name="line.226"></a>
-<span class="sourceLineNo">227</span>      int compResult = window.compareToTimestamp(it.peek().getSecond());<a name="line.227"></a>
-<span class="sourceLineNo">228</span>      if (compResult &gt; 0) {<a name="line.228"></a>
-<span class="sourceLineNo">229</span>        // If the file is too old for the window, switch to the next window<a name="line.229"></a>
-<span class="sourceLineNo">230</span>        window = window.nextEarlierWindow();<a name="line.230"></a>
-<span class="sourceLineNo">231</span>        minThreshold = comConf.getMinFilesToCompact();<a name="line.231"></a>
-<span class="sourceLineNo">232</span>      } else {<a name="line.232"></a>
-<span class="sourceLineNo">233</span>        // The file is within the target window<a name="line.233"></a>
-<span class="sourceLineNo">234</span>        ArrayList&lt;StoreFile&gt; fileList = Lists.newArrayList();<a name="line.234"></a>
-<span class="sourceLineNo">235</span>        // Add all files in the same window. For incoming window<a name="line.235"></a>
-<span class="sourceLineNo">236</span>        // we tolerate files with future data although it is sub-optimal<a name="line.236"></a>
-<span class="sourceLineNo">237</span>        while (it.hasNext() &amp;&amp; window.compareToTimestamp(it.peek().getSecond()) &lt;= 0) {<a name="line.237"></a>
-<span class="sourceLineNo">238</span>          fileList.add(it.next().getFirst());<a name="line.238"></a>
-<span class="sourceLineNo">239</span>        }<a name="line.239"></a>
-<span class="sourceLineNo">240</span>        if (fileList.size() &gt;= minThreshold) {<a name="line.240"></a>
-<span class="sourceLineNo">241</span>          if (LOG.isDebugEnabled()) {<a name="line.241"></a>
-<span class="sourceLineNo">242</span>            LOG.debug("Processing files: " + fileList + " for window: " + window);<a name="line.242"></a>
-<span class="sourceLineNo">243</span>          }<a name="line.243"></a>
-<span class="sourceLineNo">244</span>          DateTieredCompactionRequest request = generateCompactionRequest(fileList, window,<a name="line.244"></a>
-<span class="sourceLineNo">245</span>            mayUseOffPeak, mayBeStuck, minThreshold);<a name="line.245"></a>
-<span class="sourceLineNo">246</span>          if (request != null) {<a name="line.246"></a>
-<span class="sourceLineNo">247</span>            return request;<a name="line.247"></a>
-<span class="sourceLineNo">248</span>          }<a name="line.248"></a>
-<span class="sourceLineNo">249</span>        }<a name="line.249"></a>
-<span class="sourceLineNo">250</span>      }<a name="line.250"></a>
-<span class="sourceLineNo">251</span>    }<a name="line.251"></a>
-<span class="sourceLineNo">252</span>    // A non-null file list is expected by HStore<a name="line.252"></a>
-<span class="sourceLineNo">253</span>    return new CompactionRequest(Collections.&lt;StoreFile&gt; emptyList());<a name="line.253"></a>
-<span class="sourceLineNo">254</span>  }<a name="line.254"></a>
-<span class="sourceLineNo">255</span><a name="line.255"></a>
-<span class="sourceLineNo">256</span>  private DateTieredCompactionRequest generateCompactionRequest(ArrayList&lt;StoreFile&gt; storeFiles,<a name="line.256"></a>
-<span class="sourceLineNo">257</span>      CompactionWindow window, boolean mayUseOffPeak, boolean mayBeStuck, int minThreshold)<a name="line.257"></a>
-<span class="sourceLineNo">258</span>      throws IOException {<a name="line.258"></a>
-<span class="sourceLineNo">259</span>    // The files has to be in ascending order for ratio-based compaction to work right<a name="line.259"></a>
-<span class="sourceLineNo">260</span>    // and removeExcessFile to exclude youngest files.<a name="line.260"></a>
-<span class="sourceLineNo">261</span>    Collections.reverse(storeFiles);<a name="line.261"></a>
+<span class="sourceLineNo">115</span>      if (LOG.isDebugEnabled()) {<a name="line.115"></a>
+<span class="sourceLineNo">116</span>        LOG.debug("filesToCompact: " + filesToCompact + " mcTime: " + mcTime);<a name="line.116"></a>
+<span class="sourceLineNo">117</span>      }<a name="line.117"></a>
+<span class="sourceLineNo">118</span>      return false;<a name="line.118"></a>
+<span class="sourceLineNo">119</span>    }<a name="line.119"></a>
+<span class="sourceLineNo">120</span><a name="line.120"></a>
+<span class="sourceLineNo">121</span>    // TODO: Use better method for determining stamp of last major (HBASE-2990)<a name="line.121"></a>
+<span class="sourceLineNo">122</span>    long lowTimestamp = StoreUtils.getLowestTimestamp(filesToCompact);<a name="line.122"></a>
+<span class="sourceLineNo">123</span>    long now = EnvironmentEdgeManager.currentTime();<a name="line.123"></a>
+<span class="sourceLineNo">124</span>    if (lowTimestamp &lt;= 0L || lowTimestamp &gt;= (now - mcTime)) {<a name="line.124"></a>
+<span class="sourceLineNo">125</span>      if (LOG.isDebugEnabled()) {<a name="line.125"></a>
+<span class="sourceLineNo">126</span>        LOG.debug("lowTimestamp: " + lowTimestamp + " lowTimestamp: " + lowTimestamp + " now: " +<a name="line.126"></a>
+<span class="sourceLineNo">127</span>            now + " mcTime: " + mcTime); <a name="line.127"></a>
+<span class="sourceLineNo">128</span>      }<a name="line.128"></a>
+<span class="sourceLineNo">129</span>      return false;<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>    long cfTTL = this.storeConfigInfo.getStoreFileTtl();<a name="line.132"></a>
+<span class="sourceLineNo">133</span>    HDFSBlocksDistribution hdfsBlocksDistribution = new HDFSBlocksDistribution();<a name="line.133"></a>
+<span class="sourceLineNo">134</span>    List&lt;Long&gt; boundaries = getCompactBoundariesForMajor(filesToCompact, now);<a name="line.134"></a>
+<span class="sourceLineNo">135</span>    boolean[] filesInWindow = new boolean[boundaries.size()];<a name="line.135"></a>
+<span class="sourceLineNo">136</span><a name="line.136"></a>
+<span class="sourceLineNo">137</span>    for (StoreFile file: filesToCompact) {<a name="line.137"></a>
+<span class="sourceLineNo">138</span>      Long minTimestamp = file.getMinimumTimestamp();<a name="line.138"></a>
+<span class="sourceLineNo">139</span>      long oldest = (minTimestamp == null) ? Long.MIN_VALUE : now - minTimestamp.longValue();<a name="line.139"></a>
+<span class="sourceLineNo">140</span>      if (cfTTL != Long.MAX_VALUE &amp;&amp; oldest &gt;= cfTTL) {<a name="line.140"></a>
+<span class="sourceLineNo">141</span>        LOG.debug("Major compaction triggered on store " + this<a name="line.141"></a>
+<span class="sourceLineNo">142</span>          + "; for TTL maintenance");<a name="line.142"></a>
+<span class="sourceLineNo">143</span>        return true;<a name="line.143"></a>
+<span class="sourceLineNo">144</span>      }<a name="line.144"></a>
+<span class="sourceLineNo">145</span>      if (!file.isMajorCompaction() || file.isBulkLoadResult()) {<a name="line.145"></a>
+<span class="sourceLineNo">146</span>        LOG.debug("Major compaction triggered on store " + this<a name="line.146"></a>
+<span class="sourceLineNo">147</span>          + ", because there are new files and time since last major compaction "<a name="line.147"></a>
+<span class="sourceLineNo">148</span>          + (now - lowTimestamp) + "ms");<a name="line.148"></a>
+<span class="sourceLineNo">149</span>        return true;<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>
+<span class="sourceLineNo">152</span>      int lowerWindowIndex = Collections.binarySearch(boundaries,<a name="line.152"></a>
+<span class="sourceLineNo">153</span>        minTimestamp == null ? (Long)Long.MAX_VALUE : minTimestamp);<a name="line.153"></a>
+<span class="sourceLineNo">154</span>      int upperWindowIndex = Collections.binarySearch(boundaries,<a name="line.154"></a>
+<span class="sourceLineNo">155</span>        file.getMaximumTimestamp() == null ? (Long)Long.MAX_VALUE : file.getMaximumTimestamp());<a name="line.155"></a>
+<span class="sourceLineNo">156</span>      if (lowerWindowIndex != upperWindowIndex) {<a name="line.156"></a>
+<span class="sourceLineNo">157</span>        LOG.debug("Major compaction triggered on store " + this + "; because file "<a name="line.157"></a>
+<span class="sourceLineNo">158</span>          + file.getPath() + " has data with timestamps cross window boundaries");<a name="line.158"></a>
+<span class="sourceLineNo">159</span>        return true;<a name="line.159"></a>
+<span class="sourceLineNo">160</span>      } else if (filesInWindow[upperWindowIndex]) {<a name="line.160"></a>
+<span class="sourceLineNo">161</span>        LOG.debug("Major compaction triggered on store " + this +<a name="line.161"></a>
+<span class="sourceLineNo">162</span>          "; because there are more than one file in some windows");<a name="line.162"></a>
+<span class="sourceLineNo">163</span>        return true;<a name="line.163"></a>
+<span class="sourceLineNo">164</span>      } else {<a name="line.164"></a>
+<span class="sourceLineNo">165</span>        filesInWindow[upperWindowIndex] = true;<a name="line.165"></a>
+<span class="sourceLineNo">166</span>      }<a name="line.166"></a>
+<span class="sourceLineNo">167</span>      hdfsBlocksDistribution.add(file.getHDFSBlockDistribution());<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>    float blockLocalityIndex = hdfsBlocksDistribution<a name="line.170"></a>
+<span class="sourceLineNo">171</span>        .getBlockLocalityIndex(RSRpcServices.getHostname(comConf.conf, false));<a name="line.171"></a>
+<span class="sourceLineNo">172</span>    if (blockLocalityIndex &lt; comConf.getMinLocalityToForceCompact()) {<a name="line.172"></a>
+<span class="sourceLineNo">173</span>      LOG.debug("Major compaction triggered on store " + this<a name="line.173"></a>
+<span class="sourceLineNo">174</span>        + "; to make hdfs blocks local, current blockLocalityIndex is "<a name="line.174"></a>
+<span class="sourceLineNo">175</span>        + blockLocalityIndex + " (min " + comConf.getMinLocalityToForceCompact() + ")");<a name="line.175"></a>
+<span class="sourceLineNo">176</span>      return true;<a name="line.176"></a>
+<span class="sourceLineNo">177</span>    }<a name="line.177"></a>
+<span class="sourceLineNo">178</span><a name="line.178"></a>
+<span class="sourceLineNo">179</span>    LOG.debug("Skipping major compaction of " + this +<a name="line.179"></a>
+<span class="sourceLineNo">180</span>      ", because the files are already major compacted");<a name="line.180"></a>
+<span class="sourceLineNo">181</span>    return false;<a name="line.181"></a>
+<span class="sourceLineNo">182</span>  }<a name="line.182"></a>
+<span class="sourceLineNo">183</span><a name="line.183"></a>
+<span class="sourceLineNo">184</span>  @Override<a name="line.184"></a>
+<span class="sourceLineNo">185</span>  protected CompactionRequest createCompactionRequest(ArrayList&lt;StoreFile&gt; candidateSelection,<a name="line.185"></a>
+<span class="sourceLineNo">186</span>    boolean tryingMajor, boolean mayUseOffPeak, boolean mayBeStuck) throws IOException {<a name="line.186"></a>
+<span class="sourceLineNo">187</span>    CompactionRequest result = tryingMajor ? selectMajorCompaction(candidateSelection)<a name="line.187"></a>
+<span class="sourceLineNo">188</span>      : selectMinorCompaction(candidateSelection, mayUseOffPeak, mayBeStuck);<a name="line.188"></a>
+<span class="sourceLineNo">189</span>    if (LOG.isDebugEnabled()) {<a name="line.189"></a>
+<span class="sourceLineNo">190</span>      LOG.debug("Generated compaction request: " + result);<a name="line.190"></a>
+<span class="sourceLineNo">191</span>    }<a name="line.191"></a>
+<span class="sourceLineNo">192</span>    return result;<a name="line.192"></a>
+<span class="sourceLineNo">193</span>  }<a name="line.193"></a>
+<span class="sourceLineNo">194</span><a name="line.194"></a>
+<span class="sourceLineNo">195</span>  public CompactionRequest selectMajorCompaction(ArrayList&lt;StoreFile&gt; candidateSelection) {<a name="line.195"></a>
+<span class="sourceLineNo">196</span>    long now = EnvironmentEdgeManager.currentTime();<a name="line.196"></a>
+<span class="sourceLineNo">197</span>    return new DateTieredCompactionRequest(candidateSelection,<a name="line.197"></a>
+<span class="sourceLineNo">198</span>      this.getCompactBoundariesForMajor(candidateSelection, now));<a name="line.198"></a>
+<span class="sourceLineNo">199</span>  }<a name="line.199"></a>
+<span class="sourceLineNo">200</span><a name="line.200"></a>
+<span class="sourceLineNo">201</span>  /**<a name="line.201"></a>
+<span class="sourceLineNo">202</span>   * We receive store files sorted in ascending order by seqId then scan the list of files. If the<a name="line.202"></a>
+<span class="sourceLineNo">203</span>   * current file has a maxTimestamp older than last known maximum, treat this file as it carries<a name="line.203"></a>
+<span class="sourceLineNo">204</span>   * the last known maximum. This way both seqId and timestamp are in the same order. If files carry<a name="line.204"></a>
+<span class="sourceLineNo">205</span>   * the same maxTimestamps, they are ordered by seqId. We then reverse the list so they are ordered<a name="line.205"></a>
+<span class="sourceLineNo">206</span>   * by seqId and maxTimestamp in descending order and build the time windows. All the out-of-order<a name="line.206"></a>
+<span class="sourceLineNo">207</span>   * data into the same compaction windows, guaranteeing contiguous compaction based on sequence id.<a name="line.207"></a>
+<span class="sourceLineNo">208</span>   */<a name="line.208"></a>
+<span class="sourceLineNo">209</span>  public CompactionRequest selectMinorCompaction(ArrayList&lt;StoreFile&gt; candidateSelection,<a name="line.209"></a>
+<span class="sourceLineNo">210</span>      boolean mayUseOffPeak, boolean mayBeStuck) throws IOException {<a name="line.210"></a>
+<span class="sourceLineNo">211</span>    long now = EnvironmentEdgeManager.currentTime();<a name="line.211"></a>
+<span class="sourceLineNo">212</span>    long oldestToCompact = getOldestToCompact(comConf.getDateTieredMaxStoreFileAgeMillis(), now);<a name="line.212"></a>
+<span class="sourceLineNo">213</span><a name="line.213"></a>
+<span class="sourceLineNo">214</span>    List&lt;Pair&lt;StoreFile, Long&gt;&gt; storefileMaxTimestampPairs =<a name="line.214"></a>
+<span class="sourceLineNo">215</span>        Lists.newArrayListWithCapacity(candidateSelection.size());<a name="line.215"></a>
+<span class="sourceLineNo">216</span>    long maxTimestampSeen = Long.MIN_VALUE;<a name="line.216"></a>
+<span class="sourceLineNo">217</span>    for (StoreFile storeFile : candidateSelection) {<a name="line.217"></a>
+<span class="sourceLineNo">218</span>      // if there is out-of-order data,<a name="line.218"></a>
+<span class="sourceLineNo">219</span>      // we put them in the same window as the last file in increasing order<a name="line.219"></a>
+<span class="sourceLineNo">220</span>      maxTimestampSeen = Math.max(maxTimestampSeen,<a name="line.220"></a>
+<span class="sourceLineNo">221</span>        storeFile.getMaximumTimestamp() == null? Long.MIN_VALUE : storeFile.getMaximumTimestamp());<a name="line.221"></a>
+<span class="sourceLineNo">222</span>      storefileMaxTimestampPairs.add(new Pair&lt;StoreFile, Long&gt;(storeFile, maxTimestampSeen));<a name="line.222"></a>
+<span class="sourceLineNo">223</span>    }<a name="line.223"></a>
+<span class="sourceLineNo">224</span>    Collections.reverse(storefileMaxTimestampPairs);<a name="line.224"></a>
+<span class="sourceLineNo">225</span><a name="line.225"></a>
+<span class="sourceLineNo">226</span>    CompactionWindow window = getIncomingWindow(now);<a name="line.226"></a>
+<span class="sourceLineNo">227</span>    int minThreshold = comConf.getDateTieredIncomingWindowMin();<a name="line.227"></a>
+<span class="sourceLineNo">228</span>    PeekingIterator&lt;Pair&lt;StoreFile, Long&gt;&gt; it =<a name="line.228"></a>
+<span class="sourceLineNo">229</span>        Iterators.peekingIterator(storefileMaxTimestampPairs.iterator());<a name="line.229"></a>
+<span class="sourceLineNo">230</span>    while (it.hasNext()) {<a name="line.230"></a>
+<span class="sourceLineNo">231</span>      if (window.compareToTimestamp(oldestToCompact) &lt; 0) {<a name="line.231"></a>
+<span class="sourceLineNo">232</span>        break;<a name="line.232"></a>
+<span class="sourceLineNo">233</span>      }<a name="line.233"></a>
+<span class="sourceLineNo">234</span>      int compResult = window.compareToTimestamp(it.peek().getSecond());<a name="line.234"></a>
+<span class="sourceLineNo">235</span>      if (compResult &gt; 0) {<a name="line.235"></a>
+<span class="sourceLineNo">236</span>        // If the file is too old for the window, switch to the next window<a name="line.236"></a>
+<span class="sourceLineNo">237</span>        window = window.nextEarlierWindow();<a name="line.237"></a>
+<span class="sourceLineNo">238</span>        minThreshold = comConf.getMinFilesToCompact();<a name="line.238"></a>
+<span class="sourceLineNo">239</span>      } else {<a name="line.239"></a>
+<span class="sourceLineNo">240</span>        // The file is within the target window<a name="line.240"></a>
+<span class="sourceLineNo">241</span>        ArrayList&lt;StoreFile&gt; fileList = Lists.newArrayList();<a name="line.241"></a>
+<span class="sourceLineNo">242</span>        // Add all files in the same window. For incoming window<a name="line.242"></a>
+<span class="sourceLineNo">243</span>        // we tolerate files with future data although it is sub-optimal<a name="line.243"></a>
+<span class="sourceLineNo">244</span>        while (it.hasNext() &amp;&amp; window.compareToTimestamp(it.peek().getSecond()) &lt;= 0) {<a name="line.244"></a>
+<span class="sourceLineNo">245</span>          fileList.add(it.next().getFirst());<a name="line.245"></a>
+<span class="sourceLineNo">246</span>        }<a name="line.246"></a>
+<span class="sourceLineNo">247</span>        if (fileList.size() &gt;= minThreshold) {<a name="line.247"></a>
+<span class="sourceLineNo">248</span>          if (LOG.isDebugEnabled()) {<a name="line.248"></a>
+<span class="sourceLineNo">249</span>            LOG.debug("Processing files: " + fileList + " for window: " + window);<a name="line.249"></a>
+<span class="sourceLineNo">250</span>          }<a name="line.250"></a>
+<span class="sourceLineNo">251</span>          DateTieredCompactionRequest request = generateCompactionRequest(fileList, window,<a name="line.251"></a>
+<span class="sourceLineNo">252</span>            mayUseOffPeak, mayBeStuck, minThreshold);<a name="line.252"></a>
+<span class="sourceLineNo">253</span>          if (request != null) {<a name="line.253"></a>
+<span class="sourceLineNo">254</span>            return request;<a name="line.254"></a>
+<span class="sourceLineNo">255</span>          }<a name="line.255"></a>
+<span class="sourceLineNo">256</span>        }<a name="line.256"></a>
+<span class="sourceLineNo">257</span>      }<a name="line.257"></a>
+<span class="sourceLineNo">258</span>    }<a name="line.258"></a>
+<span class="sourceLineNo">259</span>    // A non-null file list is expected by HStore<a name="line.259"></a>
+<span class="sourceLineNo">260</span>    return new CompactionRequest(Collections.&lt;StoreFile&gt; emptyList());<a name="line.260"></a>
+<span class="sourceLineNo">261</span>  }<a name="line.261"></a>
 <span class="sourceLineNo">262</span><a name="line.262"></a>
-<span class="sourceLineNo">263</span>    // Compact everything in the window if have more files than comConf.maxBlockingFiles<a name="line.263"></a>
-<span class="sourceLineNo">264</span>    compactionPolicyPerWindow.setMinThreshold(minThreshold);<a name="line.264"></a>
-<span class="sourceLineNo">265</span>    ArrayList&lt;StoreFile&gt; storeFileSelection = mayBeStuck ? storeFiles<a name="line.265"></a>
-<span class="sourceLineNo">266</span>      : compactionPolicyPerWindow.applyCompactionPolicy(storeFiles, mayUseOffPeak, false);<a name="line.266"></a>
-<span class="sourceLineNo">267</span>    if (storeFileSelection != null &amp;&amp; !storeFileSelection.isEmpty()) {<a name="line.267"></a>
-<span class="sourceLineNo">268</span>      // If there is any file in the window excluded from compaction,<a name="line.268"></a>
-<span class="sourceLineNo">269</span>      // only one file will be output from compaction.<a name="line.269"></a>
-<span class="sourceLineNo">270</span>      boolean singleOutput = storeFiles.size() != storeFileSelection.size() ||<a name="line.270"></a>
-<span class="sourceLineNo">271</span>        comConf.useDateTieredSingleOutputForMinorCompaction();<a name="line.271"></a>
-<span class="sourceLineNo">272</span>      List&lt;Long&gt; boundaries = getCompactionBoundariesForMinor(window, singleOutput);<a name="line.272"></a>
-<span class="sourceLineNo">273</span>      DateTieredCompactionRequest result = new DateTieredCompactionRequest(storeFileSelection,<a name="line.273"></a>
-<span class="sourceLineNo">274</span>        boundaries);<a name="line.274"></a>
-<span class="sourceLineNo">275</span>      return result;<a name="line.275"></a>
-<span class="sourceLineNo">276</span>    }<a name="line.276"></a>
-<span class="sourceLineNo">277</span>    return null;<a name="line.277"></a>
-<span class="sourceLineNo">278</span>  }<a name="line.278"></a>
-<span class="sourceLineNo">279</span><a name="line.279"></a>
-<span class="sourceLineNo">280</span>  /**<a name="line.280"></a>
-<span class="sourceLineNo">281</span>   * Return a list of boundaries for multiple compaction output<a name="line.281"></a>
-<span class="sourceLineNo">282</span>   *   in ascending order.<a name="line.282"></a>
-<span class="sourceLineNo">283</span>   */<a name="line.283"></a>
-<span class="sourceLineNo">284</span>  private List&lt;Long&gt; getCompactBoundariesForMajor(Collection&lt;StoreFile&gt; filesToCompact, long now) {<a name="line.284"></a>
-<span class="sourceLineNo">285</span>    long minTimestamp = Long.MAX_VALUE;<a name="line.285"></a>
-<span class="sourceLineNo">286</span>    for (StoreFile file : filesToCompact) {<a name="line.286"></a>
-<span class="sourceLineNo">287</span>      minTimestamp =<a name="line.287"></a>
-<span class="sourceLineNo">288</span>        Math.min(minTimestamp,<a name="line.288"></a>
-<span class="sourceLineNo">289</span>          file.getMinimumTimestamp() == null ? Long.MAX_VALUE : file.getMinimumTimestamp());<a name="line.289"></a>
-<span class="sourceLineNo">290</span>    }<a name="line.290"></a>
-<span class="sourceLineNo">291</span><a name="line.291"></a>
-<span class="sourceLineNo">292</span>    List&lt;Long&gt; boundaries = new ArrayList&lt;Long&gt;();<a name="line.292"></a>
-<span class="sourceLineNo">293</span><a name="line.293"></a>
-<span class="sourceLineNo">294</span>    // Add startMillis of all windows between now and min timestamp<a name="line.294"></a>
-<span class="sourceLineNo">295</span>    for (CompactionWindow window = getIncomingWindow(now);<a name="line.295"></a>
-<span class="sourceLineNo">296</span>        window.compareToTimestamp(minTimestamp) &gt; 0;<a name="line.296"></a>
-<span class="sourceLineNo">297</span>        window = window.nextEarlierWindow()) {<a name="line.297"></a>
-<span class="sourceLineNo">298</span>      boundaries.add(window.startMillis());<a name="line.298"></a>
-<span class="sourceLineNo">299</span>    }<a name="line.299"></a>
-<span class="sourceLineNo">300</span>    boundaries.add(Long.MIN_VALUE);<a name="line.300"></a>
-<span class="sourceLineNo">301</span>    Collections.reverse(boundaries);<a name="line.301"></a>
-<span class="sourceLineNo">302</span>    return boundaries;<a name="line.302"></a>
-<span class="sourceLineNo">303</span>  }<a name="line.303"></a>
-<span class="sourceLineNo">304</span><a name="line.304"></a>
-<span class="sourceLineNo">305</span>  /**<a name="line.305"></a>
-<span class="sourceLineNo">306</span>   * @return a list of boundaries for multiple compaction output from minTimestamp to maxTimestamp.<a name="line.306"></a>
-<span class="sourceLineNo">307</span>   */<a name="line.307"></a>
-<span class="sourceLineNo">308</span>  private static List&lt;Long&gt; getCompactionBoundariesForMinor(CompactionWindow window,<a name="line.308"></a>
-<span class="sourceLineNo">309</span>      boolean singleOutput) {<a name="line.309"></a>
-<span class="sourceLineNo">310</span>    List&lt;Long&gt; boundaries = new ArrayList&lt;Long&gt;();<a name="line.310"></a>
-<span class="sourceLineNo">311</span>    boundaries.add(Long.MIN_VALUE);<a name="line.311"></a>
-<span class="sourceLineNo">312</span>    if (!singleOutput) {<a name="line.312"></a>
-<span class="sourceLineNo">313</span>      boundaries.add(window.startMillis());<a name="line.313"></a>
-<span class="sourceLineNo">314</span>    }<a name="line.314"></a>
-<span class="sourceLineNo">315</span>    return boundaries;<a name="line.315"></a>
-<span class="sourceLineNo">316</span>  }<a name="line.316"></a>
-<span class="sourceLineNo">317</span><a name="line.317"></a>
-<span class="sourceLineNo">318</span>  private CompactionWindow getIncomingWindow(long now) {<a name="line.318"></a>
-<span class="sourceLineNo">319</span>    return windowFactory.newIncomingWindow(now);<a name="line.319"></a>
-<span class="sourceLineNo">320</span>  }<a name="line.320"></a>
-<span class="sourceLineNo">321</span><a name="line.321"></a>
-<span class="sourceLineNo">322</span>  private static long getOldestToCompact(long maxAgeMillis, long now) {<a name="line.322"></a>
-<span class="sourceLineNo">323</span>    try {<a name="line.323"></a>
-<span class="sourceLineNo">324</span>      return LongMath.checkedSubtract(now, maxAgeMillis);<a name="line.324"></a>
-<span class="sourceLineNo">325</span>    } catch (ArithmeticException ae) {<a name="line.325"></a>
-<span class="sourceLineNo">326</span>      LOG.warn("Value for " + CompactionConfiguration.DATE_TIERED_MAX_AGE_MILLIS_KEY + ": "<a name="line.326"></a>
-<span class="sourceLineNo">327</span>          + maxAgeMillis + ". All the files will be eligible for minor compaction.");<a name="line.327"></a>
-<span class="sourceLineNo">328</span>      return Long.MIN_VALUE;<a name="line.328"></a>
-<span class="sourceLineNo">329</span>    }<a name="line.329"></a>
-<span class="sourceLineNo">330</span>  }<a name="line.330"></a>
-<span class="sourceLineNo">331</span>}<a name="line.331"></a>
+<span class="sourceLineNo">263</span>  private DateTieredCompactionRequest generateCompactionRequest(ArrayList&lt;StoreFile&gt; storeFiles,<a name="line.263"></a>
+<span class="sourceLineNo">264</span>      CompactionWindow window, boolean mayUseOffPeak, boolean mayBeStuck, int minThreshold)<a name="line.264"></a>
+<span class="sourceLineNo">265</span>      throws IOException {<a name="line.265"></a>
+<span class="sourceLineNo">266</span>    // The files has to be in ascending order for ratio-based compaction to work right<a name="line.266"></a>
+<span class="sourceLineNo">267</span>    // and removeExcessFile to exclude youngest files.<a name="line.267"></a>
+<span class="sourceLineNo">268</span>    Collections.reverse(storeFiles);<a name="line.268"></a>
+<span class="sourceLineNo">269</span><a name="line.269"></a>
+<span class="sourceLineNo">270</span>    // Compact everything in the window if have more files than comConf.maxBlockingFiles<a name="line.270"></a>
+<span class="sourceLineNo">271</span>    compactionPolicyPerWindow.setMinThreshold(minThreshold);<a name="line.271"></a>
+<span class="sourceLineNo">272</span>    ArrayList&lt;StoreFile&gt; storeFileSelection = mayBeStuck ? storeFiles<a name="line.272"></a>
+<span class="sourceLineNo">273</span>      : compactionPolicyPerWindow.applyCompactionPolicy(storeFiles, mayUseOffPeak, false);<a name="line.273"></a>
+<span class="sourceLineNo">274</span>    if (storeFileSelection != null &amp;&amp; !storeFileSelection.isEmpty()) {<a name="line.274"></a>
+<span class="sourceLineNo">275</span>      // If there is any file in the window excluded from compaction,<a name="line.275"></a>
+<span class="sourceLineNo">276</span>      // only one file will be output from compaction.<a name="line.276"></a>
+<span class="sourceLineNo">277</span>      boolean singleOutput = storeFiles.size() != storeFileSelection.size() ||<a name="line.277"></a>
+<span class="sourceLineNo">278</span>        comConf.useDateTieredSingleOutputForMinorCompaction();<a name="line.278"></a>
+<span class="sourceLineNo">279</span>      List&lt;Long&gt; boundaries = getCompactionBoundariesForMinor(window, singleOutput);<a name="line.279"></a>
+<span class="sourceLineNo">280</span>      DateTieredCompactionRequest result = new DateTieredCompactionRequest(storeFileSelection,<a name="line.280"></a>
+<span class="sourceLineNo">281</span>        boundaries);<a name="line.281"></a>
+<span class="sourceLineNo">282</span>      return result;<a name="line.282"></a>
+<span class="sourceLineNo">283</span>    }<a name="line.283"></a>
+<span class="sourceLineNo">284</span>    return null;<a name="line.284"></a>
+<span class="sourceLineNo">285</span>  }<a name="line.285"></a>
+<span class="sourceLineNo">286</span><a name="line.286"></a>
+<span class="sourceLineNo">287</span>  /**<a name="line.287"></a>
+<span class="sourceLineNo">288</span>   * Return a list of boundaries for multiple compaction output<a name="line.288"></a>
+<span class="sourceLineNo">289</span>   *   in ascending order.<a name="line.289"></a>
+<span class="sourceLineNo">290</span>   */<a name="line.290"></a>
+<span class="sourceLineNo">291</span>  private List&lt;Long&gt; getCompactBoundariesForMajor(Collection&lt;StoreFile&gt; filesToCompact, long now) {<a name="line.291"></a>
+<span class="sourceLineNo">292</span>    long minTimestamp = Long.MAX_VALUE;<a name="line.292"></a>
+<span class="sourceLineNo">293</span>    for (StoreFile file : filesToCompact) {<a name="line.293"></a>
+<span class="sourceLineNo">294</span>      minTimestamp =<a name="line.294"></a>
+<span class="sourceLineNo">295</span>        Math.min(minTimestamp,<a name="line.295"></a>
+<span class="sourceLineNo">296</span>          file.getMinimumTimestamp() == null ? Long.MAX_VALUE : file.getMinimumTimestamp());<a name="line.296"></a>
+<span class="sourceLineNo">297</span>    }<a name="line.297"></a>
+<span class="sourceLineNo">298</span><a name="line.298"></a>
+<span class="sourceLineNo">299</span>    List&lt;Long&gt; boundaries = new ArrayList&lt;Long&gt;();<a name="line.299"></a>
+<span class="sourceLineNo">300</span><a name="line.300"></a>
+<span class="sourceLineNo">301</span>    // Add startMillis of all windows between now and min timestamp<a name="line.301"></a>
+<span class="sourceLineNo">302</span>    for (CompactionWindow window = getIncomingWindow(now);<a name="line.302"></a>
+<span class="sourceLineNo">303</span>        window.compareToTimestamp(minTimestamp) &gt; 0;<a name="line.303"></a>
+<span class="sourceLineNo">304</span>        window = window.nextEarlierWindow()) {<a name="line.304"></a>
+<span class="sourceLineNo">305</span>      boundaries.add(window.startMillis());<a name="line.305"></a>
+<span class="sourceLineNo">306</span>    }<a name="line.306"></a>
+<span class="sourceLineNo">307</span>    boundaries.add(Long.MIN_VALUE);<a name="line.307"></a>
+<span class="sourceLineNo">308</span>    Collections.reverse(boundaries);<a name="line.308"></a>
+<span class="sourceLineNo">309</span>    return boundaries;<a name="line.309"></a>
+<span class="sourceLineNo">310</span>  }<a name="line.310"></a>
+<span class="sourceLineNo">311</span><a name="line.311"></a>
+<span class="sourceLineNo">312</span>  /**<a name="line.312"></a>
+<span class="sourceLineNo">313</span>   * @return a list of boundaries for multiple compaction output from minTimestamp to maxTimestamp.<a name="line.313"></a>
+<span class="sourceLineNo">314</span>   */<a name="line.314"></a>
+<span class="sourceLineNo">315</span>  private static List&lt;Long&gt; getCompactionBoundariesForMinor(CompactionWindow window,<a name="line.315"></a>
+<span class="sourceLineNo">316</span>      boolean singleOutput) {<a name="line.316"></a>
+<span class="sourceLineNo">317</span>    List&lt;Long&gt; boundaries = new ArrayList&lt;Long&gt;();<a name="line.317"></a>
+<span class="sourceLineNo">318</span>    boundaries.add(Long.MIN_VALUE);<a name="line.318"></a>
+<span class="sourceLineNo">319</span>    if (!singleOutput) {<a name="line.319"></a>
+<span class="sourceLineNo">320</span>      boundaries.add(window.startMillis());<a name="line.320"></a>
+<span class="sourceLineNo">321</span>    }<a name="line.321"></a>
+<span class="sourceLineNo">322</span>    return boundaries;<a name="line.322"></a>
+<span class="sourceLineNo">323</span>  }<a name="line.323"></a>
+<span class="sourceLineNo">324</span><a name="line.324"></a>
+<span class="sourceLineNo">325</span>  private CompactionWindow getIncomingWindow(long now) {<a name="line.325"></a>
+<span class="sourceLineNo">326</span>    return windowFactory.newIncomingWindow(now);<a name="line.326"></a>
+<span class="sourceLineNo">327</span>  }<a name="line.327"></a>
+<span class="sourceLineNo">328</span><a name="line.328"></a>
+<span class="sourceLineNo">329</span>  private static long getOldestToCompact(long maxAgeMillis, long now) {<a name="line.329"></a>
+<span class="sourceLineNo">330</span>    try {<a name="line.330"></a>
+<span class="sourceLineNo">331</span>      return LongMath.checkedSubtract(now, maxAgeMillis);<a name="line.331"></a>
+<span class="sourceLineNo">332</span>    } catch (ArithmeticException ae) {<a name="line.332"></a>
+<span class="sourceLineNo">333</span>      LOG.warn("Value for " + CompactionConfiguration.DATE_TIERED_MAX_AGE_MILLIS_KEY + ": "<a name="line.333"></a>
+<span class="sourceLineNo">334</span>          + maxAgeMillis + ". All the files will be eligible for minor compaction.");<a name="line.334"></a>
+<span class="sourceLineNo">335</span>      return Long.MIN_VALUE;<a name="line.335"></a>
+<span class="sourceLineNo">336</span>    }<a name="line.336"></a>
+<span class="sourceLineNo">337</span>  }<a name="line.337"></a>
+<span class="sourceLineNo">338</span>}<a name="line.338"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/4131cace/devapidocs/src-html/org/apache/hadoop/hbase/rest/client/RemoteHTable.Scanner.Iter.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/rest/client/RemoteHTable.Scanner.Iter.html b/devapidocs/src-html/org/apache/hadoop/hbase/rest/client/RemoteHTable.Scanner.Iter.html
index 97dce02..9064565 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/rest/client/RemoteHTable.Scanner.Iter.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/rest/client/RemoteHTable.Scanner.Iter.html
@@ -856,7 +856,27 @@
 <span class="sourceLineNo">848</span>      CompareOp compareOp, byte[] value, RowMutations rm) throws IOException {<a name="line.848"></a>
 <span class="sourceLineNo">849</span>    throw new UnsupportedOperationException("checkAndMutate not implemented");<a name="line.849"></a>
 <span class="sourceLineNo">850</span>  }<a name="line.850"></a>
-<span class="sourceLineNo">851</span>}<a name="line.851"></a>
+<span class="sourceLineNo">851</span><a name="line.851"></a>
+<span class="sourceLineNo">852</span>  @Override<a name="line.852"></a>
+<span class="sourceLineNo">853</span>  public void setOperationTimeout(int operationTimeout) {<a name="line.853"></a>
+<span class="sourceLineNo">854</span>    throw new UnsupportedOperationException();<a name="line.854"></a>
+<span class="sourceLineNo">855</span>  }<a name="line.855"></a>
+<span class="sourceLineNo">856</span><a name="line.856"></a>
+<span class="sourceLineNo">857</span>  @Override<a name="line.857"></a>
+<span class="sourceLineNo">858</span>  public int getOperationTimeout() {<a name="line.858"></a>
+<span class="sourceLineNo">859</span>    throw new UnsupportedOperationException();<a name="line.859"></a>
+<span class="sourceLineNo">860</span>  }<a name="line.860"></a>
+<span class="sourceLineNo">861</span><a name="line.861"></a>
+<span class="sourceLineNo">862</span>  @Override<a name="line.862"></a>
+<span class="sourceLineNo">863</span>  public void setRpcTimeout(int rpcTimeout) {<a name="line.863"></a>
+<span class="sourceLineNo">864</span>    throw new UnsupportedOperationException();<a name="line.864"></a>
+<span class="sourceLineNo">865</span>  }<a name="line.865"></a>
+<span class="sourceLineNo">866</span><a name="line.866"></a>
+<span class="sourceLineNo">867</span>  @Override<a name="line.867"></a>
+<span class="sourceLineNo">868</span>  public int getRpcTimeout() {<a name="line.868"></a>
+<span class="sourceLineNo">869</span>    throw new UnsupportedOperationException();<a name="line.869"></a>
+<span class="sourceLineNo">870</span>  }<a name="line.870"></a>
+<span class="sourceLineNo">871</span>}<a name="line.871"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/4131cace/devapidocs/src-html/org/apache/hadoop/hbase/rest/client/RemoteHTable.Scanner.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/rest/client/RemoteHTable.Scanner.html b/devapidocs/src-html/org/apache/hadoop/hbase/rest/client/RemoteHTable.Scanner.html
index 97dce02..9064565 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/rest/client/RemoteHTable.Scanner.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/rest/client/RemoteHTable.Scanner.html
@@ -856,7 +856,27 @@
 <span class="sourceLineNo">848</span>      CompareOp compareOp, byte[] value, RowMutations rm) throws IOException {<a name="line.848"></a>
 <span class="sourceLineNo">849</span>    throw new UnsupportedOperationException("checkAndMutate not implemented");<a name="line.849"></a>
 <span class="sourceLineNo">850</span>  }<a name="line.850"></a>
-<span class="sourceLineNo">851</span>}<a name="line.851"></a>
+<span class="sourceLineNo">851</span><a name="line.851"></a>
+<span class="sourceLineNo">852</span>  @Override<a name="line.852"></a>
+<span class="sourceLineNo">853</span>  public void setOperationTimeout(int operationTimeout) {<a name="line.853"></a>
+<span class="sourceLineNo">854</span>    throw new UnsupportedOperationException();<a name="line.854"></a>
+<span class="sourceLineNo">855</span>  }<a name="line.855"></a>
+<span class="sourceLineNo">856</span><a name="line.856"></a>
+<span class="sourceLineNo">857</span>  @Override<a name="line.857"></a>
+<span class="sourceLineNo">858</span>  public int getOperationTimeout() {<a name="line.858"></a>
+<span class="sourceLineNo">859</span>    throw new UnsupportedOperationException();<a name="line.859"></a>
+<span class="sourceLineNo">860</span>  }<a name="line.860"></a>
+<span class="sourceLineNo">861</span><a name="line.861"></a>
+<span class="sourceLineNo">862</span>  @Override<a name="line.862"></a>
+<span class="sourceLineNo">863</span>  public void setRpcTimeout(int rpcTimeout) {<a name="line.863"></a>
+<span class="sourceLineNo">864</span>    throw new UnsupportedOperationException();<a name="line.864"></a>
+<span class="sourceLineNo">865</span>  }<a name="line.865"></a>
+<span class="sourceLineNo">866</span><a name="line.866"></a>
+<span class="sourceLineNo">867</span>  @Override<a name="line.867"></a>
+<span class="sourceLineNo">868</span>  public int getRpcTimeout() {<a name="line.868"></a>
+<span class="sourceLineNo">869</span>    throw new UnsupportedOperationException();<a name="line.869"></a>
+<span class="sourceLineNo">870</span>  }<a name="line.870"></a>
+<span class="sourceLineNo">871</span>}<a name="line.871"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/4131cace/devapidocs/src-html/org/apache/hadoop/hbase/rest/client/RemoteHTable.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/rest/client/RemoteHTable.html b/devapidocs/src-html/org/apache/hadoop/hbase/rest/client/RemoteHTable.html
index 97dce02..9064565 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/rest/client/RemoteHTable.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/rest/client/RemoteHTable.html
@@ -856,7 +856,27 @@
 <span class="sourceLineNo">848</span>      CompareOp compareOp, byte[] value, RowMutations rm) throws IOException {<a name="line.848"></a>
 <span class="sourceLineNo">849</span>    throw new UnsupportedOperationException("checkAndMutate not implemented");<a name="line.849"></a>
 <span class="sourceLineNo">850</span>  }<a name="line.850"></a>
-<span class="sourceLineNo">851</span>}<a name="line.851"></a>
+<span class="sourceLineNo">851</span><a name="line.851"></a>
+<span class="sourceLineNo">852</span>  @Override<a name="line.852"></a>
+<span class="sourceLineNo">853</span>  public void setOperationTimeout(int operationTimeout) {<a name="line.853"></a>
+<span class="sourceLineNo">854</span>    throw new UnsupportedOperationException();<a name="line.854"></a>
+<span class="sourceLineNo">855</span>  }<a name="line.855"></a>
+<span class="sourceLineNo">856</span><a name="line.856"></a>
+<span class="sourceLineNo">857</span>  @Override<a name="line.857"></a>
+<span class="sourceLineNo">858</span>  public int getOperationTimeout() {<a name="line.858"></a>
+<span class="sourceLineNo">859</span>    throw new UnsupportedOperationException();<a name="line.859"></a>
+<span class="sourceLineNo">860</span>  }<a name="line.860"></a>
+<span class="sourceLineNo">861</span><a name="line.861"></a>
+<span class="sourceLineNo">862</span>  @Override<a name="line.862"></a>
+<span class="sourceLineNo">863</span>  public void setRpcTimeout(int rpcTimeout) {<a name="line.863"></a>
+<span class="sourceLineNo">864</span>    throw new UnsupportedOperationException();<a name="line.864"></a>
+<span class="sourceLineNo">865</span>  }<a name="line.865"></a>
+<span class="sourceLineNo">866</span><a name="line.866"></a>
+<span class="sourceLineNo">867</span>  @Override<a name="line.867"></a>
+<span class="sourceLineNo">868</span>  public int getRpcTimeout() {<a name="line.868"></a>
+<span class="sourceLineNo">869</span>    throw new UnsupportedOperationException();<a name="line.869"></a>
+<span class="sourceLineNo">870</span>  }<a name="line.870"></a>
+<span class="sourceLineNo">871</span>}<a name="line.871"></a>
 
 
 


Mime
View raw message