downloading dependency in apache flink

2016-02-24 Thread Pankaj Kumar
i am trying to write a job, using maven project.

Job is working fine in my editor , but when i am running that job through
flink command line its giving ClassNotFoundException exception . Its not to
find dependency.

If i will create a jar , will flink download all its dependency before
executing that jar. if not that how can we run one-jar.


Thanks


Re: downloading dependency in apache flink

2016-02-24 Thread Pankaj Kumar
Hi Till ,

I was able to make fat jar, but i am not able to execute this jar through
flink command line.

On Wed, Feb 24, 2016 at 4:31 PM, Till Rohrmann  wrote:

> Hi Pankaj,
>
> are you creating a fat jar when you create your use code jar? This can be
> done using maven's shade plugin or the assembly plugin. We provide a maven
> archetype to set up a pom file which will make sure that a fat jar is built
> [1].
>
> [1]
> https://ci.apache.org/projects/flink/flink-docs-master/quickstart/java_api_quickstart.html
>
> Cheers,
> Till
>
> On Wed, Feb 24, 2016 at 11:31 AM, Pankaj Kumar 
> wrote:
>
>> i am trying to write a job, using maven project.
>>
>> Job is working fine in my editor , but when i am running that job through
>> flink command line its giving ClassNotFoundException exception . Its not
>> to find dependency.
>>
>> If i will create a jar , will flink download all its dependency before
>> executing that jar. if not that how can we run one-jar.
>>
>>
>> Thanks
>>
>
>


Re: downloading dependency in apache flink

2016-02-24 Thread Pankaj Kumar
I was using wrong method to create fat jar,

after using  mvn clean install -Pbuild-jar i was able to execute code
through flink command line.

On Wed, Feb 24, 2016 at 7:12 PM, Till Rohrmann  wrote:

> What is the error message you receive?
>
> On Wed, Feb 24, 2016 at 1:49 PM, Pankaj Kumar 
> wrote:
>
>> Hi Till ,
>>
>> I was able to make fat jar, but i am not able to execute this jar through
>> flink command line.
>>
>> On Wed, Feb 24, 2016 at 4:31 PM, Till Rohrmann 
>> wrote:
>>
>>> Hi Pankaj,
>>>
>>> are you creating a fat jar when you create your use code jar? This can
>>> be done using maven's shade plugin or the assembly plugin. We provide a
>>> maven archetype to set up a pom file which will make sure that a fat jar is
>>> built [1].
>>>
>>> [1]
>>> https://ci.apache.org/projects/flink/flink-docs-master/quickstart/java_api_quickstart.html
>>>
>>> Cheers,
>>> Till
>>>
>>> On Wed, Feb 24, 2016 at 11:31 AM, Pankaj Kumar 
>>> wrote:
>>>
>>>> i am trying to write a job, using maven project.
>>>>
>>>> Job is working fine in my editor , but when i am running that job
>>>> through flink command line its giving ClassNotFoundException exception
>>>> . Its not to find dependency.
>>>>
>>>> If i will create a jar , will flink download all its dependency before
>>>> executing that jar. if not that how can we run one-jar.
>>>>
>>>>
>>>> Thanks
>>>>
>>>
>>>
>>
>


kafka and flink integration issue

2016-02-27 Thread Pankaj Kumar
I am trying to integrate kafka and flink.
my pom file is where {flink.version} is 0.10.2


org.apache.flink
flink-java
${flink.version}


org.apache.flink
flink-streaming-java
${flink.version}


org.apache.flink
flink-clients
${flink.version}


com.fasterxml.jackson.core
jackson-databind
2.6.4


org.projectlombok
lombok
1.16.6
provided


org.springframework
spring-web
4.2.4.RELEASE


org.apache.flink
flink-connector-kafka
${flink.version}


when i am running my jar with flink command line using command

bin/flink run ~/apache_flink/target/Application-0.0.1.jar

I am getting error

tatus of job d20986a31f2a8166986d7db354de0ff7 changed to FAILED.
java.lang.NoSuchMethodError:
org.apache.flink.streaming.api.operators.StreamingRuntimeContext.isCheckpointingEnabled()Z
at 
org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer.run(FlinkKafkaConsumer.java:387)
at 
org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:58)
at 
org.apache.flink.streaming.runtime.tasks.SourceStreamTask.run(SourceStreamTask.java:55)


I am building final jar using command *mvn clean package -Pbuild-jar*


Re: kafka and flink integration issue

2016-02-27 Thread Pankaj Kumar
Yes Robert ,
i was trying to start Flink on cluster 0.10.1.

But after changing flink version to 0.10.1 , also i am getting the same
error.

On Sat, Feb 27, 2016 at 2:47 PM, Robert Metzger  wrote:

> Hi Pankaj,
>
> I suspect you are trying to start Flink on a cluster with Flink 0.10.1
> installed?
>
> On Sat, Feb 27, 2016 at 9:20 AM, Pankaj Kumar 
> wrote:
>
>> I am trying to integrate kafka and flink.
>> my pom file is where {flink.version} is 0.10.2
>>
>> 
>> org.apache.flink
>> flink-java
>> ${flink.version}
>> 
>> 
>> org.apache.flink
>> flink-streaming-java
>> ${flink.version}
>> 
>> 
>> org.apache.flink
>> flink-clients
>> ${flink.version}
>> 
>> 
>> com.fasterxml.jackson.core
>> jackson-databind
>> 2.6.4
>> 
>> 
>> org.projectlombok
>> lombok
>> 1.16.6
>> provided
>> 
>> 
>> org.springframework
>> spring-web
>> 4.2.4.RELEASE
>> 
>> 
>> org.apache.flink
>> flink-connector-kafka
>> ${flink.version}
>> 
>>
>> when i am running my jar with flink command line using command
>>
>> bin/flink run ~/apache_flink/target/Application-0.0.1.jar
>>
>> I am getting error
>>
>> tatus of job d20986a31f2a8166986d7db354de0ff7 changed to FAILED.
>> java.lang.NoSuchMethodError: 
>> org.apache.flink.streaming.api.operators.StreamingRuntimeContext.isCheckpointingEnabled()Z
>>  at 
>> org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer.run(FlinkKafkaConsumer.java:387)
>>  at 
>> org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:58)
>>  at 
>> org.apache.flink.streaming.runtime.tasks.SourceStreamTask.run(SourceStreamTask.java:55)
>>
>>
>> I am building final jar using command *mvn clean package -Pbuild-jar*
>>
>>
>


Re: kafka and flink integration issue

2016-02-29 Thread Pankaj Kumar
yes versioning was issue . Job is working fine on flink 0.10.2.

On Mon, Feb 29, 2016 at 3:15 PM, Stephan Ewen  wrote:

> Hi!
>
> A "NoSuchMethodError" is always a sign of a version mixup. Please make
> sure both versions (cluster and client) are exactly the same.
>
> Stephan
>
>
> On Sat, Feb 27, 2016 at 11:05 AM, Pankaj Kumar 
> wrote:
>
>> Yes Robert ,
>> i was trying to start Flink on cluster 0.10.1.
>>
>> But after changing flink version to 0.10.1 , also i am getting the same
>> error.
>>
>> On Sat, Feb 27, 2016 at 2:47 PM, Robert Metzger 
>> wrote:
>>
>>> Hi Pankaj,
>>>
>>> I suspect you are trying to start Flink on a cluster with Flink 0.10.1
>>> installed?
>>>
>>> On Sat, Feb 27, 2016 at 9:20 AM, Pankaj Kumar 
>>> wrote:
>>>
>>>> I am trying to integrate kafka and flink.
>>>> my pom file is where {flink.version} is 0.10.2
>>>>
>>>> 
>>>> org.apache.flink
>>>> flink-java
>>>> ${flink.version}
>>>> 
>>>> 
>>>> org.apache.flink
>>>> flink-streaming-java
>>>> ${flink.version}
>>>> 
>>>> 
>>>> org.apache.flink
>>>> flink-clients
>>>> ${flink.version}
>>>> 
>>>> 
>>>> com.fasterxml.jackson.core
>>>> jackson-databind
>>>> 2.6.4
>>>> 
>>>> 
>>>> org.projectlombok
>>>> lombok
>>>> 1.16.6
>>>> provided
>>>> 
>>>> 
>>>> org.springframework
>>>> spring-web
>>>> 4.2.4.RELEASE
>>>> 
>>>> 
>>>> org.apache.flink
>>>> flink-connector-kafka
>>>> ${flink.version}
>>>> 
>>>>
>>>> when i am running my jar with flink command line using command
>>>>
>>>> bin/flink run ~/apache_flink/target/Application-0.0.1.jar
>>>>
>>>> I am getting error
>>>>
>>>> tatus of job d20986a31f2a8166986d7db354de0ff7 changed to FAILED.
>>>> java.lang.NoSuchMethodError: 
>>>> org.apache.flink.streaming.api.operators.StreamingRuntimeContext.isCheckpointingEnabled()Z
>>>>at 
>>>> org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer.run(FlinkKafkaConsumer.java:387)
>>>>at 
>>>> org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:58)
>>>>at 
>>>> org.apache.flink.streaming.runtime.tasks.SourceStreamTask.run(SourceStreamTask.java:55)
>>>>
>>>>
>>>> I am building final jar using command *mvn clean package -Pbuild-jar*
>>>>
>>>>
>>>
>>
>