org.apache.storm.sql.redis

## Class RedisDataSourcesProvider

- java.lang.Object
- - org.apache.storm.sql.redis.RedisDataSourcesProvider

- All Implemented Interfaces:
    DataSourcesProvider

      public class RedisDataSourcesProvider
      extends Object
      implements DataSourcesProvider

  Create a Redis sink based on the URI and properties. The URI has the format of redis://:[password]@[host]:[port]/[dbIdx]. Only host is mandatory and others can be set to default.

  The properties are in JSON format which specifies the config of the Redis data type and etc. Please note that when “use.redis.cluster” is “true”, cluster discovery is only done from given URI.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RedisDataSourcesProvider()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ISqlStreamsDataSource` | `constructStreams(URI uri, String inputFormatClass, String outputFormatClass, Properties props, List<FieldInfo> fields)` Construct a new data source for streams mode.
    `String` | `scheme()` Get the scheme of the data source.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RedisDataSourcesProvider

          public RedisDataSourcesProvider()

  - ### Method Detail

    - #### scheme

          public String scheme()

      Description copied from interface: `DataSourcesProvider`

      Get the scheme of the data source.

      Specified by:
        `scheme` in interface `DataSourcesProvider`
      Returns:
        the scheme of the data source

    - #### constructStreams

          public ISqlStreamsDataSource constructStreams(URI uri,
                                                        String inputFormatClass,
                                                        String outputFormatClass,
                                                        Properties props,
                                                        List<FieldInfo> fields)

      Description copied from interface: `DataSourcesProvider`

      Construct a new data source for streams mode.

      Specified by:
        `constructStreams` in interface `DataSourcesProvider`
      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.

Copyright © 2019 The Apache Software Foundation. All rights reserved.