[ 
https://issues.apache.org/jira/browse/GRIFFIN-247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

iyuriysoft updated GRIFFIN-247:
-------------------------------
    Description: 
Provide ability to use custom pluggable sinks.

To use it we need to add new sink type CUSTOM and write the name of the class, 
like follows:
{code:java}
// saving in local files
"sinks": [
  {
    "type": "CUSTOM",
    "config": {
      "class": "com.example.griffin.sinks.LocalFileSink",
      "path": "/Users/Shared"
    }
  },

{code}
Contract:

The class should be a subclass of *Sink*
{code:java}
case class LocalFileSink(ctx: SinkContext) extends Sink {
  ...
  ...
}{code}
Signatures of context object:
{code:java}
case class SinkContext(config: Map[String, Any], metricName: String, timeStamp: 
Long, block: Boolean)

{code}

  was:
Provide ability to use custom pluggable sinks.

To use it we need to add new sink type CUSTOM
{code:java}
// saving in local files
"sinks": [
  {
    "type": "CUSTOM",
    "config": {
      "class": "com.example.griffin.sinks.LocalFileSink",
      "path": "/Users/Shared"
    }
  },

{code}
Contract:

The class should be a subclass of *Sink*
{code:java}
case class LocalFileSink(ctx: SinkContext) extends Sink {
  ...
  ...
}{code}
Signatures of context object:
{code:java}
case class SinkContext(config: Map[String, Any], metricName: String, timeStamp: 
Long, block: Boolean)

{code}


> Support pluggable sinks
> -----------------------
>
>                 Key: GRIFFIN-247
>                 URL: https://issues.apache.org/jira/browse/GRIFFIN-247
>             Project: Griffin
>          Issue Type: Improvement
>            Reporter: iyuriysoft
>            Priority: Minor
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> Provide ability to use custom pluggable sinks.
> To use it we need to add new sink type CUSTOM and write the name of the 
> class, like follows:
> {code:java}
> // saving in local files
> "sinks": [
>   {
>     "type": "CUSTOM",
>     "config": {
>       "class": "com.example.griffin.sinks.LocalFileSink",
>       "path": "/Users/Shared"
>     }
>   },
> {code}
> Contract:
> The class should be a subclass of *Sink*
> {code:java}
> case class LocalFileSink(ctx: SinkContext) extends Sink {
>   ...
>   ...
> }{code}
> Signatures of context object:
> {code:java}
> case class SinkContext(config: Map[String, Any], metricName: String, 
> timeStamp: Long, block: Boolean)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to