@InterfaceAudience.Private public class IOTestProvider extends Object implements WALProvider
This implementation picks a directory in HDFS based on the same mechanisms as the
FSHLogProvider. Users can configure how much interaction we have with HDFS with the
configuration property "hbase.wal.iotestprovider.operations". The value should be a comma
separated list of allowed operations:
Only those operations listed will occur between the returned WAL and HDFS. All others will be no-ops.
Note that in the case of allowing "append" operations but not allowing "fileroll", the returned WAL will just keep writing to the same file. This won't avoid all costs associated with file management over time, becaue the data set size may result in additional HDFS block allocations.
WALProvider.AsyncWriter, WALProvider.Writer, WALProvider.WriterBase| Modifier and Type | Field and Description |
|---|---|
protected AtomicBoolean |
initialized |
| Constructor and Description |
|---|
IOTestProvider() |
| Modifier and Type | Method and Description |
|---|---|
void |
addWALActionsListener(WALActionsListener listener) |
void |
close() |
long |
getLogFileSize() |
long |
getNumLogFiles() |
WAL |
getWAL(RegionInfo region) |
List<WAL> |
getWALs() |
void |
init(WALFactory factory,
org.apache.hadoop.conf.Configuration conf,
String providerId) |
void |
shutdown() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetWALFileLengthProviderprotected AtomicBoolean initialized
public IOTestProvider()
public void init(WALFactory factory, org.apache.hadoop.conf.Configuration conf, String providerId) throws IOException
init in interface WALProviderfactory - factory that made us, identity used for FS layout. may not be nullconf - may not be nullproviderId - differentiate between providers from one facotry, used for FS layout. may be
nullIOExceptionpublic List<WAL> getWALs()
getWALs in interface WALProviderpublic WAL getWAL(RegionInfo region) throws IOException
getWAL in interface WALProviderIOExceptionpublic void close() throws IOException
close in interface WALProviderIOExceptionpublic void shutdown() throws IOException
shutdown in interface WALProviderIOExceptionpublic long getNumLogFiles()
getNumLogFiles in interface WALProviderpublic long getLogFileSize()
getLogFileSize in interface WALProviderpublic void addWALActionsListener(WALActionsListener listener)
addWALActionsListener in interface WALProviderCopyright © 2007–2019 Cloudera. All rights reserved.