[
https://issues.apache.org/jira/browse/HBASE-4991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13215482#comment-13215482
]
Mubarak Seyed commented on HBASE-4991:
--------------------------------------
bq. How does Accumulo do it do you know? You might get some ideas over there.
Will take a look. Todd's preso highlights comparison of HBase vs Accumulo -
http://www.slideshare.net/cloudera/h-base-and-accumulo-todd-lipcom-jan-25-2012
Source:
https://svn.apache.org/repos/asf/incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/fate/
(Master-coordinated tasks uses Fate, refer TStore.java)
https://svn.apache.org/repos/asf/incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
Notes from TStore.java
{code}
/**
* Transaction Store: a place to save transactions
*
* A transaction consists of a number of operations. To use, first create a
transaction id, and then seed the
* transaction with an initial operation. An executor service can then execute
the transaction's operation,
* possibly pushing more operations onto the transaction as each step
successfully completes.
* If a step fails, the stack can be unwound, undoing each operation.
*/
{code}
For example, delete-range operation in master uses fate to seed transaction
with an DELETE_RANGE table operation, submit a task, executor service can then
execute the op.
{code}
public void executeTableOperation(TInfo tinfo, AuthInfo c, long opid,
org.apache.accumulo.core.master.thrift.TableOperation op, List<ByteBuffer>
arguments, Map<String,String> options, boolean autoCleanup){
case DELETE_RANGE: {
String tableName = ByteBufferUtil.toString(arguments.get(0));
Text startRow = ByteBufferUtil.toText(arguments.get(1));
Text endRow = ByteBufferUtil.toText(arguments.get(2));
final String tableId = checkTableId(tableName,
TableOperation.DELETE_RANGE);
checkNotMetadataTable(tableName, TableOperation.DELETE_RANGE);
verify(c, tableId, TableOperation.DELETE_RANGE, check(c,
SystemPermission.SYSTEM) || check(c, tableId, TablePermission.WRITE));
fate.seedTransaction(opid, new TraceRepo<Master>(new
TableRangeOp(MergeInfo.Operation.DELETE, tableId, startRow, endRow)),
autoCleanup);
break;
}
}
{code}
> Provide capability to delete named region
> -----------------------------------------
>
> Key: HBASE-4991
> URL: https://issues.apache.org/jira/browse/HBASE-4991
> Project: HBase
> Issue Type: Improvement
> Reporter: Ted Yu
> Assignee: Mubarak Seyed
> Fix For: 0.94.0
>
> Attachments: HBASE-4991.trunk.v1.patch, HBASE-4991.trunk.v2.patch
>
>
> See discussion titled 'Able to control routing to Solr shards or not' on
> lily-discuss
> User may want to quickly dispose of out of date records by deleting specific
> regions.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira