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.
Constructor and Description |
---|
MongoDataSourcesProvider() |
Modifier and Type | Method and Description |
---|---|
DataSource |
construct(URI uri,
String inputFormatClass,
String outputFormatClass,
List<FieldInfo> fields)
Construct a new data source.
|
ISqlTridentDataSource |
constructTrident(URI uri,
String inputFormatClass,
String outputFormatClass,
Properties properties,
List<FieldInfo> fields) |
String |
scheme() |
public String scheme()
scheme
in interface DataSourcesProvider
public DataSource construct(URI uri, String inputFormatClass, String outputFormatClass, List<FieldInfo> fields)
DataSourcesProvider
Construct a new data source.
construct
in interface DataSourcesProvider
uri
- The URI that specifies the data source. The format of the URI is fully customizable.inputFormatClass
- the name of the class that deserializes data. It is null when unspecified.outputFormatClass
- the name of the class that serializes data. It is null when unspecified.fields
- The name of the fields and the schema of the table.public ISqlTridentDataSource constructTrident(URI uri, String inputFormatClass, String outputFormatClass, Properties properties, List<FieldInfo> fields)
constructTrident
in interface DataSourcesProvider
Copyright © 2022 The Apache Software Foundation. All Rights Reserved.