Skip to content

Commit dd6fd75

Browse files
committed
adding count log
1 parent da3ddb8 commit dd6fd75

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

scripts/src/main/scala/org/dbpedia/extraction/scripts/LanguageSpecificLinksGenerator.scala

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,10 @@ import org.apache.commons.compress.compressors.bzip2.{BZip2CompressorInputStream
1111
import org.dbpedia.extraction.util.FileLike
1212
import java.nio.charset.Charset
1313

14-
1514
/**
1615
* User: hadyelsahar
1716
*/
1817

19-
2018
object LanguageSpecificLinksGenerator {
2119

2220
//Todo: remove and include from org.dbpedia.extraction.util.IOUtils when merging Dump branch to main
@@ -148,6 +146,7 @@ object LanguageSpecificLinksGenerator {
148146
val inFile = new File(args(1))
149147

150148
//iterating over dump files -- readlines accept arg of type File implicitly through RichFile.wrapFile
149+
var lineCounter = 0
151150
IOUtils.readLines(inFile){ln =>
152151
if (ln != null)
153152
{
@@ -165,8 +164,14 @@ object LanguageSpecificLinksGenerator {
165164
}
166165
}
167166
}
167+
if ((lineCounter % 100000) == 0)
168+
{
169+
println("finished reading " + lineCounter + "lines.." )
170+
}
171+
lineCounter += 1
168172
}
169173

174+
println("finished reading " + lineCounter + "lines" )
170175
closeWriters
171176
}
172177

0 commit comments

Comments
 (0)