[ 
https://issues.apache.org/jira/browse/SAMZA-1026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15560397#comment-15560397
 ] 

Eli Reisman commented on SAMZA-1026:
------------------------------------

Helli Hai! Sorry for the delay in getting back to you about this. I agree 
there's no need to depend on Kafka here. Turns out in this case we're just 
borrowing some string parsing from the Samza KafkaUtils code so there's no 
direct dependency introduced:

```
def getClientId(id: String, config: Config): String = getClientId(
     id,
     config.getName.getOrElse(throw new ConfigException("Missing job name.")),
     config.getJobId.getOrElse("1"))
```

All the same, we could move this functionality directly into the HDFSWriter if 
that would be clearer. If that's of interest to you, drop a patch into Review 
Board for this issue and the reviewers can weigh the merits of the change. 
Thanks again for reporting it! If you're satisfied with the current state of 
things now that we have some additional context, let me know and I can close up 
this ticket.

> HDFS System Producer should not have Kafka dependency
> -----------------------------------------------------
>
>                 Key: SAMZA-1026
>                 URL: https://issues.apache.org/jira/browse/SAMZA-1026
>             Project: Samza
>          Issue Type: Sub-task
>            Reporter: Hai
>            Assignee: Eli Reisman
>
> Currently HDFSSystemFactory has seemly unnecessary dependency on Kafka:
>   def getProducer(systemName: String, config: Config, registry: 
> MetricsRegistry) = {
>     val clientId = KafkaUtil.getClientId("samza-producer", config)
>     val metrics = new HdfsSystemProducerMetrics(systemName, registry)
>     new HdfsSystemProducer(systemName, clientId, config, metrics)
>   }
> Should try to get rid of the dependency



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to