diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2022-10-06 15:34:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-06 15:34:19 +0200 |
| commit | 7ba3b953300c46b4e3afcde17cd3dd14b1af8406 (patch) | |
| tree | 950ba678869ec868c26ab3b95b57e4cabadb23c7 /opendc-trace/opendc-trace-parquet/src | |
| parent | c2047d09b27b0c05f5c203509dde524e17d3b729 (diff) | |
| parent | 47357afd16f928260db34d4dd3e686fb9ee7c5ff (diff) | |
merge: Update build and runtime dependencies (#107)
This pull request updates the build and runtime dependencies used by OpenDC to their latest
version compatible with the project.
## Implementation Notes :hammer_and_pick:
* Update simulator dependency versions
* Remove unused distribution conventions
* Update next version to 3.0
* Eliminate use of wildcard imports
* Switch to Spotless for formatting
Diffstat (limited to 'opendc-trace/opendc-trace-parquet/src')
2 files changed, 10 insertions, 5 deletions
diff --git a/opendc-trace/opendc-trace-parquet/src/main/kotlin/org/opendc/trace/util/parquet/LocalParquetReader.kt b/opendc-trace/opendc-trace-parquet/src/main/kotlin/org/opendc/trace/util/parquet/LocalParquetReader.kt index eef83956..031bad60 100644 --- a/opendc-trace/opendc-trace-parquet/src/main/kotlin/org/opendc/trace/util/parquet/LocalParquetReader.kt +++ b/opendc-trace/opendc-trace-parquet/src/main/kotlin/org/opendc/trace/util/parquet/LocalParquetReader.kt @@ -46,14 +46,15 @@ public class LocalParquetReader<out T>( /** * The input files to process. */ - private val filesIterator = if (path.isDirectory()) + private val filesIterator = if (path.isDirectory()) { Files.list(path) .filter { !it.isDirectory() } .sorted() .map { LocalInputFile(it) } .iterator() - else + } else { listOf(LocalInputFile(path)).iterator() + } /** * The Parquet reader to use. @@ -76,10 +77,11 @@ public class LocalParquetReader<out T>( } else { initReader() - if (reader == null) + if (reader == null) { null - else + } else { read() + } } } catch (e: InterruptedException) { throw IOException(e) diff --git a/opendc-trace/opendc-trace-parquet/src/test/kotlin/org/opendc/trace/util/parquet/ParquetTest.kt b/opendc-trace/opendc-trace-parquet/src/test/kotlin/org/opendc/trace/util/parquet/ParquetTest.kt index 29fcac96..b6c5a423 100644 --- a/opendc-trace/opendc-trace-parquet/src/test/kotlin/org/opendc/trace/util/parquet/ParquetTest.kt +++ b/opendc-trace/opendc-trace-parquet/src/test/kotlin/org/opendc/trace/util/parquet/ParquetTest.kt @@ -35,8 +35,11 @@ import org.apache.parquet.schema.MessageType import org.apache.parquet.schema.PrimitiveType import org.apache.parquet.schema.Type import org.apache.parquet.schema.Types -import org.junit.jupiter.api.* +import org.junit.jupiter.api.AfterEach import org.junit.jupiter.api.Assertions.assertEquals +import org.junit.jupiter.api.BeforeEach +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.assertThrows import java.nio.file.FileAlreadyExistsException import java.nio.file.Files import java.nio.file.NoSuchFileException |
