RE: can i delete topic like this ?

2017-01-12 Thread Tauzell, Dave
You can set the retention for the topic to a small time and then wait for Kafka 
to delete the messages before setting it back:

bin/kafka-topics.sh --zookeeper zk.prod.yoursite.com --alter --topic TOPIC_NAME 
--config retention.ms=1000

-Original Message-
From: Laxmi Narayan NIT DGP [mailto:nit.dgp...@gmail.com]
Sent: Thursday, January 12, 2017 12:52 PM
To: users@kafka.apache.org
Subject: Re: can i delete topic like this ?

Hi ,
If my topic is not enabled for deletion any other way to purge message from 
topic ?



*Regards,*
*Laxmi Narayan Patel*
*MCA NIT Durgapur (2011-2014)*
*Mob:-9741292048,8345847473*

On Fri, Jan 13, 2017 at 12:16 AM, Kaufman Ng <kauf...@confluent.io> wrote:

> Your zookeeper url doesn't look right.  Port 9092 is kafka broker's
> default listening port.  Zookeeper's default is 2181.
>
>
> On Thu, Jan 12, 2017 at 1:33 PM, Laxmi Narayan NIT DGP <
> nit.dgp...@gmail.com
> > wrote:
>
> > /bin/kafka-topics.sh --zookeeper localhost:9092 --delete --topic
> topicName
> >
> >
> > I am getting exception saying :
> >
> > [2017-01-13 00:01:45,101] WARN Client session timed out, have not
> > heard from server in 15016ms for sessionid 0x0 (org.apache.zookeeper.
> ClientCnxn)
> > [2017-01-13 00:02:00,902] WARN Client session timed out, have not
> > heard from server in 15001ms for sessionid 0x0 (org.apache.zookeeper.
> ClientCnxn)
> > Exception in thread "main"
> > org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect
> > to zookeeper server within timeout: 3
> > at org.I0Itec.zkclient.ZkClient.connect(ZkClient.java:1232)
> > at org.I0Itec.zkclient.ZkClient.(ZkClient.java:156)
> > at org.I0Itec.zkclient.ZkClient.(ZkClient.java:130)
> > at kafka.utils.ZkUtils$.createZkClientAndConnection(
> ZkUtils.scala:76)
> > at kafka.utils.ZkUtils$.apply(ZkUtils.scala:58)
> > at kafka.admin.TopicCommand$.main(TopicCommand.scala:53)
> > at kafka.admin.TopicCommand.main(TopicCommand.scala)
> >
> >
> >
> >
> >
> > **
> >
> > *Regards,*
> > *Laxmi Narayan Patel*
> > *MCA NIT Durgapur (2011-2014)*
> > *Mob:-9741292048,8345847473*
> >
>
>
>
> --
> Kaufman Ng
> +1 646 961 8063
> Solutions Architect | Confluent | www.confluent.io
>
This e-mail and any files transmitted with it are confidential, may contain 
sensitive information, and are intended solely for the use of the individual or 
entity to whom they are addressed. If you have received this e-mail in error, 
please notify the sender by reply e-mail immediately and destroy all copies of 
the e-mail and any attachments.


Re: can i delete topic like this ?

2017-01-12 Thread Laxmi Narayan NIT DGP
Hi ,
If my topic is not enabled for deletion any other way to purge message from
topic ?



*Regards,*
*Laxmi Narayan Patel*
*MCA NIT Durgapur (2011-2014)*
*Mob:-9741292048,8345847473*

On Fri, Jan 13, 2017 at 12:16 AM, Kaufman Ng  wrote:

> Your zookeeper url doesn't look right.  Port 9092 is kafka broker's default
> listening port.  Zookeeper's default is 2181.
>
>
> On Thu, Jan 12, 2017 at 1:33 PM, Laxmi Narayan NIT DGP <
> nit.dgp...@gmail.com
> > wrote:
>
> > /bin/kafka-topics.sh --zookeeper localhost:9092 --delete --topic
> topicName
> >
> >
> > I am getting exception saying :
> >
> > [2017-01-13 00:01:45,101] WARN Client session timed out, have not heard
> > from server in 15016ms for sessionid 0x0 (org.apache.zookeeper.
> ClientCnxn)
> > [2017-01-13 00:02:00,902] WARN Client session timed out, have not heard
> > from server in 15001ms for sessionid 0x0 (org.apache.zookeeper.
> ClientCnxn)
> > Exception in thread "main"
> > org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to
> > zookeeper server within timeout: 3
> > at org.I0Itec.zkclient.ZkClient.connect(ZkClient.java:1232)
> > at org.I0Itec.zkclient.ZkClient.(ZkClient.java:156)
> > at org.I0Itec.zkclient.ZkClient.(ZkClient.java:130)
> > at kafka.utils.ZkUtils$.createZkClientAndConnection(
> ZkUtils.scala:76)
> > at kafka.utils.ZkUtils$.apply(ZkUtils.scala:58)
> > at kafka.admin.TopicCommand$.main(TopicCommand.scala:53)
> > at kafka.admin.TopicCommand.main(TopicCommand.scala)
> >
> >
> >
> >
> >
> > **
> >
> > *Regards,*
> > *Laxmi Narayan Patel*
> > *MCA NIT Durgapur (2011-2014)*
> > *Mob:-9741292048,8345847473*
> >
>
>
>
> --
> Kaufman Ng
> +1 646 961 8063
> Solutions Architect | Confluent | www.confluent.io
>


Re: can i delete topic like this ?

2017-01-12 Thread Kaufman Ng
Your zookeeper url doesn't look right.  Port 9092 is kafka broker's default
listening port.  Zookeeper's default is 2181.


On Thu, Jan 12, 2017 at 1:33 PM, Laxmi Narayan NIT DGP  wrote:

> /bin/kafka-topics.sh --zookeeper localhost:9092 --delete --topic topicName
>
>
> I am getting exception saying :
>
> [2017-01-13 00:01:45,101] WARN Client session timed out, have not heard
> from server in 15016ms for sessionid 0x0 (org.apache.zookeeper.ClientCnxn)
> [2017-01-13 00:02:00,902] WARN Client session timed out, have not heard
> from server in 15001ms for sessionid 0x0 (org.apache.zookeeper.ClientCnxn)
> Exception in thread "main"
> org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to
> zookeeper server within timeout: 3
> at org.I0Itec.zkclient.ZkClient.connect(ZkClient.java:1232)
> at org.I0Itec.zkclient.ZkClient.(ZkClient.java:156)
> at org.I0Itec.zkclient.ZkClient.(ZkClient.java:130)
> at kafka.utils.ZkUtils$.createZkClientAndConnection(ZkUtils.scala:76)
> at kafka.utils.ZkUtils$.apply(ZkUtils.scala:58)
> at kafka.admin.TopicCommand$.main(TopicCommand.scala:53)
> at kafka.admin.TopicCommand.main(TopicCommand.scala)
>
>
>
>
>
> **
>
> *Regards,*
> *Laxmi Narayan Patel*
> *MCA NIT Durgapur (2011-2014)*
> *Mob:-9741292048,8345847473*
>



-- 
Kaufman Ng
+1 646 961 8063
Solutions Architect | Confluent | www.confluent.io


can i delete topic like this ?

2017-01-12 Thread Laxmi Narayan NIT DGP
/bin/kafka-topics.sh --zookeeper localhost:9092 --delete --topic topicName


I am getting exception saying :

[2017-01-13 00:01:45,101] WARN Client session timed out, have not heard
from server in 15016ms for sessionid 0x0 (org.apache.zookeeper.ClientCnxn)
[2017-01-13 00:02:00,902] WARN Client session timed out, have not heard
from server in 15001ms for sessionid 0x0 (org.apache.zookeeper.ClientCnxn)
Exception in thread "main"
org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to
zookeeper server within timeout: 3
at org.I0Itec.zkclient.ZkClient.connect(ZkClient.java:1232)
at org.I0Itec.zkclient.ZkClient.(ZkClient.java:156)
at org.I0Itec.zkclient.ZkClient.(ZkClient.java:130)
at kafka.utils.ZkUtils$.createZkClientAndConnection(ZkUtils.scala:76)
at kafka.utils.ZkUtils$.apply(ZkUtils.scala:58)
at kafka.admin.TopicCommand$.main(TopicCommand.scala:53)
at kafka.admin.TopicCommand.main(TopicCommand.scala)





**

*Regards,*
*Laxmi Narayan Patel*
*MCA NIT Durgapur (2011-2014)*
*Mob:-9741292048,8345847473*