Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ protected List<Long> getCompactBoundariesForMajor(Collection<HStoreFile> filesTo
long now) {
MutableLong min = new MutableLong(Long.MAX_VALUE);
MutableLong max = new MutableLong(0);
boolean[] hasMissing = new boolean[1];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to declare an array here.

filesToCompact.forEach(f -> {
byte[] timeRangeBytes = f.getMetadataValue(CUSTOM_TIERING_TIME_RANGE);
long minCurrent = Long.MAX_VALUE;
Expand All @@ -82,7 +83,10 @@ protected List<Long> getCompactBoundariesForMajor(Collection<HStoreFile> filesTo
maxCurrent = timeRangeTracker.getMax();
} catch (IOException e) {
LOG.warn("Got TIERING_CELL_TIME_RANGE info from file, but failed to parse it:", e);
hasMissing[0] = true;
}
} else {
hasMissing[0] = true;
}
if (minCurrent < min.getValue()) {
min.setValue(minCurrent);
Expand All @@ -94,6 +98,10 @@ protected List<Long> getCompactBoundariesForMajor(Collection<HStoreFile> filesTo

List<Long> boundaries = new ArrayList<>();
boundaries.add(Long.MIN_VALUE);
if (hasMissing[0]) {
boundaries.add(cutOffTimestamp);
return boundaries;
}
if (min.getValue() < cutOffTimestamp) {
boundaries.add(min.getValue());
if (max.getValue() > cutOffTimestamp) {
Expand Down
Loading