File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
main/scala/spark/jobserver/io
test/scala/spark/jobserver/io Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -223,7 +223,7 @@ class JobCassandraDAO(config: Config) extends JobDAO with FileCacher {
223
223
val tuples = JListWrapper (rows).toIndexedSeq.map { row =>
224
224
(row.getInt(ChunkIndex ), row.getBytes(Binary ).array())
225
225
}
226
- tuples.sortBy (_._1).toMap.values .foldLeft(Array [Byte ]()) { _ ++ _ }
226
+ tuples.map (_._2) .foldLeft(Array [Byte ]()) { _ ++ _ }
227
227
}
228
228
229
229
override def getJobInfo (jobId : String ): Future [Option [JobInfo ]] = {
Original file line number Diff line number Diff line change @@ -138,6 +138,7 @@ class JobCassandraDAOSpec extends TestJarFinder with FunSpecLike with Matchers w
138
138
jarFilePath should equal (jarFile.getAbsolutePath)
139
139
val retrieved = new File (jarFilePath)
140
140
jarFile.length() should equal (retrieved.length())
141
+ Files .toByteArray(jarFile) should equal(Files .toByteArray(retrieved))
141
142
}
142
143
143
144
it(" should retrieve the jar binary content for remote job manager" ) {
@@ -150,6 +151,7 @@ class JobCassandraDAOSpec extends TestJarFinder with FunSpecLike with Matchers w
150
151
// test
151
152
jarFile.exists() should equal (true )
152
153
jarBinaryContent.length should equal (jarBytes.length)
154
+ jarBinaryContent should equal(jarBytes)
153
155
}
154
156
}
155
157
You can’t perform that action at this time.
0 commit comments