hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From git-site-r...@apache.org
Subject [12/33] hbase-site git commit: Published site at 82d554e3783372cc6b05489452c815b57c06f6cd.
Date Thu, 10 Aug 2017 22:30:02 GMT
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/99c53df1/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HStore.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HStore.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HStore.html
index f2ed401..29c147d 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HStore.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HStore.html
@@ -2494,127 +2494,143 @@
 <span class="sourceLineNo">2486</span>     return getRegionInfo().getReplicaId()
== HRegionInfo.DEFAULT_REPLICA_ID;<a name="line.2486"></a>
 <span class="sourceLineNo">2487</span>  }<a name="line.2487"></a>
 <span class="sourceLineNo">2488</span><a name="line.2488"></a>
-<span class="sourceLineNo">2489</span>  @Override<a name="line.2489"></a>
-<span class="sourceLineNo">2490</span>  public synchronized void closeAndArchiveCompactedFiles()
throws IOException {<a name="line.2490"></a>
-<span class="sourceLineNo">2491</span>    // ensure other threads do not attempt
to archive the same files on close()<a name="line.2491"></a>
-<span class="sourceLineNo">2492</span>    archiveLock.lock();<a name="line.2492"></a>
-<span class="sourceLineNo">2493</span>    try {<a name="line.2493"></a>
-<span class="sourceLineNo">2494</span>      lock.readLock().lock();<a name="line.2494"></a>
-<span class="sourceLineNo">2495</span>      Collection&lt;StoreFile&gt;
copyCompactedfiles = null;<a name="line.2495"></a>
-<span class="sourceLineNo">2496</span>      try {<a name="line.2496"></a>
-<span class="sourceLineNo">2497</span>        Collection&lt;StoreFile&gt;
compactedfiles =<a name="line.2497"></a>
-<span class="sourceLineNo">2498</span>            this.getStoreEngine().getStoreFileManager().getCompactedfiles();<a
name="line.2498"></a>
-<span class="sourceLineNo">2499</span>        if (compactedfiles != null &amp;&amp;
compactedfiles.size() != 0) {<a name="line.2499"></a>
-<span class="sourceLineNo">2500</span>          // Do a copy under read lock<a
name="line.2500"></a>
-<span class="sourceLineNo">2501</span>          copyCompactedfiles = new ArrayList&lt;&gt;(compactedfiles);<a
name="line.2501"></a>
-<span class="sourceLineNo">2502</span>        } else {<a name="line.2502"></a>
-<span class="sourceLineNo">2503</span>          if (LOG.isTraceEnabled()) {<a
name="line.2503"></a>
-<span class="sourceLineNo">2504</span>            LOG.trace("No compacted files
to archive");<a name="line.2504"></a>
-<span class="sourceLineNo">2505</span>            return;<a name="line.2505"></a>
-<span class="sourceLineNo">2506</span>          }<a name="line.2506"></a>
-<span class="sourceLineNo">2507</span>        }<a name="line.2507"></a>
-<span class="sourceLineNo">2508</span>      } finally {<a name="line.2508"></a>
-<span class="sourceLineNo">2509</span>        lock.readLock().unlock();<a
name="line.2509"></a>
-<span class="sourceLineNo">2510</span>      }<a name="line.2510"></a>
-<span class="sourceLineNo">2511</span>      if (copyCompactedfiles != null &amp;&amp;
!copyCompactedfiles.isEmpty()) {<a name="line.2511"></a>
-<span class="sourceLineNo">2512</span>        removeCompactedfiles(copyCompactedfiles);<a
name="line.2512"></a>
-<span class="sourceLineNo">2513</span>      }<a name="line.2513"></a>
-<span class="sourceLineNo">2514</span>    } finally {<a name="line.2514"></a>
-<span class="sourceLineNo">2515</span>      archiveLock.unlock();<a name="line.2515"></a>
-<span class="sourceLineNo">2516</span>    }<a name="line.2516"></a>
-<span class="sourceLineNo">2517</span>  }<a name="line.2517"></a>
-<span class="sourceLineNo">2518</span><a name="line.2518"></a>
-<span class="sourceLineNo">2519</span>  /**<a name="line.2519"></a>
-<span class="sourceLineNo">2520</span>   * Archives and removes the compacted
files<a name="line.2520"></a>
-<span class="sourceLineNo">2521</span>   * @param compactedfiles The compacted
files in this store that are not active in reads<a name="line.2521"></a>
-<span class="sourceLineNo">2522</span>   * @throws IOException<a name="line.2522"></a>
-<span class="sourceLineNo">2523</span>   */<a name="line.2523"></a>
-<span class="sourceLineNo">2524</span>  private void removeCompactedfiles(Collection&lt;StoreFile&gt;
compactedfiles)<a name="line.2524"></a>
-<span class="sourceLineNo">2525</span>      throws IOException {<a name="line.2525"></a>
-<span class="sourceLineNo">2526</span>    final List&lt;StoreFile&gt;
filesToRemove = new ArrayList&lt;&gt;(compactedfiles.size());<a name="line.2526"></a>
-<span class="sourceLineNo">2527</span>    for (final StoreFile file : compactedfiles)
{<a name="line.2527"></a>
-<span class="sourceLineNo">2528</span>      synchronized (file) {<a name="line.2528"></a>
-<span class="sourceLineNo">2529</span>        try {<a name="line.2529"></a>
-<span class="sourceLineNo">2530</span>          StoreFileReader r = file.getReader();<a
name="line.2530"></a>
-<span class="sourceLineNo">2531</span>          if (r == null) {<a name="line.2531"></a>
-<span class="sourceLineNo">2532</span>            if (LOG.isDebugEnabled()) {<a
name="line.2532"></a>
-<span class="sourceLineNo">2533</span>              LOG.debug("The file " + file
+ " was closed but still not archived.");<a name="line.2533"></a>
-<span class="sourceLineNo">2534</span>            }<a name="line.2534"></a>
-<span class="sourceLineNo">2535</span>            filesToRemove.add(file);<a
name="line.2535"></a>
-<span class="sourceLineNo">2536</span>            continue;<a name="line.2536"></a>
-<span class="sourceLineNo">2537</span>          }<a name="line.2537"></a>
-<span class="sourceLineNo">2538</span>          if (file.isCompactedAway() &amp;&amp;
!file.isReferencedInReads()) {<a name="line.2538"></a>
-<span class="sourceLineNo">2539</span>            // Even if deleting fails we
need not bother as any new scanners won't be<a name="line.2539"></a>
-<span class="sourceLineNo">2540</span>            // able to use the compacted
file as the status is already compactedAway<a name="line.2540"></a>
-<span class="sourceLineNo">2541</span>            if (LOG.isTraceEnabled()) {<a
name="line.2541"></a>
-<span class="sourceLineNo">2542</span>              LOG.trace("Closing and archiving
the file " + file.getPath());<a name="line.2542"></a>
-<span class="sourceLineNo">2543</span>            }<a name="line.2543"></a>
-<span class="sourceLineNo">2544</span>            r.close(true);<a name="line.2544"></a>
-<span class="sourceLineNo">2545</span>            // Just close and return<a
name="line.2545"></a>
-<span class="sourceLineNo">2546</span>            filesToRemove.add(file);<a
name="line.2546"></a>
-<span class="sourceLineNo">2547</span>          }<a name="line.2547"></a>
-<span class="sourceLineNo">2548</span>        } catch (Exception e) {<a name="line.2548"></a>
-<span class="sourceLineNo">2549</span>          LOG.error(<a name="line.2549"></a>
-<span class="sourceLineNo">2550</span>            "Exception while trying to
close the compacted store file " + file.getPath().getName());<a name="line.2550"></a>
-<span class="sourceLineNo">2551</span>        }<a name="line.2551"></a>
-<span class="sourceLineNo">2552</span>      }<a name="line.2552"></a>
-<span class="sourceLineNo">2553</span>    }<a name="line.2553"></a>
-<span class="sourceLineNo">2554</span>    if (this.isPrimaryReplicaStore()) {<a
name="line.2554"></a>
-<span class="sourceLineNo">2555</span>      // Only the primary region is allowed
to move the file to archive.<a name="line.2555"></a>
-<span class="sourceLineNo">2556</span>      // The secondary region does not
move the files to archive. Any active reads from<a name="line.2556"></a>
-<span class="sourceLineNo">2557</span>      // the secondary region will still
work because the file as such has active readers on it.<a name="line.2557"></a>
-<span class="sourceLineNo">2558</span>      if (!filesToRemove.isEmpty()) {<a
name="line.2558"></a>
-<span class="sourceLineNo">2559</span>        if (LOG.isDebugEnabled()) {<a
name="line.2559"></a>
-<span class="sourceLineNo">2560</span>          LOG.debug("Moving the files "
+ filesToRemove + " to archive");<a name="line.2560"></a>
-<span class="sourceLineNo">2561</span>        }<a name="line.2561"></a>
-<span class="sourceLineNo">2562</span>        // Only if this is successful it
has to be removed<a name="line.2562"></a>
-<span class="sourceLineNo">2563</span>        try {<a name="line.2563"></a>
-<span class="sourceLineNo">2564</span>          this.fs.removeStoreFiles(this.getColumnFamilyDescriptor().getNameAsString(),
filesToRemove);<a name="line.2564"></a>
-<span class="sourceLineNo">2565</span>        } catch (FailedArchiveException
fae) {<a name="line.2565"></a>
-<span class="sourceLineNo">2566</span>          // Even if archiving some files
failed, we still need to clear out any of the<a name="line.2566"></a>
-<span class="sourceLineNo">2567</span>          // files which were successfully
archived.  Otherwise we will receive a<a name="line.2567"></a>
-<span class="sourceLineNo">2568</span>          // FileNotFoundException when
we attempt to re-archive them in the next go around.<a name="line.2568"></a>
-<span class="sourceLineNo">2569</span>          Collection&lt;Path&gt;
failedFiles = fae.getFailedFiles();<a name="line.2569"></a>
-<span class="sourceLineNo">2570</span>          Iterator&lt;StoreFile&gt;
iter = filesToRemove.iterator();<a name="line.2570"></a>
-<span class="sourceLineNo">2571</span>          while (iter.hasNext()) {<a
name="line.2571"></a>
-<span class="sourceLineNo">2572</span>            if (failedFiles.contains(iter.next().getPath()))
{<a name="line.2572"></a>
-<span class="sourceLineNo">2573</span>              iter.remove();<a name="line.2573"></a>
-<span class="sourceLineNo">2574</span>            }<a name="line.2574"></a>
-<span class="sourceLineNo">2575</span>          }<a name="line.2575"></a>
-<span class="sourceLineNo">2576</span>          if (!filesToRemove.isEmpty())
{<a name="line.2576"></a>
-<span class="sourceLineNo">2577</span>            clearCompactedfiles(filesToRemove);<a
name="line.2577"></a>
-<span class="sourceLineNo">2578</span>          }<a name="line.2578"></a>
-<span class="sourceLineNo">2579</span>          throw fae;<a name="line.2579"></a>
-<span class="sourceLineNo">2580</span>        }<a name="line.2580"></a>
-<span class="sourceLineNo">2581</span>      }<a name="line.2581"></a>
-<span class="sourceLineNo">2582</span>    }<a name="line.2582"></a>
-<span class="sourceLineNo">2583</span>    if (!filesToRemove.isEmpty()) {<a
name="line.2583"></a>
-<span class="sourceLineNo">2584</span>      // Clear the compactedfiles from
the store file manager<a name="line.2584"></a>
-<span class="sourceLineNo">2585</span>      clearCompactedfiles(filesToRemove);<a
name="line.2585"></a>
-<span class="sourceLineNo">2586</span>    }<a name="line.2586"></a>
-<span class="sourceLineNo">2587</span>  }<a name="line.2587"></a>
-<span class="sourceLineNo">2588</span><a name="line.2588"></a>
-<span class="sourceLineNo">2589</span>  public Long preFlushSeqIDEstimation()
{<a name="line.2589"></a>
-<span class="sourceLineNo">2590</span>    return memstore.preFlushSeqIDEstimation();<a
name="line.2590"></a>
-<span class="sourceLineNo">2591</span>  }<a name="line.2591"></a>
-<span class="sourceLineNo">2592</span><a name="line.2592"></a>
-<span class="sourceLineNo">2593</span>  @Override<a name="line.2593"></a>
-<span class="sourceLineNo">2594</span>  public boolean isSloppyMemstore() {<a
name="line.2594"></a>
-<span class="sourceLineNo">2595</span>    return this.memstore.isSloppy();<a
name="line.2595"></a>
-<span class="sourceLineNo">2596</span>  }<a name="line.2596"></a>
-<span class="sourceLineNo">2597</span><a name="line.2597"></a>
-<span class="sourceLineNo">2598</span>  private void clearCompactedfiles(final
List&lt;StoreFile&gt; filesToRemove) throws IOException {<a name="line.2598"></a>
-<span class="sourceLineNo">2599</span>    if (LOG.isTraceEnabled()) {<a name="line.2599"></a>
-<span class="sourceLineNo">2600</span>      LOG.trace("Clearing the compacted
file " + filesToRemove + " from this store");<a name="line.2600"></a>
-<span class="sourceLineNo">2601</span>    }<a name="line.2601"></a>
-<span class="sourceLineNo">2602</span>    try {<a name="line.2602"></a>
-<span class="sourceLineNo">2603</span>      lock.writeLock().lock();<a name="line.2603"></a>
-<span class="sourceLineNo">2604</span>      this.getStoreEngine().getStoreFileManager().removeCompactedFiles(filesToRemove);<a
name="line.2604"></a>
-<span class="sourceLineNo">2605</span>    } finally {<a name="line.2605"></a>
-<span class="sourceLineNo">2606</span>      lock.writeLock().unlock();<a name="line.2606"></a>
-<span class="sourceLineNo">2607</span>    }<a name="line.2607"></a>
-<span class="sourceLineNo">2608</span>  }<a name="line.2608"></a>
-<span class="sourceLineNo">2609</span>}<a name="line.2609"></a>
+<span class="sourceLineNo">2489</span>  /**<a name="line.2489"></a>
+<span class="sourceLineNo">2490</span>   * Sets the store up for a region level
snapshot operation.<a name="line.2490"></a>
+<span class="sourceLineNo">2491</span>   * @see #postSnapshotOperation()<a
name="line.2491"></a>
+<span class="sourceLineNo">2492</span>   */<a name="line.2492"></a>
+<span class="sourceLineNo">2493</span>  public void preSnapshotOperation() {<a
name="line.2493"></a>
+<span class="sourceLineNo">2494</span>    archiveLock.lock();<a name="line.2494"></a>
+<span class="sourceLineNo">2495</span>  }<a name="line.2495"></a>
+<span class="sourceLineNo">2496</span><a name="line.2496"></a>
+<span class="sourceLineNo">2497</span>  /**<a name="line.2497"></a>
+<span class="sourceLineNo">2498</span>   * Perform tasks needed after the completion
of snapshot operation.<a name="line.2498"></a>
+<span class="sourceLineNo">2499</span>   * @see #preSnapshotOperation()<a
name="line.2499"></a>
+<span class="sourceLineNo">2500</span>   */<a name="line.2500"></a>
+<span class="sourceLineNo">2501</span>  public void postSnapshotOperation() {<a
name="line.2501"></a>
+<span class="sourceLineNo">2502</span>    archiveLock.unlock();<a name="line.2502"></a>
+<span class="sourceLineNo">2503</span>  }<a name="line.2503"></a>
+<span class="sourceLineNo">2504</span><a name="line.2504"></a>
+<span class="sourceLineNo">2505</span>  @Override<a name="line.2505"></a>
+<span class="sourceLineNo">2506</span>  public synchronized void closeAndArchiveCompactedFiles()
throws IOException {<a name="line.2506"></a>
+<span class="sourceLineNo">2507</span>    // ensure other threads do not attempt
to archive the same files on close()<a name="line.2507"></a>
+<span class="sourceLineNo">2508</span>    archiveLock.lock();<a name="line.2508"></a>
+<span class="sourceLineNo">2509</span>    try {<a name="line.2509"></a>
+<span class="sourceLineNo">2510</span>      lock.readLock().lock();<a name="line.2510"></a>
+<span class="sourceLineNo">2511</span>      Collection&lt;StoreFile&gt;
copyCompactedfiles = null;<a name="line.2511"></a>
+<span class="sourceLineNo">2512</span>      try {<a name="line.2512"></a>
+<span class="sourceLineNo">2513</span>        Collection&lt;StoreFile&gt;
compactedfiles =<a name="line.2513"></a>
+<span class="sourceLineNo">2514</span>            this.getStoreEngine().getStoreFileManager().getCompactedfiles();<a
name="line.2514"></a>
+<span class="sourceLineNo">2515</span>        if (compactedfiles != null &amp;&amp;
compactedfiles.size() != 0) {<a name="line.2515"></a>
+<span class="sourceLineNo">2516</span>          // Do a copy under read lock<a
name="line.2516"></a>
+<span class="sourceLineNo">2517</span>          copyCompactedfiles = new ArrayList&lt;&gt;(compactedfiles);<a
name="line.2517"></a>
+<span class="sourceLineNo">2518</span>        } else {<a name="line.2518"></a>
+<span class="sourceLineNo">2519</span>          if (LOG.isTraceEnabled()) {<a
name="line.2519"></a>
+<span class="sourceLineNo">2520</span>            LOG.trace("No compacted files
to archive");<a name="line.2520"></a>
+<span class="sourceLineNo">2521</span>            return;<a name="line.2521"></a>
+<span class="sourceLineNo">2522</span>          }<a name="line.2522"></a>
+<span class="sourceLineNo">2523</span>        }<a name="line.2523"></a>
+<span class="sourceLineNo">2524</span>      } finally {<a name="line.2524"></a>
+<span class="sourceLineNo">2525</span>        lock.readLock().unlock();<a
name="line.2525"></a>
+<span class="sourceLineNo">2526</span>      }<a name="line.2526"></a>
+<span class="sourceLineNo">2527</span>      if (copyCompactedfiles != null &amp;&amp;
!copyCompactedfiles.isEmpty()) {<a name="line.2527"></a>
+<span class="sourceLineNo">2528</span>        removeCompactedfiles(copyCompactedfiles);<a
name="line.2528"></a>
+<span class="sourceLineNo">2529</span>      }<a name="line.2529"></a>
+<span class="sourceLineNo">2530</span>    } finally {<a name="line.2530"></a>
+<span class="sourceLineNo">2531</span>      archiveLock.unlock();<a name="line.2531"></a>
+<span class="sourceLineNo">2532</span>    }<a name="line.2532"></a>
+<span class="sourceLineNo">2533</span>  }<a name="line.2533"></a>
+<span class="sourceLineNo">2534</span><a name="line.2534"></a>
+<span class="sourceLineNo">2535</span>  /**<a name="line.2535"></a>
+<span class="sourceLineNo">2536</span>   * Archives and removes the compacted
files<a name="line.2536"></a>
+<span class="sourceLineNo">2537</span>   * @param compactedfiles The compacted
files in this store that are not active in reads<a name="line.2537"></a>
+<span class="sourceLineNo">2538</span>   * @throws IOException<a name="line.2538"></a>
+<span class="sourceLineNo">2539</span>   */<a name="line.2539"></a>
+<span class="sourceLineNo">2540</span>  private void removeCompactedfiles(Collection&lt;StoreFile&gt;
compactedfiles)<a name="line.2540"></a>
+<span class="sourceLineNo">2541</span>      throws IOException {<a name="line.2541"></a>
+<span class="sourceLineNo">2542</span>    final List&lt;StoreFile&gt;
filesToRemove = new ArrayList&lt;&gt;(compactedfiles.size());<a name="line.2542"></a>
+<span class="sourceLineNo">2543</span>    for (final StoreFile file : compactedfiles)
{<a name="line.2543"></a>
+<span class="sourceLineNo">2544</span>      synchronized (file) {<a name="line.2544"></a>
+<span class="sourceLineNo">2545</span>        try {<a name="line.2545"></a>
+<span class="sourceLineNo">2546</span>          StoreFileReader r = file.getReader();<a
name="line.2546"></a>
+<span class="sourceLineNo">2547</span>          if (r == null) {<a name="line.2547"></a>
+<span class="sourceLineNo">2548</span>            if (LOG.isDebugEnabled()) {<a
name="line.2548"></a>
+<span class="sourceLineNo">2549</span>              LOG.debug("The file " + file
+ " was closed but still not archived.");<a name="line.2549"></a>
+<span class="sourceLineNo">2550</span>            }<a name="line.2550"></a>
+<span class="sourceLineNo">2551</span>            filesToRemove.add(file);<a
name="line.2551"></a>
+<span class="sourceLineNo">2552</span>            continue;<a name="line.2552"></a>
+<span class="sourceLineNo">2553</span>          }<a name="line.2553"></a>
+<span class="sourceLineNo">2554</span>          if (file.isCompactedAway() &amp;&amp;
!file.isReferencedInReads()) {<a name="line.2554"></a>
+<span class="sourceLineNo">2555</span>            // Even if deleting fails we
need not bother as any new scanners won't be<a name="line.2555"></a>
+<span class="sourceLineNo">2556</span>            // able to use the compacted
file as the status is already compactedAway<a name="line.2556"></a>
+<span class="sourceLineNo">2557</span>            if (LOG.isTraceEnabled()) {<a
name="line.2557"></a>
+<span class="sourceLineNo">2558</span>              LOG.trace("Closing and archiving
the file " + file.getPath());<a name="line.2558"></a>
+<span class="sourceLineNo">2559</span>            }<a name="line.2559"></a>
+<span class="sourceLineNo">2560</span>            r.close(true);<a name="line.2560"></a>
+<span class="sourceLineNo">2561</span>            // Just close and return<a
name="line.2561"></a>
+<span class="sourceLineNo">2562</span>            filesToRemove.add(file);<a
name="line.2562"></a>
+<span class="sourceLineNo">2563</span>          }<a name="line.2563"></a>
+<span class="sourceLineNo">2564</span>        } catch (Exception e) {<a name="line.2564"></a>
+<span class="sourceLineNo">2565</span>          LOG.error(<a name="line.2565"></a>
+<span class="sourceLineNo">2566</span>            "Exception while trying to
close the compacted store file " + file.getPath().getName());<a name="line.2566"></a>
+<span class="sourceLineNo">2567</span>        }<a name="line.2567"></a>
+<span class="sourceLineNo">2568</span>      }<a name="line.2568"></a>
+<span class="sourceLineNo">2569</span>    }<a name="line.2569"></a>
+<span class="sourceLineNo">2570</span>    if (this.isPrimaryReplicaStore()) {<a
name="line.2570"></a>
+<span class="sourceLineNo">2571</span>      // Only the primary region is allowed
to move the file to archive.<a name="line.2571"></a>
+<span class="sourceLineNo">2572</span>      // The secondary region does not
move the files to archive. Any active reads from<a name="line.2572"></a>
+<span class="sourceLineNo">2573</span>      // the secondary region will still
work because the file as such has active readers on it.<a name="line.2573"></a>
+<span class="sourceLineNo">2574</span>      if (!filesToRemove.isEmpty()) {<a
name="line.2574"></a>
+<span class="sourceLineNo">2575</span>        if (LOG.isDebugEnabled()) {<a
name="line.2575"></a>
+<span class="sourceLineNo">2576</span>          LOG.debug("Moving the files "
+ filesToRemove + " to archive");<a name="line.2576"></a>
+<span class="sourceLineNo">2577</span>        }<a name="line.2577"></a>
+<span class="sourceLineNo">2578</span>        // Only if this is successful it
has to be removed<a name="line.2578"></a>
+<span class="sourceLineNo">2579</span>        try {<a name="line.2579"></a>
+<span class="sourceLineNo">2580</span>          this.fs.removeStoreFiles(this.getColumnFamilyDescriptor().getNameAsString(),
filesToRemove);<a name="line.2580"></a>
+<span class="sourceLineNo">2581</span>        } catch (FailedArchiveException
fae) {<a name="line.2581"></a>
+<span class="sourceLineNo">2582</span>          // Even if archiving some files
failed, we still need to clear out any of the<a name="line.2582"></a>
+<span class="sourceLineNo">2583</span>          // files which were successfully
archived.  Otherwise we will receive a<a name="line.2583"></a>
+<span class="sourceLineNo">2584</span>          // FileNotFoundException when
we attempt to re-archive them in the next go around.<a name="line.2584"></a>
+<span class="sourceLineNo">2585</span>          Collection&lt;Path&gt;
failedFiles = fae.getFailedFiles();<a name="line.2585"></a>
+<span class="sourceLineNo">2586</span>          Iterator&lt;StoreFile&gt;
iter = filesToRemove.iterator();<a name="line.2586"></a>
+<span class="sourceLineNo">2587</span>          while (iter.hasNext()) {<a
name="line.2587"></a>
+<span class="sourceLineNo">2588</span>            if (failedFiles.contains(iter.next().getPath()))
{<a name="line.2588"></a>
+<span class="sourceLineNo">2589</span>              iter.remove();<a name="line.2589"></a>
+<span class="sourceLineNo">2590</span>            }<a name="line.2590"></a>
+<span class="sourceLineNo">2591</span>          }<a name="line.2591"></a>
+<span class="sourceLineNo">2592</span>          if (!filesToRemove.isEmpty())
{<a name="line.2592"></a>
+<span class="sourceLineNo">2593</span>            clearCompactedfiles(filesToRemove);<a
name="line.2593"></a>
+<span class="sourceLineNo">2594</span>          }<a name="line.2594"></a>
+<span class="sourceLineNo">2595</span>          throw fae;<a name="line.2595"></a>
+<span class="sourceLineNo">2596</span>        }<a name="line.2596"></a>
+<span class="sourceLineNo">2597</span>      }<a name="line.2597"></a>
+<span class="sourceLineNo">2598</span>    }<a name="line.2598"></a>
+<span class="sourceLineNo">2599</span>    if (!filesToRemove.isEmpty()) {<a
name="line.2599"></a>
+<span class="sourceLineNo">2600</span>      // Clear the compactedfiles from
the store file manager<a name="line.2600"></a>
+<span class="sourceLineNo">2601</span>      clearCompactedfiles(filesToRemove);<a
name="line.2601"></a>
+<span class="sourceLineNo">2602</span>    }<a name="line.2602"></a>
+<span class="sourceLineNo">2603</span>  }<a name="line.2603"></a>
+<span class="sourceLineNo">2604</span><a name="line.2604"></a>
+<span class="sourceLineNo">2605</span>  public Long preFlushSeqIDEstimation()
{<a name="line.2605"></a>
+<span class="sourceLineNo">2606</span>    return memstore.preFlushSeqIDEstimation();<a
name="line.2606"></a>
+<span class="sourceLineNo">2607</span>  }<a name="line.2607"></a>
+<span class="sourceLineNo">2608</span><a name="line.2608"></a>
+<span class="sourceLineNo">2609</span>  @Override<a name="line.2609"></a>
+<span class="sourceLineNo">2610</span>  public boolean isSloppyMemstore() {<a
name="line.2610"></a>
+<span class="sourceLineNo">2611</span>    return this.memstore.isSloppy();<a
name="line.2611"></a>
+<span class="sourceLineNo">2612</span>  }<a name="line.2612"></a>
+<span class="sourceLineNo">2613</span><a name="line.2613"></a>
+<span class="sourceLineNo">2614</span>  private void clearCompactedfiles(final
List&lt;StoreFile&gt; filesToRemove) throws IOException {<a name="line.2614"></a>
+<span class="sourceLineNo">2615</span>    if (LOG.isTraceEnabled()) {<a name="line.2615"></a>
+<span class="sourceLineNo">2616</span>      LOG.trace("Clearing the compacted
file " + filesToRemove + " from this store");<a name="line.2616"></a>
+<span class="sourceLineNo">2617</span>    }<a name="line.2617"></a>
+<span class="sourceLineNo">2618</span>    try {<a name="line.2618"></a>
+<span class="sourceLineNo">2619</span>      lock.writeLock().lock();<a name="line.2619"></a>
+<span class="sourceLineNo">2620</span>      this.getStoreEngine().getStoreFileManager().removeCompactedFiles(filesToRemove);<a
name="line.2620"></a>
+<span class="sourceLineNo">2621</span>    } finally {<a name="line.2621"></a>
+<span class="sourceLineNo">2622</span>      lock.writeLock().unlock();<a name="line.2622"></a>
+<span class="sourceLineNo">2623</span>    }<a name="line.2623"></a>
+<span class="sourceLineNo">2624</span>  }<a name="line.2624"></a>
+<span class="sourceLineNo">2625</span>}<a name="line.2625"></a>
 
 
 


Mime
View raw message