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 @@ -43,6 +43,10 @@ public class RootTable {
* ZK path relative to the zookeeper node where the root tablet gc candidates are stored.
*/
public static final String ZROOT_TABLET_GC_CANDIDATES = ZROOT_TABLET + "/gc_candidates";
/*
* ZK path relative to the zookeeper node where the root tablet refresh entries are stored.
*/
public static final String ZROOT_TABLET_REFRESHES = ZROOT_TABLET + "/refreshes";

public static final KeyExtent EXTENT = new KeyExtent(ID, null, null);
public static final KeyExtent OLD_EXTENT =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
import java.util.Objects;
import java.util.UUID;
import java.util.function.Predicate;
import java.util.stream.Stream;
Expand Down Expand Up @@ -593,4 +594,46 @@ default void addBulkLoadInProgressFlag(String path, long fateTxid) {
default void removeBulkLoadInProgressFlag(String path) {
throw new UnsupportedOperationException();
}

interface Refreshes {
static class RefreshEntry {
private final ExternalCompactionId ecid;

private final KeyExtent extent;
private final TServerInstance tserver;

public RefreshEntry(ExternalCompactionId ecid, KeyExtent extent, TServerInstance tserver) {
this.ecid = Objects.requireNonNull(ecid);
this.extent = Objects.requireNonNull(extent);
this.tserver = Objects.requireNonNull(tserver);
}

public ExternalCompactionId getEcid() {
return ecid;
}

public KeyExtent getExtent() {
return extent;
}

public TServerInstance getTserver() {
return tserver;
}
}

void add(Collection<RefreshEntry> entries);

void delete(Collection<RefreshEntry> entries);

Stream<RefreshEntry> stream();
}

/**
* Refresh entries in the metadata table are used to track hosted tablets that need to have their
* metadata refreshed after a compaction. These entries ensure the refresh happens even in the
* case of process death.
*/
default Refreshes refreshes(DataLevel dataLevel) {
throw new UnsupportedOperationException();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -491,4 +491,17 @@ public static String getRowPrefix() {
return section.getRowPrefix();
}
}

public static class RefreshSection {
private static final Section section =
new Section(RESERVED_PREFIX + "refresh", true, RESERVED_PREFIX + "refresi", false);

public static Range getRange() {
return section.getRange();
}

public static String getRowPrefix() {
return section.getRowPrefix();
}
}
}
Loading