Skip to content

Instantly share code, notes, and snippets.

View pmenon's full-sized avatar

Prashanth Menon pmenon

View GitHub Profile
@pmenon
pmenon / FetchRequest.scala
Created January 23, 2012 02:17
New FetchRequest structure
object FetchOffsetDetail {
def readFrom(buffer: ByteBuffer): FetchOffsetDetail = {
val topic = Utils.readShortString(buffer, "UTF-8")
val partitionsCount = buffer.getShort
val partitions = new Array[Int](partitionsCount)
for (i <- 0 until partitions.length)
partitions(i) = buffer.getInt
val offsetsCount = buffer.getShort
val offsets = new Array[Long](offsetsCount)
for (i <- 0 until offsets.length)