forked from apache/spark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request apache#104 from sun-rui/add_keys_values
Add keys() and values() for the RDD class.
- Loading branch information
Showing
5 changed files
with
116 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
% Generated by roxygen2 (4.0.2): do not edit by hand | ||
\docType{methods} | ||
\name{keys} | ||
\alias{keys} | ||
\alias{keys,RDD} | ||
\alias{keys,RDD-method} | ||
\title{Return an RDD with the keys of each tuple.} | ||
\usage{ | ||
keys(rdd) | ||
|
||
\S4method{keys}{RDD}(rdd) | ||
} | ||
\arguments{ | ||
\item{rdd}{The RDD from which the keys of each tuple is returned.} | ||
} | ||
\description{ | ||
Return an RDD with the keys of each tuple. | ||
} | ||
\examples{ | ||
\dontrun{ | ||
sc <- sparkR.init() | ||
rdd <- parallelize(sc, list(list(1, 2), list(3, 4))) | ||
collect(keys(rdd)) # list(1, 3) | ||
} | ||
} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
% Generated by roxygen2 (4.0.2): do not edit by hand | ||
\docType{methods} | ||
\name{values} | ||
\alias{values} | ||
\alias{values,RDD} | ||
\alias{values,RDD-method} | ||
\title{Return an RDD with the values of each tuple.} | ||
\usage{ | ||
values(rdd) | ||
|
||
\S4method{values}{RDD}(rdd) | ||
} | ||
\arguments{ | ||
\item{rdd}{The RDD from which the values of each tuple is returned.} | ||
} | ||
\description{ | ||
Return an RDD with the values of each tuple. | ||
} | ||
\examples{ | ||
\dontrun{ | ||
sc <- sparkR.init() | ||
rdd <- parallelize(sc, list(list(1, 2), list(3, 4))) | ||
collect(values(rdd)) # list(2, 4) | ||
} | ||
} | ||
|