For more details on OCC, see the paper On Optimistic Methods for Concurrency Control by Kung and Robinson available here .
To enable transactions, modify hbase-site.xml to turn on the TransactionalRegionServer. This is done by setting hbase.regionserver.class to org.apache.hadoop.hbase.ipc.TransactionalRegionInterface and hbase.regionserver.impl to org.apache.hadoop.hbase.regionserver.transactional.TransactionalRegionServer
In order to avoid phantom reads on scanners, scanners currently claim a write set for all rows in every regions which they scan through. This means that if transaction A writes to a region that transaction B is scanning, then there is a conflict (only one transacton can be committed). This will occur even if the scanner never went over the row that was written.