Xerial is data managment utilties for Scala. The ulitimate goal of Xerial project is to manage everything as database, including class objects, text format data (json, XML, Silk, etc.), data streams, etc.
Core utilities of xerial projects. No dependencies other than the scala-library exists in xerial-core.
- Useful collection classes
- CyclicArray (double-ended queue), RedBlackTree, balanced PrioritySearchTree (O(log N+k) for interval-intersection queries), UnionFindSet etc.
- Logger whose log levels and output targets can be configured through a JMX interface at runtime
- For use, simply extend
xerial.core.log.Loggertrait in your class, then call trace, debug, info, warn, error, fatal methods to output logs.
- Global log levels can be configured through JVM argument (e.g, -Dloglevel=debug)
- For use, simply extend
- Better benchmarking with Timer trait
xerial.core.util.Timertrait, then wrap your code with
timemethod. The execution time of the wrapped code will be reported (in debug log)
- You can also divide your code into sub blocks with
- Repetitive execution is supported; Use
- Resource trait for reading files in classpaths and jar files.
- Quite useful for reading resource files. (e.g., test data, graphic data, font files, etc.)
- Fast PEG parser generator
- (on-going) Producing Silk format parser codes for serval programming language including Scala(Java), C, etc.
Retrives object type information embeded in Scala-generated class files.
- ObjectSchema for getting full-fledged type information including generic types.
- Now you are free-from the type erasure problem!
ObjectSchema(cl:Class[_])to obtain consturctors, methods and the other parameters defined in a class.
- SigParser of the scalap is used for reading ScalaSignatures.
xerial.lens.cui.Launchercommand line parser
Applications of ObjectSchema
Eq trait for injecting field-value based hashCode and equals method to any objects
- Your classes extending Eq trait become ready to use in containers, e.g, Set[K], Map[K, V] etc.
Command-line parser (
- You can call methods in a class by mapping command line arguments to the method arguments
- String values are automatically converted to appropriate data types according to the information obtained by ObjectSchema
2016-12-13: release 3.6.0
- Support Scala 2.12
2016-03-04: release 3.5.0
- Support Scala 2.12.0-M3, 2.11.7, Scala 2.10.6 (except xerial-lens)
Version 3.3.8 (Sepmtember 2nd, 2015)
Scala 2.11.7 support
Version 3.4 (May 7th, 2015)
Scala 2.12.0-M1 support
Version 3.3.6 (March 6th, 2015)
Scala 2.11.6 support. Using Java8 u40 or later is recommended because u20 has a bug that affects scalap behaviour.
Version 3.3.5 (Feb 14th, 2015)
Scala 2.11.5 support
Version 3.3.0 (June 13th, 2014)
Supporting Scala 2.11.1
Version 3.2.3 (Jan 4th, 2013)
Upgrade to snappy-java-18.104.22.168
Fix a bug in DataUnit
Upgrace to Scala 2.10.3, snappy-java-1.1.0
Upgrade to Scala 2.10.2, sbt 0.13.0
Upgrade to Scala 2.10.1
Logger interface has changed. Use string-interpolation of Scala 2.10 instead of logging methods that take varialbe-length arguments.
Timer trait now reports core average of code blocks
Enhancement of command-line parser: allow nested command line options
Version 3.0: Scala-based release.
Migrating common utilities from Java to Scala
Add the following settings to your sbt build file (e.g.,
libraryDependencies += "org.xerial" %% "xerial-core" % "3.5.0" # When you want to use ObjectSchema and command line parser libraryDependencies += "org.xerial" %% "xerial-lens" % "3.5.0"
Using Snapshot version
resolvers += "Sonatype snapshot repo" at "https://oss.sonatype.org/content/repositories/snapshots/" libraryDependencies += "org.xerial" % "xerial-core" % "3.5.1-SNAPSHOT"
(Unidoc of API will be prepared)
# Cross build $ ./sbt "so test" # Release $ ./sbt release