Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
spark
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cs525-sp18-g07
spark
Commits
b5d78307
Commit
b5d78307
authored
12 years ago
by
Matei Zaharia
Browse files
Options
Downloads
Plain Diff
Merge pull request #551 from jey/python-bugfixes
Python bugfixes
parents
2be2295f
9a731f5a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
python/examples/transitive_closure.py
+1
-1
1 addition, 1 deletion
python/examples/transitive_closure.py
python/pyspark/rdd.py
+1
-1
1 addition, 1 deletion
python/pyspark/rdd.py
with
2 additions
and
2 deletions
python/examples/transitive_closure.py
+
1
−
1
View file @
b5d78307
...
...
@@ -24,7 +24,7 @@ if __name__ == "__main__":
"
Usage: PythonTC <master> [<slices>]
"
exit
(
-
1
)
sc
=
SparkContext
(
sys
.
argv
[
1
],
"
PythonTC
"
)
slices
=
sys
.
argv
[
2
]
if
len
(
sys
.
argv
)
>
2
else
2
slices
=
int
(
sys
.
argv
[
2
]
)
if
len
(
sys
.
argv
)
>
2
else
2
tc
=
sc
.
parallelize
(
generateGraph
(),
slices
).
cache
()
# Linear transitive closure: each round grows paths by one edge,
...
...
This diff is collapsed.
Click to expand it.
python/pyspark/rdd.py
+
1
−
1
View file @
b5d78307
...
...
@@ -399,7 +399,7 @@ class RDD(object):
>>>
sc
.
parallelize
(
range
(
10
)).
saveAsTextFile
(
tempFile
.
name
)
>>>
from
fileinput
import
input
>>>
from
glob
import
glob
>>>
''
.
join
(
input
(
glob
(
tempFile
.
name
+
"
/part-0000*
"
)))
>>>
''
.
join
(
sorted
(
input
(
glob
(
tempFile
.
name
+
"
/part-0000*
"
)))
)
'
0
\\
n1
\\
n2
\\
n3
\\
n4
\\
n5
\\
n6
\\
n7
\\
n8
\\
n9
\\
n
'
"""
def
func
(
split
,
iterator
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment