Skip to content

Commit

Permalink
add log to debug windows extracting process
Browse files Browse the repository at this point in the history
  • Loading branch information
reyman committed Sep 19, 2024
1 parent e6fbbe2 commit a036409
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/scala/eighties/h24/tools/ExtractRelevantData.scala
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,20 @@ import com.github.tototoshi.csv.defaultCSVFormat
val writer = dataStore.getFeatureWriterAppend(typeName, Transaction.AUTO_COMMIT)
try {
val reader = store.getFeatureReader
Log.log("Get Feature reader")
try {
Try {
val featureReader = Iterator.continually(reader.next).takeWhile(_ => reader.hasNext)
featureReader.filter(feature=>filter(feature)).foreach{
feature=>
Log.log("Write ...")
writer.next.setAttributes(feature.getAttributes)
writer.write()
}
writer.close()
Log.log("Write close")
dataStore.dispose()
Log.log("dataStore dispose")
}
} catch {
case e: IOException => println("Had an IOException trying reading this file")
Expand Down

0 comments on commit a036409

Please sign in to comment.