Package org.apache.storm.sql.hdfs
Class HdfsDataSourcesProvider
java.lang.Object
org.apache.storm.sql.hdfs.HdfsDataSourcesProvider
- All Implemented Interfaces:
DataSourcesProvider
Create a HDFS sink based on the URI and properties. The URI has the format of hdfs://host:port/path-to-file
The properties are in JSON format which specifies the name / path of the hdfs file and etc.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionconstructStreams
(URI uri, String inputFormatClass, String outputFormatClass, Properties properties, List<FieldInfo> fields) Construct a new data source for streams mode.scheme()
Get the scheme of the data source.
-
Constructor Details
-
HdfsDataSourcesProvider
public HdfsDataSourcesProvider()
-
-
Method Details
-
scheme
Description copied from interface:DataSourcesProvider
Get the scheme of the data source.- Specified by:
scheme
in interfaceDataSourcesProvider
- Returns:
- the scheme of the data source
-
constructStreams
public ISqlStreamsDataSource constructStreams(URI uri, String inputFormatClass, String outputFormatClass, Properties properties, List<FieldInfo> fields) Description copied from interface:DataSourcesProvider
Construct a new data source for streams mode.- Specified by:
constructStreams
in interfaceDataSourcesProvider
- Parameters:
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.
-