提交 0af4d3ab 编写于 作者: R Robert Metzger

[FLINK-1266] Update mongodb link and address pull request comments

上级 f2909293
......@@ -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).
......@@ -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>
......@@ -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>
......@@ -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>
......
......@@ -133,11 +133,6 @@ public class TachyonFileSystemWrapperTest {
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);
......
......@@ -305,12 +305,12 @@ public abstract class FileSystem {
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);
}
......
......@@ -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.
......
......@@ -23,7 +23,7 @@ import java.lang.reflect.Method;
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;
......@@ -45,7 +45,7 @@ import org.apache.hadoop.conf.Configuration;
* 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);
......
......@@ -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>
......@@ -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>
......@@ -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>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册