Skip to content
Merged
Show file tree
Hide file tree
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 @@ -45,12 +45,6 @@ public long getNumEntries() {
return thriftStats.getNumEntries();
}

@Override
public long getSplitCreationTime() {
// ELASTICITY_TODO look into what needs to be done to remove this from SPI
return 0;
}

@Override
public double getIngestRate() {
return thriftStats.getIngestRate();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,11 +265,11 @@ List<TabletMigration> move(ServerCounts tooMuch, ServerCounts tooLittle, int cou
log.error("Unable to select a tablet to move", ex);
return result;
}
TabletId tabletId = selectTablet(onlineTabletsForTable);
onlineTabletsForTable.remove(tabletId);
if (tabletId == null) {
if (onlineTabletsForTable.isEmpty()) {
return result;
}
TabletId tabletId = onlineTabletsForTable.keySet().iterator().next();
onlineTabletsForTable.remove(tabletId);
tooMuchMap.put(table, tooMuchMap.get(table) - 1);
/*
* If a table grows from 1 tablet then tooLittleMap.get(table) can return a null, since there
Expand Down Expand Up @@ -324,21 +324,6 @@ static Map<TableId,Integer> tabletCountsPerTable(TServerStatus status) {
return result;
}

static TabletId selectTablet(Map<TabletId,TabletStatistics> extents) {
if (extents.isEmpty()) {
return null;
}
TabletId mostRecentlySplit = null;
long splitTime = 0;
for (Entry<TabletId,TabletStatistics> entry : extents.entrySet()) {
if (entry.getValue().getSplitCreationTime() >= splitTime) {
splitTime = entry.getValue().getSplitCreationTime();
mostRecentlySplit = entry.getKey();
}
}
return mostRecentlySplit;
}

// define what it means for a tablet to be busy
private static TableId busiest(Map<String,TableStatistics> tables) {
TableId result = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ public interface TabletStatistics extends Comparable<TabletStatistics> {

long getNumEntries();

long getSplitCreationTime();

double getIngestRate();

double getQueryRate();
Expand Down