public class MongoDataSourcesProvider extends Object implements DataSourcesProvider
Create a MongoDB sink based on the URI and properties. The URI has the format of mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]. The properties are in JSON format which specifies the name of the MongoDB collection and etc.
| Modifier and Type | Field and Description |
|---|---|
static String |
COLLECTION_NAME |
static String |
DEFAULT_VALUE_SERIALIZED_FIELD |
static String |
SCHEME_NAME |
static String |
TRIDENT_VALUE_SERIALIZED_FIELD |
static String |
VALUE_SERIALIZED_FIELD |
| Constructor and Description |
|---|
MongoDataSourcesProvider() |
| Modifier and Type | Method and Description |
|---|---|
ISqlStreamsDataSource |
constructStreams(URI uri,
String inputFormatClass,
String outputFormatClass,
Properties properties,
List<FieldInfo> fields) |
String |
scheme() |
public static final String SCHEME_NAME
public static final String VALUE_SERIALIZED_FIELD
public static final String TRIDENT_VALUE_SERIALIZED_FIELD
public static final String DEFAULT_VALUE_SERIALIZED_FIELD
public static final String COLLECTION_NAME
public String scheme()
scheme in interface DataSourcesProviderpublic ISqlStreamsDataSource constructStreams(URI uri, String inputFormatClass, String outputFormatClass, Properties properties, List<FieldInfo> fields)
constructStreams in interface DataSourcesProviderCopyright © 2019 The Apache Software Foundation. All rights reserved.