I’m working through the Tour. When I get to “A bigger dataset”, I’m having issues loading that data.
If I run:
docker exec -it dgraph dgraph live -f 1million.rdf.gz --alpha localhost:9080 --zero localhost:5080 -c 1
I get the following output:
Running transaction with dgraph endpoint: localhost:9080
Found 1 data file(s) to process
Processing data file "1million.rdf.gz"
panic: interface conversion: interface {} is *time.Time, not time.Time
goroutine 105 [running]:
github.com/dgraph-io/dgraph/tok.YearTokenizer.Tokens(0x18732a0, 0xc0044fd080, 0x10, 0xc0044e0490, 0x14, 0xc0018a3413, 0xc002e00000)
/tmp/go/src/github.com/dgraph-io/dgraph/tok/tok.go:214 +0x185
github.com/dgraph-io/dgraph/tok.BuildTokens(0x18732a0, 0xc0044fd080, 0x1a864e0, 0x249ab50, 0x1a864e0, 0x249ab50, 0x0, 0x1, 0xc0044e0480)
/tmp/go/src/github.com/dgraph-io/dgraph/tok/tok.go:104 +0x63
github.com/dgraph-io/dgraph/dgraph/cmd/live.(*loader).conflictKeysForNQuad(0xc0001a2000, 0xc0030dc120, 0x10, 0x2, 0x2, 0x0, 0x0)
/tmp/go/src/github.com/dgraph-io/dgraph/dgraph/cmd/live/batch.go:309 +0x49e
github.com/dgraph-io/dgraph/dgraph/cmd/live.(*loader).conflictKeysForReq(0xc0001a2000, 0xc002831f88, 0xc00456e001, 0x6a7, 0x800)
/tmp/go/src/github.com/dgraph-io/dgraph/dgraph/cmd/live/batch.go:330 +0xe9
github.com/dgraph-io/dgraph/dgraph/cmd/live.(*loader).makeRequests(0xc0001a2000)
/tmp/go/src/github.com/dgraph-io/dgraph/dgraph/cmd/live/batch.go:392 +0x1db
created by github.com/dgraph-io/dgraph/dgraph/cmd/live.setup
/tmp/go/src/github.com/dgraph-io/dgraph/dgraph/cmd/live/run.go:359 +0x2f0
I’m running the other docker containers as recommended in the Introduction > Run Dgraph section.
Any idea what the problem is? Am I missing something simple?
MichelDiz
(Michel Diz)
February 13, 2020, 1:11am
2
Nope, let me investigate this. I think there is relation to an old issue. But, due the fact it is from a well known dataset. Need further investigation.
MichelDiz
(Michel Diz)
February 13, 2020, 2:48am
3
Hey, I found the source of the issue. It is a bug. You can follow here
opened 11:49AM - 24 Dec 19 UTC
closed 07:23AM - 19 Feb 20 UTC
kind/bug
status/accepted
area/import-export
area/live-loader
### What version of Dgraph are you using?
`master`
### Steps to reproduce th… e issue (command/config used to run Dgraph).
- [Exporting database](https://docs.dgraph.io/deploy/#export-database) in JSON.
```bash
$ curl 'localhost:8080/admin/export?format=json'
{"code": "Success", "message": "Export completed."}
```
- Fast load the data using [Live Loader](https://docs.dgraph.io/deploy/#live-loader).
```bash
$ dgraph live -f g01.json.gz -s g01.schema --alpha=localhost:9080 --zero=localhost:5080
...
Running transaction with dgraph endpoint: localhost:9080
Processing schema file "g01.schema"
Processed schema file "g01.schema"
Found 1 data file(s) to process
Processing data file "g01.json.gz"
panic: interface conversion: interface {} is *time.Time, not time.Time
goroutine 45 [running]:
github.com/dgraph-io/dgraph/tok.HourTokenizer.Tokens(0x1818880, 0xc0027920a0, 0x10, 0xc004074020, 0xa, 0xc00328c003, 0xc000131880)
/home/prashant/go/src/github.com/dgraph-io/dgraph/tok/tok.go:262 +0x3ca
github.com/dgraph-io/dgraph/tok.BuildTokens(0x1818880, 0xc0027920a0, 0x1a230e0, 0x261d298, 0x1a230e0, 0x261d298, 0x0, 0x1, 0xc004074010)
/home/prashant/go/src/github.com/dgraph-io/dgraph/tok/tok.go:104 +0x63
github.com/dgraph-io/dgraph/dgraph/cmd/live.(*loader).conflictKeysForNQuad(0xc0002e8000, 0xc00348c510, 0x3e8, 0xc004072000, 0xc000045380, 0x0, 0xc00009db00)
/home/prashant/go/src/github.com/dgraph-io/dgraph/dgraph/cmd/live/batch.go:301 +0x448
github.com/dgraph-io/dgraph/dgraph/cmd/live.(*loader).conflictKeysForReq(0xc0002e8000, 0xc000459f88, 0xc0007e2001, 0x7d0, 0x800)
/home/prashant/go/src/github.com/dgraph-io/dgraph/dgraph/cmd/live/batch.go:322 +0xe9
github.com/dgraph-io/dgraph/dgraph/cmd/live.(*loader).makeRequests(0xc0002e8000)
/home/prashant/go/src/github.com/dgraph-io/dgraph/dgraph/cmd/live/batch.go:384 +0x1db
created by github.com/dgraph-io/dgraph/dgraph/cmd/live.setup
/home/prashant/go/src/github.com/dgraph-io/dgraph/dgraph/cmd/live/run.go:356 +0x2f0
```
### Expected behaviour and actual result.
This issue is seen only while live loading **JSON** data and not for **RDFs**.
Also, I was able to **bulk load** the exported data in both JSON and RDFs without any problem.
*Note: Dataset used here was from [JS Flock](https://github.com/dgraph-io/flock/tree/master/js)*.
Also there is a workaround for that in the last comment.
Cheers.
Thanks for the investigation and quick response, Michel! I’ve got the data set loaded now.
There appears to be a schema issue on the next step. But I think I can figure that out or work around it.
system
(system)
Closed
March 14, 2020, 1:48pm
5
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.