Skip to content

Commit

Permalink
[FLINK-1266] Update mongodb link and address pull request comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rmetzger committed Jan 8, 2015
1 parent f290929 commit 0af4d3a
Show file tree
Hide file tree
Showing 7 changed files with 111 additions and 13 deletions.
3 changes: 1 addition & 2 deletions docs/example_connectors.md
Expand Up @@ -175,7 +175,6 @@ The example shows how to access an Azure table and turn data into Flink's `DataS

## Access MongoDB

_Note: This example works starting from Flink 0.5 (then called Stratosphere)_
This [GitHub repository documents how to use MongoDB with Apache Flink (starting from 0.7-incubating)](https://github.com/okkam-it/flink-mongodb-test).

Please see this (slightly outdated) blogpost on [How to access MongoDB with Apache Flink](http://flink.incubator.apache.org/news/2014/01/28/querying_mongodb.html).

4 changes: 3 additions & 1 deletion flink-addons/flink-tachyon/pom.xml
Expand Up @@ -23,7 +23,7 @@ under the License.
<parent>
<artifactId>flink-addons</artifactId>
<groupId>org.apache.flink</groupId>
<version>0.8-incubating-SNAPSHOT</version>
<version>0.9-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

Expand All @@ -40,6 +40,7 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-core</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
Expand All @@ -51,6 +52,7 @@ under the License.
<groupId>org.tachyonproject</groupId>
<artifactId>tachyon</artifactId>
<version>0.5.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.tachyonproject</groupId>
Expand Down
Expand Up @@ -133,11 +133,6 @@ public void testTachyon() {

WordCount.main(new String[]{input, output});

// List<Integer> files = client.listFiles("/", true);
// for(Integer file : files) {
// TachyonFile f = client.getFile(file);
// System.out.println("file = "+file+" f = "+f.getPath());
// }
// verify result
TachyonFile resultFile = client.getFile("/" + TACHYON_TEST_OUT_FILE_NAME);
Assert.assertNotNull("Result file has not been created", resultFile);
Expand Down
Expand Up @@ -305,12 +305,12 @@ private static FileSystem instantiateFileSystem(String className) throws IOExcep
return fs;
}

private static AbstractHadoopWrapper hadoopWrapper;
private static HadoopFileSystemWrapper hadoopWrapper;

private static Class<?> getHadoopWrapperClassNameForFileSystem(String scheme) {
if(hadoopWrapper == null) {
try {
hadoopWrapper = (AbstractHadoopWrapper) instantiateHadoopFileSystemWrapper(null);
hadoopWrapper = (HadoopFileSystemWrapper) instantiateHadoopFileSystemWrapper(null);
} catch (IOException e) {
throw new RuntimeException("Error creating new Hadoop wrapper", e);
}
Expand Down
Expand Up @@ -17,7 +17,7 @@
*/
package org.apache.flink.core.fs;

public interface AbstractHadoopWrapper {
public interface HadoopFileSystemWrapper {

/**
* Test whether the HadoopWrapper can wrap the given file system scheme.
Expand Down
Expand Up @@ -23,7 +23,7 @@
import java.net.URI;
import java.net.UnknownHostException;

import org.apache.flink.core.fs.AbstractHadoopWrapper;
import org.apache.flink.core.fs.HadoopFileSystemWrapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.flink.configuration.ConfigConstants;
Expand All @@ -45,7 +45,7 @@
* distributed file system (HDFS).
*
*/
public final class HadoopFileSystem extends FileSystem implements AbstractHadoopWrapper {
public final class HadoopFileSystem extends FileSystem implements HadoopFileSystemWrapper {

private static final Logger LOG = LoggerFactory.getLogger(HadoopFileSystem.class);

Expand Down
102 changes: 102 additions & 0 deletions pom.xml
Expand Up @@ -433,6 +433,44 @@ under the License.
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>${hadoop.version}</version>
<exclusions>
<exclusion>
<groupId>asm</groupId>
<artifactId>asm</artifactId>
</exclusion>
<exclusion>
<groupId>tomcat</groupId>
<artifactId>jasper-compiler</artifactId>
</exclusion>
<exclusion>
<groupId>tomcat</groupId>
<artifactId>jasper-runtime</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jsp-api-2.1</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jsp-2.1</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-util</artifactId>
</exclusion>
<exclusion>
<groupId>org.eclipse.jdt</groupId>
<artifactId>core</artifactId>
</exclusion>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
Expand Down Expand Up @@ -564,6 +602,38 @@ under the License.
<groupId>org.jboss.netty</groupId>
<artifactId>netty</artifactId>
</exclusion>
<exclusion>
<groupId>asm</groupId>
<artifactId>asm</artifactId>
</exclusion>
<exclusion>
<groupId>tomcat</groupId>
<artifactId>jasper-compiler</artifactId>
</exclusion>
<exclusion>
<groupId>tomcat</groupId>
<artifactId>jasper-runtime</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jsp-api-2.1</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jsp-2.1</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-util</artifactId>
</exclusion>
<exclusion>
<groupId>org.eclipse.jdt</groupId>
<artifactId>core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand All @@ -575,6 +645,38 @@ under the License.
<groupId>org.jboss.netty</groupId>
<artifactId>netty</artifactId>
</exclusion>
<exclusion>
<groupId>asm</groupId>
<artifactId>asm</artifactId>
</exclusion>
<exclusion>
<groupId>tomcat</groupId>
<artifactId>jasper-compiler</artifactId>
</exclusion>
<exclusion>
<groupId>tomcat</groupId>
<artifactId>jasper-runtime</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jsp-api-2.1</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jsp-2.1</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-util</artifactId>
</exclusion>
<exclusion>
<groupId>org.eclipse.jdt</groupId>
<artifactId>core</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
Expand Down

0 comments on commit 0af4d3a

Please sign in to comment.