@InterfaceAudience.LimitedPrivate(value="Tools") @InterfaceStability.Evolving public class WALPrettyPrinter extends Object
| Constructor and Description |
|---|
WALPrettyPrinter()
Basic constructor that simply initializes values to reasonable defaults.
|
| Modifier and Type | Method and Description |
|---|---|
void |
beginPersistentOutput()
enables output as a single, persistent list.
|
void |
disableJSON()
turns JSON output off, and turns on "pretty strings" for human consumption
|
void |
disableValues()
turns value output off
|
void |
enableJSON()
turns JSON output on
|
void |
enableValues()
turns value output on
|
void |
endPersistentOutput()
ends output of a single, persistent list.
|
static void |
main(String[] args) |
static void |
printCell(PrintStream out,
Map<String,Object> op,
boolean outputValues,
boolean outputOnlyRowKey) |
void |
processFile(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path p)
reads a log file and outputs its contents, one transaction at a time, as specified by the
currently configured options n * the HBase configuration relevant to this log file n * the path
of the log file to be read n * may be unable to access the configured filesystem or requested
file.
|
static void |
run(String[] args)
Pass one or more log file names and formatting options and it will dump out a text version of
the contents on
stdout. |
void |
setOutputOnlyRowKey()
Option to print the row key only in case you just need the row keys from the WAL
|
void |
setPosition(long position)
sets the position to start seeking the WAL file n * initial position to start seeking the given
WAL file
|
void |
setRegionFilter(String region)
sets the region by which output will be filtered n * when not null, serves as a filter; only
log entries from this region will be printed
|
void |
setRowFilter(String row)
sets the row key by which output will be filtered n * when not null, serves as a filter; only
log entries from this row will be printed
|
void |
setRowPrefixFilter(String rowPrefix)
sets the rowPrefix key prefix by which output will be filtered n * when not null, serves as a
filter; only log entries with rows having this prefix will be printed
|
void |
setSequenceFilter(long sequence)
sets the region by which output will be filtered n * when nonnegative, serves as a filter; only
log entries with this sequence id will be printed
|
void |
setTableFilter(String tablesWithDelimiter)
Sets the tables filter.
|
static Map<String,Object> |
toStringMap(Cell cell) |
static Map<String,Object> |
toStringMap(Cell cell,
boolean printRowKeyOnly,
String rowPrefix,
String row,
boolean outputValues) |
public WALPrettyPrinter()
public void enableValues()
public void disableValues()
public void enableJSON()
public void disableJSON()
public void setSequenceFilter(long sequence)
public void setTableFilter(String tablesWithDelimiter)
tablesWithDelimiter - table names separated with comma.public void setRegionFilter(String region)
public void setRowFilter(String row)
public void setRowPrefixFilter(String rowPrefix)
public void setOutputOnlyRowKey()
public void setPosition(long position)
public void beginPersistentOutput()
public void endPersistentOutput()
public void processFile(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path p)
throws IOException
IOExceptionpublic static void printCell(PrintStream out, Map<String,Object> op, boolean outputValues, boolean outputOnlyRowKey)
public static Map<String,Object> toStringMap(Cell cell, boolean printRowKeyOnly, String rowPrefix, String row, boolean outputValues)
public static void main(String[] args) throws IOException
IOExceptionpublic static void run(String[] args) throws IOException
stdout. n * Command line arguments n * Thrown upon file system
errors etc.IOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.