HBASE-14632 Revert due to over commit
This commit is contained in:
parent
0e2e5d3280
commit
c69c74fcbf
|
@ -1174,7 +1174,7 @@ public class HStore implements Store {
|
||||||
* Since we already have this data, this will be idempotent but we will have a redundant
|
* Since we already have this data, this will be idempotent but we will have a redundant
|
||||||
* copy of the data.
|
* copy of the data.
|
||||||
* - If RS fails between 2 and 3, the region will have a redundant copy of the data. The
|
* - If RS fails between 2 and 3, the region will have a redundant copy of the data. The
|
||||||
* RS that failed won't be able to finish sync() for WAL because of lease recovery in WAL.
|
* RS that failed won't be able to finish snyc() for WAL because of lease recovery in WAL.
|
||||||
* - If RS fails after 3, the region region server who opens the region will pick up the
|
* - If RS fails after 3, the region region server who opens the region will pick up the
|
||||||
* the compaction marker from the WAL and replay it by removing the compaction input files.
|
* the compaction marker from the WAL and replay it by removing the compaction input files.
|
||||||
* Failed RS can also attempt to delete those files, but the operation will be idempotent
|
* Failed RS can also attempt to delete those files, but the operation will be idempotent
|
||||||
|
@ -1218,7 +1218,7 @@ public class HStore implements Store {
|
||||||
+ TraditionalBinaryPrefix.long2String(cr.getSize(), "", 1));
|
+ TraditionalBinaryPrefix.long2String(cr.getSize(), "", 1));
|
||||||
|
|
||||||
// Commence the compaction.
|
// Commence the compaction.
|
||||||
List<Path> newFiles = compaction.compact(throughputController, user, region.lock.readLock());
|
List<Path> newFiles = compaction.compact(throughputController, user);
|
||||||
|
|
||||||
// TODO: get rid of this!
|
// TODO: get rid of this!
|
||||||
if (!this.conf.getBoolean("hbase.hstore.compaction.complete", true)) {
|
if (!this.conf.getBoolean("hbase.hstore.compaction.complete", true)) {
|
||||||
|
@ -1232,24 +1232,19 @@ public class HStore implements Store {
|
||||||
}
|
}
|
||||||
return sfs;
|
return sfs;
|
||||||
}
|
}
|
||||||
// Do the steps necessary to complete the compaction. Hold region open for these operations.
|
// Do the steps necessary to complete the compaction.
|
||||||
region.lock.readLock().lock();
|
sfs = moveCompatedFilesIntoPlace(cr, newFiles, user);
|
||||||
try {
|
writeCompactionWalRecord(filesToCompact, sfs);
|
||||||
sfs = moveCompatedFilesIntoPlace(cr, newFiles, user);
|
replaceStoreFiles(filesToCompact, sfs);
|
||||||
writeCompactionWalRecord(filesToCompact, sfs);
|
if (cr.isMajor()) {
|
||||||
replaceStoreFiles(filesToCompact, sfs);
|
majorCompactedCellsCount += getCompactionProgress().totalCompactingKVs;
|
||||||
if (cr.isMajor()) {
|
majorCompactedCellsSize += getCompactionProgress().totalCompactedSize;
|
||||||
majorCompactedCellsCount += getCompactionProgress().totalCompactingKVs;
|
} else {
|
||||||
majorCompactedCellsSize += getCompactionProgress().totalCompactedSize;
|
compactedCellsCount += getCompactionProgress().totalCompactingKVs;
|
||||||
} else {
|
compactedCellsSize += getCompactionProgress().totalCompactedSize;
|
||||||
compactedCellsCount += getCompactionProgress().totalCompactingKVs;
|
|
||||||
compactedCellsSize += getCompactionProgress().totalCompactedSize;
|
|
||||||
}
|
|
||||||
// At this point the store will use new files for all new scanners.
|
|
||||||
completeCompaction(filesToCompact, true); // Archive old files & update store size.
|
|
||||||
} finally {
|
|
||||||
region.lock.readLock().unlock();
|
|
||||||
}
|
}
|
||||||
|
// At this point the store will use new files for all new scanners.
|
||||||
|
completeCompaction(filesToCompact, true); // Archive old files & update store size.
|
||||||
|
|
||||||
logCompactionEndMessage(cr, sfs, compactionStartTime);
|
logCompactionEndMessage(cr, sfs, compactionStartTime);
|
||||||
return sfs;
|
return sfs;
|
||||||
|
@ -1448,7 +1443,6 @@ public class HStore implements Store {
|
||||||
* but instead makes a compaction candidate list by itself.
|
* but instead makes a compaction candidate list by itself.
|
||||||
* @param N Number of files.
|
* @param N Number of files.
|
||||||
*/
|
*/
|
||||||
@VisibleForTesting
|
|
||||||
public void compactRecentForTestingAssumingDefaultPolicy(int N) throws IOException {
|
public void compactRecentForTestingAssumingDefaultPolicy(int N) throws IOException {
|
||||||
List<StoreFile> filesToCompact;
|
List<StoreFile> filesToCompact;
|
||||||
boolean isMajor;
|
boolean isMajor;
|
||||||
|
@ -2129,11 +2123,7 @@ public class HStore implements Store {
|
||||||
public long getTotalStaticIndexSize() {
|
public long getTotalStaticIndexSize() {
|
||||||
long size = 0;
|
long size = 0;
|
||||||
for (StoreFile s : this.storeEngine.getStoreFileManager().getStorefiles()) {
|
for (StoreFile s : this.storeEngine.getStoreFileManager().getStorefiles()) {
|
||||||
StoreFile.Reader r = s.getReader();
|
size += s.getReader().getUncompressedDataIndexSize();
|
||||||
if (r == null) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
size += r.getUncompressedDataIndexSize();
|
|
||||||
}
|
}
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
@ -2143,9 +2133,6 @@ public class HStore implements Store {
|
||||||
long size = 0;
|
long size = 0;
|
||||||
for (StoreFile s : this.storeEngine.getStoreFileManager().getStorefiles()) {
|
for (StoreFile s : this.storeEngine.getStoreFileManager().getStorefiles()) {
|
||||||
StoreFile.Reader r = s.getReader();
|
StoreFile.Reader r = s.getReader();
|
||||||
if (r == null) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
size += r.getTotalBloomSize();
|
size += r.getTotalBloomSize();
|
||||||
}
|
}
|
||||||
return size;
|
return size;
|
||||||
|
|
Loading…
Reference in New Issue