Class DefaultFormatter
- java.lang.Object
-
- org.apache.accumulo.core.util.format.DefaultFormatter
-
- Direct Known Subclasses:
AggregatingFormatter,BinaryFormatter
public class DefaultFormatter extends Object implements Formatter
-
-
Field Summary
Fields Modifier and Type Field Description protected FormatterConfigconfig
-
Constructor Summary
Constructors Constructor Description DefaultFormatter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringBuilderappendText(StringBuilder sb, org.apache.hadoop.io.Text t, int shownLength)protected voidcheckState(boolean expectInitialized)StringformatEntry(Map.Entry<Key,Value> entry)static StringformatEntry(Map.Entry<Key,Value> entry, boolean showTimestamps)if showTimestamps, will useFormatterConfig.DefaultDateFormat.
Preferably, useformatEntry(java.util.Map.Entry, org.apache.accumulo.core.util.format.FormatterConfig)static StringformatEntry(Map.Entry<Key,Value> entry, DateFormat timestampFormat)Does not show timestamps if timestampFormat is nullstatic StringformatEntry(Map.Entry<Key,Value> entry, FormatterConfig config)Iterator<Map.Entry<Key,Value>>getScannerIterator()booleanhasNext()voidinitialize(Iterable<Map.Entry<Key,Value>> scanner, FormatterConfig config)protected booleanisDoTimestamps()Stringnext()voidremove()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Field Detail
-
config
protected FormatterConfig config
-
-
Method Detail
-
initialize
public void initialize(Iterable<Map.Entry<Key,Value>> scanner, FormatterConfig config)
- Specified by:
initializein interfaceFormatter
-
checkState
protected void checkState(boolean expectInitialized)
-
formatEntry
public static String formatEntry(Map.Entry<Key,Value> entry, boolean showTimestamps)
if showTimestamps, will useFormatterConfig.DefaultDateFormat.
Preferably, useformatEntry(java.util.Map.Entry, org.apache.accumulo.core.util.format.FormatterConfig)
-
formatEntry
public static String formatEntry(Map.Entry<Key,Value> entry, DateFormat timestampFormat)
Does not show timestamps if timestampFormat is null
-
formatEntry
public static String formatEntry(Map.Entry<Key,Value> entry, FormatterConfig config)
-
appendText
public static StringBuilder appendText(StringBuilder sb, org.apache.hadoop.io.Text t, int shownLength)
-
isDoTimestamps
protected boolean isDoTimestamps()
-
-