HDFS Examples

These examples provides sample code for streaming data to and from MapR Filesystem.

Streaming Data from MapR Event Store For Apache Kafka to MapR Filesystem

This example provides sample code for streaming data from MapR Event Store For Apache Kafka to MapR Filesystem.

POST /connectors HTTP/1.1
        Host: connect.example.com
        Content-Type: application/json
        Accept: application/json
              
        {
        "name": "maprfs-sink-connector",
        "config": {
        "connector.class": "io.confluent.connect.hdfs.HdfsSinkConnector",
        "tasks.max": "1",
        "topics": "/kafka-connect:topic1",
        "hdfs.url": "maprfs:///",
        "flush.size": "5",
        "rotate.interval.ms": "1000"
        }
        }

Streaming Data from MapR Event Store For Apache Kafka to MapR Filesystem in Parquet

This example provides sample code for streaming data from MapR Event Store For Apache Kafka to MapR Filesystem in Parquet.

POST /connectors HTTP/1.1
        Host: connect.example.com
        Content-Type: application/json
        Accept: application/json
        
        {  
        "name":"hdfs-connector-parquet",
        "config":{  
        "connector.class":"io.confluent.connect.hdfs.HdfsSinkConnector",
        "tasks.max":"10",
        "topics":"/kafka-connect:topic2",
        "hdfs.url":"maprfs:///",
        "format.class":"io.confluent.connect.hdfs.parquet.ParquetFormat",
        "flush.size":"3"
        }
        }