wdm0006 / dummyrdd Goto Github PK
View Code? Open in Web Editor NEWA pure python mock of pyspark's RDD
Home Page: http://wdm0006.github.io/DummyRDD/
License: BSD 3-Clause "New" or "Revised" License
A pure python mock of pyspark's RDD
Home Page: http://wdm0006.github.io/DummyRDD/
License: BSD 3-Clause "New" or "Revised" License
It's not clear that TinyS3 is needed, also not obvious without digging through code on how to set the AWS keys. Would also be nice if it supported profiles like boto, but that seems to be a limitation of TinyS3
from:
def map(self, f, preservesPartitioning=False): data = list(map(f, self._jrdd)) return RDD(data, self.ctx)
to:
def map(self, f, preservesPartitioning=False): data = map(f, self._jrdd) return RDD(data, self.ctx)
Do you know about anyone working on the support for Spark DataFrames? Are there any public plans on doing so?
I may be interested in collaborating with it.
I still see coverage as "69%":
https://github.com/wdm0006/DummyRDD/
On coveralls it already says "78%":
https://coveralls.io/github/wdm0006/DummyRDD?branch=master
Any idea of what is happening?
RDD.mapPartitions
in the mock works like RDD.map
but shouldn't.
import dummy_spark
rdd = dummy_spark.RDD([1, 2, 3], None)
_ = rdd.map(print) # should print 1\n2\n3\n
1
2
3
# OK!
_ = rdd.mapPartitions(print) # should print [1, 2, 3] or <iterator object>
1
2
3
# FAIL!
cc: @htssouza
I use the NewAPIHadoopRDD method in the spark context for the ElasticSearch-Hadoop connector, and am working on how I can mock that out here. My thinking is that there are 3 ways to do it:
1 is definitely best, but most difficult, and 2 is definitely a bit too specific to just what I'm using this for, 3 is really flexible, but that does break the drop-in compatibility with pyspark we've maintained thus-far.
I'm thinking of basically just doing a string comparison on the input classes and if elasticsearch is in them, I'll implement 2, otherwise raise a not implemented error, and then have a method for setting a patched functionality as a fallback. If there are any other classes/drivers people are using we can try to implement them similarly.
Thoughts?
Guide here:
https://docs.travis-ci.com/user/status-images/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.