keith-turner opened a new pull request, #3232:
URL: https://github.com/apache/accumulo/pull/3232

   This is a work in progress so posting a draft PR.  Its pretty far along so 
posting in case anyone wants to take a look.
   
   The PR adds support to Ample for using conditional mutations to make 
metadata table updates. It also implements a lot of metadata operations as a 
proof of concept.  Below is a guide to the PR.
   
   In `core/src/main/java/org/apache/accumulo/core/metadata/schema/Ample.java` 
there are new interfaces `ConditionalTabletsMutator` and 
`ConditionalTabletMutator`.  These are the interface used to make conditional 
updates to metadata rows.
   
   In 
`server/base/src/main/java/org/apache/accumulo/server/metadata/ConditionalTabletsMutatorImpl.java`
 there is an implementation of these new interfaces that uses conditional 
mutations.
   
   In 
`server/base/src/main/java/org/apache/accumulo/server/metadata/RootConditionalWriter.java`
 there is a specialized implementation of the conditional writer for the root 
tablet metadata stored in ZK.  Implementing this required moving server side 
conditional mutation code out of the tablet server so it could be reused.  This 
caused a lot of movement and refactoring in the PR.  
   
   In 
`core/src/main/java/org/apache/accumulo/core/metadata/MetadataOperations.java` 
there are a lot of operations like compact, bulk import, split, etc implemented 
using the new Ample conditional APIs.  Not sure this code should live here, 
just writing it to explore using conditional mutations for metadata operations. 
 The split operation is the most complex and is incomplete (does not handle 
files and bulk markers yet).  Merge is not implemented, plan to do that to 
continue exploring.  While working on this class realized that an operation id 
was needed to prevent certain race condition, so added that column to the 
metadata table.  The split method in this class uses the new operation and 
operation id column.
   
   In 
`test/src/main/java/org/apache/accumulo/test/functional/AmpleConditionalWriterIT.java`
 and 
`test/src/main/java/org/apache/accumulo/test/functional/MetadataOperationsIT.java`
 there are intergation test.  If anyone wants to get hands on experience with 
these changes, should be able to modify and run those test.
   


-- 
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]

Reply via email to