-
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.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
cf76b74
commit 1a6cfe6
Showing
10 changed files
with
82 additions
and
535 deletions.
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
20 changes: 0 additions & 20 deletions
20
commons/src/main/java/de/hpi/mmds/wiki/spark/KeyFilter.java
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
commons/src/main/java/de/hpi/mmds/wiki/spark/SparkFunctions.java
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,17 @@ | ||
package de.hpi.mmds.wiki.spark; | ||
|
||
import org.apache.spark.api.java.function.Function; | ||
|
||
import scala.Tuple2; | ||
|
||
public class SparkFunctions { | ||
|
||
public static <T, U> Function<Tuple2<T, U>, Boolean> keyFilter(T value) { | ||
return t -> t._1.equals(value); | ||
} | ||
|
||
public static <T> Function<T, T> identity() { | ||
return (v) -> v; | ||
} | ||
|
||
} |
Oops, something went wrong.