keith-turner opened a new issue, #4183:
URL: https://github.com/apache/accumulo/issues/4183
For automatic splits the following happens.
* Tablet group watcher periodically scans the metadata table looking for
tablets to split
* When a tablet is found to split, the manager tracks in memory that the
tablet is in the process of splitting
* A Fate operation is started to split the tablet.
In #4178 the above tracking that is done in manager memory is moved to FATE.
However the FATE implementation is not complete, its only stubbed out in
#4178. To complete #4178, need the following capabilities in FATE.
* The ability to specify a key when creating a FATE operation. For the
split this case this key would be the extent. The fate operation should only
be created if the key does not exists.
* The ability to handle failures in the case where the FATE operation is
created with a key, but is not seeded.
The following is an example of one way this could work.
```java
FateStore store = ...;
OptionalLong txid = store.create("split", createKey(extent));
if(!txid.isPresent()){
// check to see if it was created but not seeded
txid = store.findByKey("split", createKey(extent));
if(txid.isPresent()){
// TODO reserve and if in the new state, then seed fate op
}
} else {
// TODO seed the fate op
}
```
Maybe the above code would be more efficient as something like
`Optional<Pair<Long, TStatus>> createOrFind(key)`.
The implementation of the create(key) function could hash the key to obtain
a 64 bit fate id. It would need to handle collisions in a similar way to a
hashmap.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]