Class Util


  • public final class Util
    extends java.lang.Object
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Util.TermHistogram  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int countANSI​(java.lang.String string)  
      static void initDatabaseDescriptor()
      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 TableMetadata metadataFromSSTable​(Descriptor desc)
      Construct table schema from info stored in SSTable's Stats.db
      static java.lang.String progress​(double percentComplete, int width, boolean unicode)  
      static java.lang.String stripANSI​(java.lang.String string)  
      static java.lang.String wrapQuiet​(java.lang.String toWrap, boolean color)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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