|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object voldemort.client.protocol.admin.AdminClient.ReadOnlySpecificOperations
public class AdminClient.ReadOnlySpecificOperations
Encapsulates all operations specific to read-only stores alone
Constructor Summary | |
---|---|
AdminClient.ReadOnlySpecificOperations()
|
Method Summary | |
---|---|
void |
failedFetchStore(int nodeId,
java.lang.String storeName,
java.lang.String storeDir)
When a fetch store fails, we don't need to keep the pushed data around. |
void |
fetchPartitionFiles(int nodeId,
java.lang.String storeName,
java.util.List<java.lang.Integer> partitionIds,
java.lang.String destinationDirPath,
java.util.Set<java.lang.Object> notAcceptedBuckets,
java.util.concurrent.atomic.AtomicBoolean running)
Fetch read-only store files to a specified directory. |
java.lang.String |
fetchStore(int nodeId,
java.lang.String storeName,
java.lang.String storeDir,
long pushVersion,
long timeoutMs)
Fetch data from directory 'storeDir' on node id |
java.util.Map<java.lang.String,java.lang.Long> |
getROCurrentVersion(int nodeId,
java.util.List<java.lang.String> storeNames)
Returns the 'current' version of RO store |
java.util.Map<java.lang.String,java.lang.String> |
getROCurrentVersionDir(int nodeId,
java.util.List<java.lang.String> storeNames)
Returns the 'current' versions of all RO stores provided |
java.util.Map<java.lang.String,java.lang.Long> |
getROMaxVersion(int nodeId,
java.util.List<java.lang.String> storeNames)
Returns the max version of push currently being used by read-only store. |
java.util.Map<java.lang.String,java.lang.Long> |
getROMaxVersion(java.util.List<java.lang.String> storeNames)
This is a wrapper around getROMaxVersion(int, List) where-in
we find the max versions on each machine and then return the max of
all of them |
java.util.Map<java.lang.String,java.lang.String> |
getROMaxVersionDir(int nodeId,
java.util.List<java.lang.String> storeNames)
Returns the max version of push currently being used by read-only store. |
java.util.Map<java.lang.String,java.lang.String> |
getROStorageFormat(int nodeId,
java.util.List<java.lang.String> storeNames)
Returns the read-only storage format - ReadOnlyStorageFormat
for a list of stores |
void |
rollbackStore(int nodeId,
java.lang.String storeName,
long pushVersion)
Rollback RO store to most recent backup of the current store |
void |
rollbackStore(java.util.List<java.lang.Integer> nodeIds,
java.lang.String storeName,
long pushVersion)
|
java.lang.String |
swapStore(int nodeId,
java.lang.String storeName,
java.lang.String storeDir)
Swap store data atomically on a single node |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AdminClient.ReadOnlySpecificOperations()
Method Detail |
---|
public void rollbackStore(int nodeId, java.lang.String storeName, long pushVersion)
nodeId
- The node id on which to rollbackstoreName
- The name of the RO Store to rollbackpushVersion
- The version of the push to revert back topublic void rollbackStore(java.util.List<java.lang.Integer> nodeIds, java.lang.String storeName, long pushVersion)
public java.lang.String fetchStore(int nodeId, java.lang.String storeName, java.lang.String storeDir, long pushVersion, long timeoutMs)
nodeId
- The id of the node on which to fetch the datastoreName
- The name of the storestoreDir
- The directory from where to read the datapushVersion
- The version of the pushtimeoutMs
- Time timeout in milliseconds
public void failedFetchStore(int nodeId, java.lang.String storeName, java.lang.String storeDir)
nodeId
- The node id on which to delete the datastoreName
- The name of the storestoreDir
- The directory to deletepublic java.lang.String swapStore(int nodeId, java.lang.String storeName, java.lang.String storeDir)
nodeId
- The node id where we would want to swap the datastoreName
- Name of the storestoreDir
- The directory where the data is present
public java.util.Map<java.lang.String,java.lang.String> getROStorageFormat(int nodeId, java.util.List<java.lang.String> storeNames)
ReadOnlyStorageFormat
for a list of stores
nodeId
- The id of the node on which the stores are presentstoreNames
- List of all the store names
public java.util.Map<java.lang.String,java.lang.String> getROMaxVersionDir(int nodeId, java.util.List<java.lang.String> storeNames)
nodeId
- The id of the node on which the store is presentstoreNames
- List of all the stores
public java.util.Map<java.lang.String,java.lang.String> getROCurrentVersionDir(int nodeId, java.util.List<java.lang.String> storeNames)
nodeId
- The id of the node on which the store is presentstoreNames
- List of all the RO stores
public java.util.Map<java.lang.String,java.lang.Long> getROCurrentVersion(int nodeId, java.util.List<java.lang.String> storeNames)
nodeId
- The id of the node on which the store is presentstoreNames
- List of all the stores
public java.util.Map<java.lang.String,java.lang.Long> getROMaxVersion(int nodeId, java.util.List<java.lang.String> storeNames)
nodeId
- The id of the node on which the store is presentstoreNames
- List of all the stores
public java.util.Map<java.lang.String,java.lang.Long> getROMaxVersion(java.util.List<java.lang.String> storeNames)
getROMaxVersion(int, List)
where-in
we find the max versions on each machine and then return the max of
all of them
storeNames
- List of all read-only stores
public void fetchPartitionFiles(int nodeId, java.lang.String storeName, java.util.List<java.lang.Integer> partitionIds, java.lang.String destinationDirPath, java.util.Set<java.lang.Object> notAcceptedBuckets, java.util.concurrent.atomic.AtomicBoolean running)
nodeId
- The node id from where to copystoreName
- The name of the read-only storepartitionIds
- List of partitionIdsdestinationDirPath
- The destination pathnotAcceptedBuckets
- These are Pair< partition, replica > which
we cannot copy AT all. This is because these are current
mmap-ed and are serving traffic.running
- A boolean which will control when we want to stop the
copying of files. As long this is true, we will continue
copying. Once this is changed to false we'll disable the
copying
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |