Package org.apache.cassandra.tools
Class Util
- java.lang.Object
-
- org.apache.cassandra.tools.Util
-
public final class Util extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUtil.TermHistogram
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringALLOW_TOOL_REINIT_FOR_TEST
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intcountANSI(java.lang.String string)static voidinitDatabaseDescriptor()This is used by standalone tools to force static initialization of DatabaseDescriptor, and fail if configuration is bad.static <T> java.util.stream.Stream<T>iterToStream(java.util.Iterator<T> iter)static TableMetadatametadataFromSSTable(Descriptor desc)Construct table schema from info stored in SSTable's Stats.dbstatic java.lang.Stringprogress(double percentComplete, int width, boolean unicode)static java.lang.StringstripANSI(java.lang.String string)static java.lang.StringwrapQuiet(java.lang.String toWrap, boolean color)
-
-
-
Method Detail
-
progress
public static java.lang.String progress(double percentComplete, int width, boolean unicode)
-
stripANSI
public static java.lang.String stripANSI(java.lang.String string)
-
countANSI
public static int countANSI(java.lang.String string)
-
wrapQuiet
public static java.lang.String wrapQuiet(java.lang.String toWrap, boolean color)
-
initDatabaseDescriptor
public static void initDatabaseDescriptor()
This is used by standalone tools to force static initialization of DatabaseDescriptor, and fail if configuration is bad.
-
iterToStream
public static <T> java.util.stream.Stream<T> iterToStream(java.util.Iterator<T> iter)
-
metadataFromSSTable
public static TableMetadata metadataFromSSTable(Descriptor desc) throws java.io.IOException
Construct table schema from info stored in SSTable's Stats.db- Parameters:
desc- SSTable's descriptor- Returns:
- Restored CFMetaData
- Throws:
java.io.IOException- when Stats.db cannot be read
-
-