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

Anuj commented on APEXCORE-489:
-------------------------------

Attaching Application.java for your reference.

Application fails after 7-8 seconds



 @Override
  public void populateDAG(DAG dag, Configuration conf)
  {
    // Sample DAG with 2 operators
    // Replace this code with the DAG you want to build

          KafkaSinglePortStringInputOperator input =  
dag.addOperator("MessageReader", new KafkaSinglePortStringInputOperator());
    ConsoleOutputOperator cons = dag.addOperator("console", new 
ConsoleOutputOperator());

    dag.addStream("randomData", input.outputPort, 
cons.input).setLocality(Locality.CONTAINER_LOCAL);
  }

> Getting exception while launching kafka application
> ---------------------------------------------------
>
>                 Key: APEXCORE-489
>                 URL: https://issues.apache.org/jira/browse/APEXCORE-489
>             Project: Apache Apex Core
>          Issue Type: Question
>            Reporter: Anuj
>
> Getting below given exception while launching kafka application.
> 2016-07-12 10:33:02,243 INFO com.datatorrent.stram.StreamingAppMaster: 
> Initializing Application Master.
> 2016-07-12 10:33:02,263 INFO com.datatorrent.stram.StreamingAppMasterService: 
> Application master, appId=158, clustertimestamp=1465548058955, attemptId=1
> 2016-07-12 10:33:03,779 INFO 
> com.datatorrent.contrib.kafka.AbstractKafkaInputOperator: [ONE_TO_ONE]: 
> Initializing partition(s)
> 2016-07-12 10:33:03,781 INFO org.apache.hadoop.service.AbstractService: 
> Service com.datatorrent.stram.StreamingAppMasterService failed in state 
> INITED; cause: java.lang.IllegalStateException: Partitioner returns null or 
> empty.
> java.lang.IllegalStateException: Partitioner returns null or empty.
>       at 
> com.datatorrent.stram.plan.physical.PhysicalPlan.initPartitioning(PhysicalPlan.java:605)
>       at 
> com.datatorrent.stram.plan.physical.PhysicalPlan.addLogicalOperator(PhysicalPlan.java:1497)
>       at 
> com.datatorrent.stram.plan.physical.PhysicalPlan.<init>(PhysicalPlan.java:344)
>       at 
> com.datatorrent.stram.StreamingContainerManager.<init>(StreamingContainerManager.java:362)
>       at 
> com.datatorrent.stram.StreamingContainerManager.getInstance(StreamingContainerManager.java:2979)
>       at 
> com.datatorrent.stram.StreamingAppMasterService.serviceInit(StreamingAppMasterService.java:550)
>       at 
> org.apache.hadoop.service.AbstractService.init(AbstractService.java:163)
>       at 
> com.datatorrent.stram.StreamingAppMaster.main(StreamingAppMaster.java:101)
> 2016-07-12 10:33:03,784 ERROR com.datatorrent.stram.StreamingAppMaster: 
> Exiting Application Master
> java.lang.IllegalStateException: Partitioner returns null or empty.
>       at 
> com.datatorrent.stram.plan.physical.PhysicalPlan.initPartitioning(PhysicalPlan.java:605)
>       at 
> com.datatorrent.stram.plan.physical.PhysicalPlan.addLogicalOperator(PhysicalPlan.java:1497)
>       at 
> com.datatorrent.stram.plan.physical.PhysicalPlan.<init>(PhysicalPlan.java:344)
>       at 
> com.datatorrent.stram.StreamingContainerManager.<init>(StreamingContainerManager.java:362)
>       at 
> com.datatorrent.stram.StreamingContainerManager.getInstance(StreamingContainerManager.java:2979)
>       at 
> com.datatorrent.stram.StreamingAppMasterService.serviceInit(StreamingAppMasterService.java:550)
>       at 
> org.apache.hadoop.service.AbstractService.init(AbstractService.java:163)
>       at 
> com.datatorrent.stram.StreamingAppMaster.main(StreamingAppMaster.java:101)



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

Reply via email to