Comments (6)
For Spark, we upload the bfmap
file to HDFS. This allows the Spark executors read the map from HDFS, which should be better than having them all connecting to the PostgreSQL database at the same time.
To create a bfmap
file from the PostgreSQL database, use this code: https://gist.github.com/jongiddy/67c7ace4e7394e1e5f3bea978ddf74ec (this is set to run inside a Vagrant virtual machine, but changing the hardwired /vagrant
paths will make it suitable for other environments).
To read the bfmap
file from HDFS, we created a HadoopMapReader
: https://gist.github.com/jongiddy/b68be517274a424df84d2bea4cdd6354
And our BroadcastMatcher then looks like this (although I have edited out some application-specific code): https://gist.github.com/jongiddy/286857e09f9881854a725634ca82b515
from barefoot.
@smattheis No worries! To be clear, we never saw a problem caused by the locking. I think I added that while debugging a thread-safety issue that actually occurred in a part of my code.
from barefoot.
@jongiddy @smattheis thanks guys this is awesome
from barefoot.
@jongiddy Thanks, for sharing that! BTW: ... double-checked locking, you could have let me know. ;)
from barefoot.
@jim2 I'm glad it helps. If you any more question, feel free to keep this issue open, or open another one. Once the question/problem regarding spark is resolved for you, please close the issue.
@jongiddy Alright. Anyways, your reference in the comment explains that it's a code smell. I never knew that.
from barefoot.
I'm closing this as it seemed to be resolved.
from barefoot.
Related Issues (20)
- Proximity of road segments ids after map-matching HOT 2
- Docker build failing with osmosis installation HOT 1
- reach of map HOT 3
- Unable to save the output while using the barefoot for offline map matching in scalable manner HOT 10
- Road switch to early. HOT 5
- email validation bug: preventing contact-us submission and access to bmwfs
- Docker build fails at gradlew assemble HOT 3
- Can Matcher be cached?
- Issue downloading gradle during installation. HOT 2
- Spark: matcher response time too long as barefoot servers(stand-alone)
- Can we use any road network with geometry instead of OSM? HOT 2
- Question: Add administrative boundaries to matcher response
- Unable to build maven project
- Unable to build matcher server
- question about online map match
- help!Have you realized it? Please help me deploy the source code for payment
- HMM Break no emssion state
- How to match multi-trajection and save the matching result?
- Possible mistake in path.cost()
- Matching Behaviour is incorrect
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from barefoot.