Skip to content

Commit

Permalink
made minor stylistic adjustments from mateiz
Browse files Browse the repository at this point in the history
  • Loading branch information
kmader committed Aug 14, 2014
1 parent df8e528 commit bc5c0b9
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,19 @@ private[spark] class FixedLengthBinaryInputFormat
// but still contains a complete set of records, with the first record
// starting at the first byte in the split and the last record ending with the last byte

defaultSize match {
case x if x < recordLength => recordLength.toLong
case _ => (Math.floor(defaultSize / recordLength) * recordLength).toLong
if (defaultSize < recordLength) {
recordLength.toLong
} else {
(Math.floor(defaultSize / recordLength) * recordLength).toLong
}
}

/**
* Create a FixedLengthBinaryRecordReader
*/
override def createRecordReader(split: InputSplit, context: TaskAttemptContext):
RecordReader[LongWritable, BytesWritable] = {
new FixedLengthBinaryRecordReader
RecordReader[LongWritable, BytesWritable] = {
new FixedLengthBinaryRecordReader
}

var recordLength = -1
Expand Down

0 comments on commit bc5c0b9

Please sign in to comment.