-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bulk Loader: Fix memory usage by JSON parser #3794
Merged
Merged
Changes from 15 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
ded891b
Create a new NQuads struct and move Parse under it.
manishrjain 9ac7d50
Move all nquads to the new NQuads struct.
manishrjain a6047b1
Make parse tests work
manishrjain 6832162
Code runs and all
manishrjain f4cf4be
Run GC every 5s
manishrjain 39a00b3
GC every 10s
manishrjain b81b207
Set worker goroutines aka mappers to 1/4th of the number of cores.
manishrjain fa831be
Only run GC if it hadn't been run. Also mention the RAM usage being p…
manishrjain 70eb295
Files moved to one directory to allow easier sharing of the code.
manishrjain b7a299b
Add batchSize option to Chunker and NQuadBuffer to simplify loader an…
manishrjain 17b557b
Bring the edgraph/server.go code back. Move multiple RDF parsing to c…
manishrjain 3f89c68
Hook up NQuadBuffer to RDFChunker.NQuads
manishrjain 5e12649
Address golint issues
manishrjain 948bfde
Fix the live loader test failure.
manishrjain 3e25781
Don't think we need a for loop around chunker.Parse
manishrjain 541c9be
Move FacetDelimiter to x package to avoid a cyclic import loop.
manishrjain 297651f
Fix gql package test
manishrjain 8f7f8cf
Fix a test failure by handling io.EOF
manishrjain 1d1f529
Don't return io.EOF unnecessarily
manishrjain de862d1
Address comments by PR folks. Also, no need to handle io.EOF because …
manishrjain 5c420fb
Address PR folks comments
manishrjain File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is often considered best practice to have consistent typing with your receivers and if one is a pointer, make them all pointers. Since
NQuads()
andParse
are taking a pointer receiver you may consider keeping these others (Begin, Chunk, End) as pointer as well to avoid any surprises. (https://golang.org/doc/faq#methods_on_values_or_pointers)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The FAQ seems to only talk about values vs pointers. In this case, the rdfChunker object isn't even being used. Given that, it is clearer to not even declare the object variable. Clearly indicates to the user that the object isn't being used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry yeah I meant the type changing from
*rdfChunker
tordfChunker
, not the removing of the variable naming. So for example just updating to:Its totally fine to ignore in this case if you prefer though since you are always using the rdfChunker as a pointer it seems so it will have both sets of methods. It is just that there is a different set of methods available on an
rdChunker
in value vs pointer form currently.