org.apache.hadoop.hbase.mapreduce
Class BufferedHTable
java.lang.Object
org.apache.hadoop.hbase.client.HTable
org.apache.hadoop.hbase.mapreduce.BufferedHTable
- All Implemented Interfaces:
- Closeable, HTableInterface
@InterfaceAudience.Private
public class BufferedHTable
- extends HTable
Buffers writes for Deletes in addition to Puts. Buffering Deletes can significantly speed up
MapReduce jobs. The order of both Mutation types is preserved in the write buffer, and a buffer
flush can be triggered by either Put or Delete operations.
Constructor Summary |
BufferedHTable(org.apache.hadoop.conf.Configuration conf,
byte[] tableName)
|
BufferedHTable(org.apache.hadoop.conf.Configuration conf,
String tableName)
|
Method Summary |
void |
close()
Releases any resources held or pending changes in internal buffers. |
void |
delete(Delete delete)
Deletes the specified cells/row. |
void |
delete(List<Delete> deletes)
Deletes the specified cells/rows in bulk. |
Methods inherited from class org.apache.hadoop.hbase.client.HTable |
append, batch, batch, batchCallback, batchCallback, batchCoprocessorService, batchCoprocessorService, checkAndDelete, checkAndMutate, checkAndPut, clearRegionCache, coprocessorService, coprocessorService, coprocessorService, exists, exists, flushCommits, get, get, getConfiguration, getConnection, getDefaultExecutor, getEndKeys, getMaxKeyValueSize, getName, getOperationTimeout, getRegionCachePrefetch, getRegionCachePrefetch, getRegionCachePrefetch, getRegionCachePrefetch, getRegionLocation, getRegionLocation, getRegionLocation, getRegionLocations, getRegionsInRange, getRegionsInRange, getRowOrBefore, getScanner, getScanner, getScanner, getScannerCaching, getStartEndKeys, getStartKeys, getTableDescriptor, getTableName, getWriteBuffer, getWriteBufferSize, increment, incrementColumnValue, incrementColumnValue, incrementColumnValue, isAutoFlush, isTableEnabled, isTableEnabled, isTableEnabled, isTableEnabled, isTableEnabled, isTableEnabled, main, mutateRow, processBatch, processBatchCallback, put, put, setAutoFlush, setAutoFlush, setAutoFlushTo, setOperationTimeout, setRegionCachePrefetch, setRegionCachePrefetch, setRegionCachePrefetch, setRegionCachePrefetch, setScannerCaching, setWriteBufferSize, toString, validatePut, validatePut |
BufferedHTable
public BufferedHTable(org.apache.hadoop.conf.Configuration conf,
String tableName)
throws IOException
- Throws:
IOException
BufferedHTable
public BufferedHTable(org.apache.hadoop.conf.Configuration conf,
byte[] tableName)
throws IOException
- Throws:
IOException
delete
public void delete(Delete delete)
throws IOException
- Description copied from class:
HTable
- Deletes the specified cells/row.
- Specified by:
delete
in interface HTableInterface
- Overrides:
delete
in class HTable
- Parameters:
delete
- The object that specifies what to delete.
- Throws:
IOException
- if a remote or network exception occurs.
delete
public void delete(List<Delete> deletes)
throws IOException
- Description copied from class:
HTable
- Deletes the specified cells/rows in bulk.
- Specified by:
delete
in interface HTableInterface
- Overrides:
delete
in class HTable
- Parameters:
deletes
- List of things to delete. List gets modified by this
method (in particular it gets re-ordered, so the order in which the elements
are inserted in the list gives no guarantee as to the order in which the
Delete
s are executed).
- Throws:
IOException
- if a remote or network exception occurs. In that case
the deletes
argument will contain the Delete
instances
that have not be successfully applied.
close
public void close()
throws IOException
- Description copied from interface:
HTableInterface
- Releases any resources held or pending changes in internal buffers.
- Specified by:
close
in interface Closeable
- Specified by:
close
in interface HTableInterface
- Overrides:
close
in class HTable
- Throws:
IOException
- if a remote or network exception occurs.
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.