Package org.apache.accumulo.server.util
Class ManagerMetadataUtil
- java.lang.Object
-
- org.apache.accumulo.server.util.ManagerMetadataUtil
-
public class ManagerMetadataUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description ManagerMetadataUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addNewTablet(ServerContext context, KeyExtent extent, String dirName, TServerInstance tServerInstance, Map<StoredTabletFile,DataFileValue> datafileSizes, Map<Long,? extends Collection<TabletFile>> bulkLoadedFiles, MetadataTime time, long lastFlushID, long lastCompactID, ServiceLock zooLock)
static KeyExtent
fixSplit(ServerContext context, TabletMetadata meta, ServiceLock lock)
static void
replaceDatafiles(ServerContext context, KeyExtent extent, Set<StoredTabletFile> datafilesToDelete, Set<StoredTabletFile> scanFiles, Optional<StoredTabletFile> path, Long compactionId, DataFileValue size, String address, TabletMetadata.Location lastLocation, ServiceLock zooLock, Optional<ExternalCompactionId> ecid)
static void
updateLastForAssignmentMode(ClientContext context, Ample.TabletMutator tabletMutator, TServerInstance location, TabletMetadata.Location lastLocation)
Update the last location if the location mode is "assignment".static void
updateLastForCompactionMode(ClientContext context, Ample.TabletMutator tabletMutator, TabletMetadata.Location lastLocation, String address, ServiceLock zooLock)
Update the last location if the location mode is "compaction".static Optional<StoredTabletFile>
updateTabletDataFile(ServerContext context, KeyExtent extent, TabletFile newDatafile, DataFileValue dfv, MetadataTime time, String address, ServiceLock zooLock, Set<String> unusedWalLogs, TabletMetadata.Location lastLocation, long flushId)
Update tablet file data from flush.
-
-
-
Method Detail
-
addNewTablet
public static void addNewTablet(ServerContext context, KeyExtent extent, String dirName, TServerInstance tServerInstance, Map<StoredTabletFile,DataFileValue> datafileSizes, Map<Long,? extends Collection<TabletFile>> bulkLoadedFiles, MetadataTime time, long lastFlushID, long lastCompactID, ServiceLock zooLock)
-
fixSplit
public static KeyExtent fixSplit(ServerContext context, TabletMetadata meta, ServiceLock lock) throws AccumuloException
- Throws:
AccumuloException
-
replaceDatafiles
public static void replaceDatafiles(ServerContext context, KeyExtent extent, Set<StoredTabletFile> datafilesToDelete, Set<StoredTabletFile> scanFiles, Optional<StoredTabletFile> path, Long compactionId, DataFileValue size, String address, TabletMetadata.Location lastLocation, ServiceLock zooLock, Optional<ExternalCompactionId> ecid)
-
updateTabletDataFile
public static Optional<StoredTabletFile> updateTabletDataFile(ServerContext context, KeyExtent extent, TabletFile newDatafile, DataFileValue dfv, MetadataTime time, String address, ServiceLock zooLock, Set<String> unusedWalLogs, TabletMetadata.Location lastLocation, long flushId)
Update tablet file data from flush. Returns a StoredTabletFile if there are data entries.
-
updateLastForAssignmentMode
public static void updateLastForAssignmentMode(ClientContext context, Ample.TabletMutator tabletMutator, TServerInstance location, TabletMetadata.Location lastLocation)
Update the last location if the location mode is "assignment". This will delete the previous last location if needed and set the new last location- Parameters:
context
- The server contexttabletMutator
- The mutator being builtlocation
- The new locationlastLocation
- The previous last location, which may be null
-
updateLastForCompactionMode
public static void updateLastForCompactionMode(ClientContext context, Ample.TabletMutator tabletMutator, TabletMetadata.Location lastLocation, String address, ServiceLock zooLock)
Update the last location if the location mode is "compaction". This will delete the previous last location if needed and set the new last location- Parameters:
context
- The server contexttabletMutator
- The mutator being builtlastLocation
- The last locationaddress
- The server addresszooLock
- The zookeeper lock
-
-