Class

fm.lazyseq.SortedLazySeqBuilder

ReadSortedRecords

Related Doc: package SortedLazySeqBuilder

Permalink

final class ReadSortedRecords extends WithFilterCompat[V, LazySeq] with LazySeq[V] with Closeable

A reusable reader that performs a merge sort on the sorted files

Note: We use RandomAccessFile to hold onto the FileDescriptor of the temp file and open FileInputStreams based on the FileDescriptor. This allows us to delete the unlink the temp file from the file system while retaining a reference to it here so we can still read it. Then when the FileDescriptor gets garbage collected OR the JVM shuts down the file will be automatically deleted.

Linear Supertypes
Closeable, AutoCloseable, LazySeq[V], TraversableOnce[V], WithFilterCompat[V, LazySeq], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ReadSortedRecords
  2. Closeable
  3. AutoCloseable
  4. LazySeq
  5. TraversableOnce
  6. WithFilterCompat
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ReadSortedRecords(files: Vector[Vector[MappedByteBuffer]])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ++[B >: V](rest: LazySeq[B]): LazySeq[B]

    Permalink
    Definition Classes
    LazySeq
  4. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  5. final def after[U](f: (V) ⇒ U): LazySeq[V]

    Permalink

    Run this function on each item after the foreach function

    Run this function on each item after the foreach function

    This is basically a foreach but without forcing evaluation of this LazySeq.

    Definition Classes
    LazySeq
  6. final def afterWithResource[R, U](resource: Resource[R])(f: (V, R) ⇒ U): LazySeq[V]

    Permalink

    Same as after() but takes a Resource (i.e.

    Same as after() but takes a Resource (i.e. can use it for something like logging)

    Definition Classes
    LazySeq
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. final def asTraversableOnce: TraversableOnce[V]

    Permalink
    Definition Classes
    TraversableOnce
  9. final def assertSorted[B >: V](implicit ord: Ordering[B]): LazySeq[B]

    Permalink

    Assert that this reader is in sorted order

    Assert that this reader is in sorted order

    Definition Classes
    LazySeq
  10. final def assertSortedAndUnique[B >: V](implicit ord: Ordering[B]): LazySeq[B]

    Permalink

    Assert that this reader is in sorted order AND unique

    Assert that this reader is in sorted order AND unique

    Definition Classes
    LazySeq
  11. final def assertSortedAndUniqueBy[K](key: (V) ⇒ K)(implicit ord: Ordering[K]): LazySeq[V]

    Permalink
    Definition Classes
    LazySeq
  12. final def assertSortedBy[K](key: (V) ⇒ K)(implicit ord: Ordering[K]): LazySeq[V]

    Permalink
    Definition Classes
    LazySeq
  13. final def before[U](f: (V) ⇒ U): LazySeq[V]

    Permalink

    Run this function on each item before the foreach function

    Run this function on each item before the foreach function

    This is basically a foreach but without forcing evaluation of this LazySeq.

    Definition Classes
    LazySeq
  14. final def beforeWithResource[R, U](resource: Resource[R])(f: (V, R) ⇒ U): LazySeq[V]

    Permalink

    Same as before() but takes a Resource (i.e.

    Same as before() but takes a Resource (i.e. can use it for something like logging)

    Definition Classes
    LazySeq
  15. final def bucketize[B >: V](num: Int)(implicit serializer: Serializer[B]): Vector[LazySeq[B]]

    Permalink

    Split the LazySeq into num buckets of equal size using a round-robin algorithm

    Split the LazySeq into num buckets of equal size using a round-robin algorithm

    Definition Classes
    LazySeq
  16. final def buffered[B >: V](queue: BlockingQueue[B]): BufferedLazySeq[B]

    Permalink

    Creates an asynchronous buffer that spins up a producer thread which feeds data into a BlockingQueue that is read using the resulting LazySeq.

    Creates an asynchronous buffer that spins up a producer thread which feeds data into a BlockingQueue that is read using the resulting LazySeq. This overload lets you pass in your own BlockingQueue implementation instead of having one created for you.

    Definition Classes
    LazySeq
  17. final def buffered(size: Int): BufferedLazySeq[V]

    Permalink

    Creates an asynchronous buffer that spins up a producer thread which feeds data into a BlockingQueue that is read using the resulting LazySeq.

    Creates an asynchronous buffer that spins up a producer thread which feeds data into a BlockingQueue that is read using the resulting LazySeq. The created BlockingQueue will depend on the size passed in. If the size is <= 0 then a SynchronousQueue otherwise an ArrayBlockingQueue is used.

    Definition Classes
    LazySeq
  18. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  19. def close(): Unit

    Permalink
    Definition Classes
    ReadSortedRecords → Closeable → AutoCloseable
  20. final def collapseBy[B >: V, K](key: (B) ⇒ K)(op: (B, B) ⇒ B)(implicit ord: Ordering[K]): LazySeq[B]

    Permalink
    Definition Classes
    LazySeq
  21. final def collect[B](pf: PartialFunction[V, B]): LazySeq[B]

    Permalink
    Definition Classes
    LazySeq
  22. final def copyToArray[B >: V](xs: Array[B], start: Int, len: Int): Unit

    Permalink
    Definition Classes
    LazySeq
  23. final def drop(n: Int): LazySeq[V]

    Permalink
    Definition Classes
    LazySeq
  24. final def dropRight(n: Int): LazySeq[V]

    Permalink
    Definition Classes
    LazySeq
  25. final def dropWhile(p: (V) ⇒ Boolean): LazySeq[V]

    Permalink
    Definition Classes
    LazySeq
  26. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  27. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  28. final def exists(p: (V) ⇒ Boolean): Boolean

    Permalink
    Definition Classes
    LazySeq
  29. final def filter(p: (V) ⇒ Boolean): LazySeq[V]

    Permalink
    Definition Classes
    LazySeq
  30. final def filterNot(p: (V) ⇒ Boolean): LazySeq[V]

    Permalink
    Definition Classes
    LazySeq
  31. def finalize(): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    ReadSortedRecords → AnyRef
  32. final def find(p: (V) ⇒ Boolean): Option[V]

    Permalink
    Definition Classes
    LazySeq
  33. final def flatMap[B](f: (V) ⇒ TraversableOnce[B])(implicit dummyImplicit: DummyImplicit): LazySeq[B]

    Permalink
    Definition Classes
    LazySeq
  34. final def flatMap[B](f: (V) ⇒ TraversableOnceOrIterableOnce[B]): LazySeq[B]

    Permalink
    Definition Classes
    LazySeq → WithFilterCompat
  35. final def flatten[B](implicit asTraversable: (V) ⇒ TraversableOnceOrIterableOnce[B]): LazySeq[B]

    Permalink
    Definition Classes
    LazySeq
  36. def foldLeft[B](z: B)(op: (B, V) ⇒ B): B

    Permalink
    Definition Classes
    TraversableOnce
  37. final def forall(p: (V) ⇒ Boolean): Boolean

    Permalink
    Definition Classes
    LazySeq
  38. def foreach[U](f: (V) ⇒ U): Unit

    Permalink

    This is the method that sub-classes must implement

    This is the method that sub-classes must implement

    Definition Classes
    ReadSortedRecordsLazySeq → TraversableOnce → WithFilterCompat
  39. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  40. final def groupBy[B >: V, K](f: (V) ⇒ K)(implicit serializer: Serializer[B]): Map[K, LazySeq[B]]

    Permalink
    Definition Classes
    LazySeq
  41. final def groupBy[B >: V, K](serializer: Serializer[B])(f: (V) ⇒ K): Map[K, LazySeq[B]]

    Permalink

    Mostly standard group by implementation that uses tmp files to store the values of the HashMap

    Mostly standard group by implementation that uses tmp files to store the values of the HashMap

    Definition Classes
    LazySeq
  42. final def grouped[B >: V](size: Int, additionalIncrement: (B) ⇒ Int): LazySeq[IndexedSeq[B]]

    Permalink
    Definition Classes
    LazySeq
  43. final def grouped[B >: V](size: Int): LazySeq[IndexedSeq[B]]

    Permalink
    Definition Classes
    LazySeq
  44. final def groupedBy[K](by: (V) ⇒ K): LazySeq[(K, IndexedSeq[V])]

    Permalink

    A cross between grouped and groupBy that allows you to specify a key to be used (like in groupBy) instead of a fixed count (like in grouped).

    A cross between grouped and groupBy that allows you to specify a key to be used (like in groupBy) instead of a fixed count (like in grouped). All elements next to each other with the same key get returned in each group.

    e.g. LazySeq.wrap(Seq(1,1,1,2,2,1)).groupedBy{ a => a }.toIndexedSeq => Vector((1,Vector(1, 1, 1)), (2,Vector(2, 2)), (1,Vector(1)))

    Definition Classes
    LazySeq
  45. final def hasKnownSize: Boolean

    Permalink
    Definition Classes
    TraversableOnce
  46. final def hasKnownSizeAndIsEmpty: Boolean

    Permalink
    Definition Classes
    TraversableOnce
  47. final def hasKnownSizeAndIsNonEmpty: Boolean

    Permalink
    Definition Classes
    TraversableOnce
  48. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  49. def head: V

    Permalink
    Definition Classes
    LazySeq
  50. def headOption: Option[V]

    Permalink
    Definition Classes
    LazySeq
  51. def isEmpty: Boolean

    Permalink
    Definition Classes
    LazySeq
  52. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  53. def isTraversableAgain: Boolean

    Permalink
    Definition Classes
    TraversableOnce
  54. def knownSize: Int

    Permalink
    Definition Classes
    LazySeq → TraversableOnce
  55. final def map[B](f: (V) ⇒ B): LazySeq[B]

    Permalink
    Definition Classes
    LazySeq → WithFilterCompat
  56. def max[B >: V](implicit cmp: Ordering[B]): V

    Permalink
    Definition Classes
    TraversableOnce
  57. final def mergeCorresponding[B >: V](that: LazySeq[B])(implicit ord: Ordering[B]): LazySeq[EitherOrBoth[B, B]]

    Permalink
    Definition Classes
    LazySeq
  58. final def mergeCorrespondingByKey[R, K](that: LazySeq[R], thisKey: (V) ⇒ K, thatKey: (R) ⇒ K)(implicit ord: Ordering[K]): LazySeq[EitherOrBoth[V, R]]

    Permalink

    Merge corresponding records from this sorted read with that sorted reader given a method to get a common key that can be compared.

    Merge corresponding records from this sorted read with that sorted reader given a method to get a common key that can be compared.

    Definition Classes
    LazySeq
  59. def min[B >: V](implicit ord: Ordering[B]): V

    Permalink
    Definition Classes
    TraversableOnce
  60. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  61. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  62. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  63. final def onFirst[U](f: (V) ⇒ U): LazySeq[V]

    Permalink

    Execute the method on the first element of the LazySeq whenever it is evaluated.

    Execute the method on the first element of the LazySeq whenever it is evaluated.

    Note: The first element is still call via foreach

    Definition Classes
    LazySeq
  64. final def onLast[U](f: (V) ⇒ U): LazySeq[V]

    Permalink

    Same as onFirst except for the last element whenever it is evaluated

    Same as onFirst except for the last element whenever it is evaluated

    Definition Classes
    LazySeq
  65. final def parFlatMap[B](threads: Int = LazySeq.defaultThreadCount, inputBuffer: Int = LazySeq.defaultThreadCount, resultBuffer: Int = LazySeq.defaultThreadCount * 4)(f: (V) ⇒ TraversableOnceOrIterableOnce[B]): LazySeq[B]

    Permalink

    Performs a parallel flat map maintaining ordered output

    Performs a parallel flat map maintaining ordered output

    Definition Classes
    LazySeq
  66. final def parFlatMap[B](f: (V) ⇒ TraversableOnceOrIterableOnce[B]): LazySeq[B]

    Permalink

    Performs a parallel flat map maintaining ordered output

    Performs a parallel flat map maintaining ordered output

    Definition Classes
    LazySeq
  67. final def parForeach[U](threads: Int = LazySeq.defaultThreadCount, inputBuffer: Int = LazySeq.defaultThreadCount)(f: (V) ⇒ U): Unit

    Permalink

    A Parallel foreach

    A Parallel foreach

    Definition Classes
    LazySeq
  68. final def parForeach[U](f: (V) ⇒ U): Unit

    Permalink

    A Parallel foreach

    A Parallel foreach

    Definition Classes
    LazySeq
  69. final def parMap[B](threads: Int = LazySeq.defaultThreadCount, inputBuffer: Int = LazySeq.defaultThreadCount, resultBuffer: Int = LazySeq.defaultThreadCount * 4)(f: (V) ⇒ B): LazySeq[B]

    Permalink

    Performs a parallel map maintaining ordered output

    Performs a parallel map maintaining ordered output

    Definition Classes
    LazySeq
  70. final def parMap[B](f: (V) ⇒ B): LazySeq[B]

    Permalink

    Performs a parallel map maintaining ordered output

    Performs a parallel map maintaining ordered output

    Definition Classes
    LazySeq
  71. final def partition[B >: V](p: (V) ⇒ Boolean)(implicit serializer: Serializer[B]): (LazySeq[B], LazySeq[B])

    Permalink

    Standard partition implementation using LazySeqs

    Standard partition implementation using LazySeqs

    Definition Classes
    LazySeq
  72. def reduceLeft[B >: V](op: (B, V) ⇒ B): B

    Permalink
    Definition Classes
    TraversableOnce
  73. def reduceLeftOption[B >: V](op: (B, V) ⇒ B): Option[B]

    Permalink
    Definition Classes
    TraversableOnce
  74. final def shuffle[B >: V](implicit serializer: Serializer[B]): LazySeq[B]

    Permalink
    Definition Classes
    LazySeq
  75. final def shuffle[B >: V](seed: Long)(implicit serializer: Serializer[B]): LazySeq[B]

    Permalink
    Definition Classes
    LazySeq
  76. final def shuffle[B >: V](random: Random)(implicit serializer: Serializer[B]): LazySeq[B]

    Permalink
    Definition Classes
    LazySeq
  77. final def slice(from: Int, until: Int): LazySeq[V]

    Permalink
    Definition Classes
    LazySeq
  78. final def sortAndCollapseBy[B >: V, K](bufferSizeLimitMB: Int, bufferRecordLimit: Int)(key: (B) ⇒ K)(op: (B, B) ⇒ B)(implicit serializer: Serializer[B], ord: Ordering[K]): LazySeq[B]

    Permalink
    Definition Classes
    LazySeq
  79. final def sortAndCollapseBy[B >: V, K](serializer: Serializer[B], bufferSizeLimitMB: Int, bufferRecordLimit: Int)(key: (B) ⇒ K)(op: (B, B) ⇒ B)(implicit ord: Ordering[K]): LazySeq[B]

    Permalink
    Definition Classes
    LazySeq
  80. final def sortAndCollapseBy[B >: V, K](key: (B) ⇒ K)(op: (B, B) ⇒ B)(implicit serializer: Serializer[B], ord: Ordering[K]): LazySeq[B]

    Permalink
    Definition Classes
    LazySeq
  81. final def sortAndCollapseBy[B >: V, K](serializer: Serializer[B])(key: (B) ⇒ K)(op: (B, B) ⇒ B)(implicit ord: Ordering[K]): LazySeq[B]

    Permalink

    Collapse elements with the same key by applying a binary operator.

    Collapse elements with the same key by applying a binary operator.

    Should be similar to doing something like: reader.groupBy(key).values.flatMap{ _.reduce(op) }

    Definition Classes
    LazySeq
  82. final def sortBy[B >: V, K](bufferSizeLimitMB: Int, bufferRecordLimit: Int)(f: (B) ⇒ K)(implicit serializer: Serializer[B], ord: Ordering[K]): LazySeq[B]

    Permalink
    Definition Classes
    LazySeq
  83. final def sortBy[B >: V, K](serializer: Serializer[B], bufferSizeLimitMB: Int, bufferRecordLimit: Int)(f: (B) ⇒ K)(implicit ord: Ordering[K]): LazySeq[B]

    Permalink
    Definition Classes
    LazySeq
  84. final def sortBy[B >: V, K](f: (B) ⇒ K)(implicit serializer: Serializer[B], ord: Ordering[K]): LazySeq[B]

    Permalink
    Definition Classes
    LazySeq
  85. final def sortBy[B >: V, K](serializer: Serializer[B])(f: (B) ⇒ K)(implicit ord: Ordering[K]): LazySeq[B]

    Permalink
    Definition Classes
    LazySeq
  86. final def sorted[B >: V](bufferSizeLimitMB: Int, bufferRecordLimit: Int)(implicit serializer: Serializer[B], ord: Ordering[B]): LazySeq[B]

    Permalink
    Definition Classes
    LazySeq
  87. final def sorted[B >: V](implicit serializer: Serializer[B], ord: Ordering[B]): LazySeq[B]

    Permalink
    Definition Classes
    LazySeq
  88. def sum[B >: V](implicit num: Numeric[B]): B

    Permalink
    Definition Classes
    TraversableOnce
  89. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  90. final def take(n: Int): LazySeq[V]

    Permalink
    Definition Classes
    LazySeq
  91. final def takeWhile(p: (V) ⇒ Boolean): LazySeq[V]

    Permalink
    Definition Classes
    LazySeq
  92. def toArray[B >: V](implicit arg0: ClassTag[B]): Array[B]

    Permalink
    Definition Classes
    TraversableOnce
  93. def toIndexedSeq: IndexedSeq[V]

    Permalink
    Definition Classes
    TraversableOnce
  94. def toIterator(batchSize: Int = 32, bufferSize: Int = 0): LazySeqIterator[V]

    Permalink
    Definition Classes
    LazySeq
  95. def toIterator: LazySeqIterator[V]

    Permalink
    Definition Classes
    LazySeq
  96. def toList: List[V]

    Permalink
    Definition Classes
    TraversableOnce
  97. def toSeq: Seq[V]

    Permalink
    Definition Classes
    TraversableOnce
  98. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  99. def toVector: Vector[V]

    Permalink
    Definition Classes
    TraversableOnce
  100. final def unique: LazySeq[V]

    Permalink
    Definition Classes
    LazySeq
  101. final def uniqueSortBy[B >: V, K](f: (B) ⇒ K)(implicit serializer: Serializer[B], ord: Ordering[K]): LazySeq[B]

    Permalink
    Definition Classes
    LazySeq
  102. final def uniqueSortBy[B >: V, K](serializer: Serializer[B])(f: (B) ⇒ K)(implicit ord: Ordering[K]): LazySeq[B]

    Permalink
    Definition Classes
    LazySeq
  103. final def uniqueSorted[B >: V](implicit serializer: Serializer[B], ord: Ordering[B]): LazySeq[B]

    Permalink
    Definition Classes
    LazySeq
  104. final def uniqueUsing[K](f: (V) ⇒ K): LazySeq[V]

    Permalink
    Definition Classes
    LazySeq
  105. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  106. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  107. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  108. final def withFilter(p: (V) ⇒ Boolean): LazySeq[V]

    Permalink
    Definition Classes
    LazySeq → WithFilterCompat
  109. final def zipWithIndex: LazySeq[(V, Int)]

    Permalink
    Definition Classes
    LazySeq

Inherited from Closeable

Inherited from AutoCloseable

Inherited from LazySeq[V]

Inherited from TraversableOnce[V]

Inherited from WithFilterCompat[V, LazySeq]

Inherited from AnyRef

Inherited from Any

Ungrouped