Class DefaultFormatter
- java.lang.Object
-
- org.apache.accumulo.core.util.format.DefaultFormatter
-
-
Field Summary
Fields Modifier and Type Field Description protected FormatterConfig
config
-
Constructor Summary
Constructors Constructor Description DefaultFormatter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringBuilder
appendText(StringBuilder sb, org.apache.hadoop.io.Text t, int shownLength)
protected void
checkState(boolean expectInitialized)
String
formatEntry(Map.Entry<Key,Value> entry)
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)
static String
formatEntry(Map.Entry<Key,Value> entry, DateFormat timestampFormat)
Does not show timestamps if timestampFormat is nullstatic String
formatEntry(Map.Entry<Key,Value> entry, FormatterConfig config)
Iterator<Map.Entry<Key,Value>>
getScannerIterator()
boolean
hasNext()
void
initialize(Iterable<Map.Entry<Key,Value>> scanner, FormatterConfig config)
protected boolean
isDoTimestamps()
String
next()
void
remove()
-
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:
initialize
in 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()
-
-