[root@kafka ~]# docker –version
Docker version 1.12.6, build c4618fb/1.12.6
[root@kafka ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
[root@kafka ~]# docker run –rm -p 2181:2181 -p 3030:3030 -p 8081-8083:8081-8083 -p 9581-9585:9581-9585 -p 9092:9092 -e ADV_HOST=127.0.0.1 landoop/fast-data-dev:cp3.2 &
Unable to find image ‘landoop/fast-data-dev:latest’ locally
Trying to pull repository docker.io/landoop/fast-data-dev …
latest: Pulling from docker.io/landoop/fast-data-dev
88286f41530e: Pull complete
..
bbb109f3a938: Pull complete
Digest: sha256:d4ce75512f559186a00ff66e90df5c78d4a73be985b7b15a4c60f92affc49e95
Setting advertised host to 127.0.0.1.
Operating system RAM available is 3029 MiB, which is less than the lowest
recommended of 5120 MiB. Your system performance may be seriously impacted.
Starting services.
This is landoop’s fast-data-dev. Kafka 0.11.0.0, Confluent OSS 3.3.0.
You may visit http://127.0.0.1:3030 in about a minute.
2017-10-09 14:59:19,783 CRIT Supervisor running as root (no user in config file)
2017-10-09 14:59:19,783 WARN Included extra file “/etc/supervisord.d/01-zookeeper.conf” during parsing
2017-10-09 14:59:19,783 WARN Included extra file “/etc/supervisord.d/02-broker.conf” during parsing
2017-10-09 14:59:19,783 WARN Included extra file “/etc/supervisord.d/03-schema-registry.conf” during parsing
2017-10-09 14:59:19,783 WARN Included extra file “/etc/supervisord.d/04-rest-proxy.conf” during parsing
2017-10-09 14:59:19,783 WARN Included extra file “/etc/supervisord.d/05-connect-distributed.conf” during parsing
2017-10-09 14:59:19,783 WARN Included extra file “/etc/supervisord.d/06-caddy.conf” during parsing
2017-10-09 14:59:19,783 WARN Included extra file “/etc/supervisord.d/07-smoke-tests.conf” during parsing
2017-10-09 14:59:19,783 WARN Included extra file “/etc/supervisord.d/08-logs-to-kafka.conf” during parsing
2017-10-09 14:59:19,783 WARN Included extra file “/etc/supervisord.d/99-supervisord-sample-data.conf” during parsing
2017-10-09 14:59:19,788 INFO supervisord started with pid 5
2017-10-09 14:59:20,791 INFO spawned: ‘sample-data’ with pid 73
2017-10-09 14:59:20,802 INFO spawned: ‘zookeeper’ with pid 75
2017-10-09 14:59:20,804 INFO spawned: ‘caddy’ with pid 76
2017-10-09 14:59:20,805 INFO spawned: ‘broker’ with pid 77
2017-10-09 14:59:20,807 INFO spawned: ‘smoke-tests’ with pid 78
2017-10-09 14:59:20,820 INFO spawned: ‘connect-distributed’ with pid 79
2017-10-09 14:59:20,828 INFO spawned: ‘logs-to-kafka’ with pid 80
2017-10-09 14:59:20,837 INFO spawned: ‘schema-registry’ with pid 81
2017-10-09 14:59:20,847 INFO spawned: ‘rest-proxy’ with pid 83
2017-10-09 14:59:21,945 INFO success: sample-data entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-10-09 14:59:21,945 INFO success: zookeeper entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-10-09 14:59:21,945 INFO success: caddy entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-10-09 14:59:21,945 INFO success: broker entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-10-09 14:59:21,945 INFO success: smoke-tests entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-10-09 14:59:21,945 INFO success: connect-distributed entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-10-09 14:59:21,945 INFO success: logs-to-kafka entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-10-09 14:59:21,945 INFO success: schema-registry entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-10-09 14:59:21,945 INFO success: rest-proxy entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-10-09 14:59:28,195 INFO exited: schema-registry (exit status 1; not expected)
2017-10-09 14:59:28,204 INFO spawned: ‘schema-registry’ with pid 216
2017-10-09 14:59:28,313 INFO exited: rest-proxy (exit status 1; not expected)
2017-10-09 14:59:28,317 INFO spawned: ‘rest-proxy’ with pid 234
2017-10-09 14:59:29,228 INFO success: schema-registry entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-10-09 14:59:29,409 INFO success: rest-proxy entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
[root@kafka ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/landoop/fast-data-dev cp3.2 e258bba65521 5 weeks ago 982.3 MB
[root@kafka ~]# netstat -tlpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1068/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1133/master
tcp6 0 0 :::9581 :::* LISTEN 3560/docker-proxy-c
tcp6 0 0 :::9582 :::* LISTEN 3553/docker-proxy-c
tcp6 0 0 :::9583 :::* LISTEN 3546/docker-proxy-c
tcp6 0 0 :::9584 :::* LISTEN 3539/docker-proxy-c
tcp6 0 0 :::8081 :::* LISTEN 3588/docker-proxy-c
tcp6 0 0 :::9585 :::* LISTEN 3532/docker-proxy-c
tcp6 0 0 :::8082 :::* LISTEN 3581/docker-proxy-c
tcp6 0 0 :::8083 :::* LISTEN 3574/docker-proxy-c
tcp6 0 0 :::3030 :::* LISTEN 3595/docker-proxy-c
tcp6 0 0 :::22 :::* LISTEN 1068/sshd
tcp6 0 0 ::1:25 :::* LISTEN 1133/master
tcp6 0 0 :::9092 :::* LISTEN 3567/docker-proxy-c
tcp6 0 0 :::2181 :::* LISTEN 3602/docker-proxy-c
[root@kafka ~]# docker run –rm -it –net=host landoop/fast-data-dev bash
Unable to find image ‘landoop/fast-data-dev:latest’ locally
Trying to pull repository docker.io/landoop/fast-data-dev …
latest: Pulling from docker.io/landoop/fast-data-dev
88286f41530e: Already exists
…
bbb109f3a938: Pull complete
Digest: sha256:d4ce75512f559186a00ff66e90df5c78d4a73be985b7b15a4c60f92affc49e95
root@fast-data-dev / $ kafka-topics –zookeeper 127.0.0.1:2181 –create –topic first-topic –partitions 3 –replication-factor 2
Error while executing topic command : replication factor: 2 larger than available brokers: 1
[2017-10-09 17:49:23,317] ERROR org.apache.kafka.common.errors.InvalidReplicationFactorException: replication factor: 2 larger than available brokers: 1
(kafka.admin.TopicCommand$)
root@fast-data-dev / $ kafka-topics –zookeeper 127.0.0.1:2181 –create –topic first-topic –partitions 3 –replication-factor 1
Created topic “first-topic”.
root@fast-data-dev / $ kafka-topics –zookeeper 127.0.0.1:2181 –list
__consumer_offsets
_schemas
connect-configs
connect-offsets
connect-statuses
coyote_test_avro
coyote_test_binary
coyote_test_json
first-topic
logs-broker
nyc_yellow_taxi_trip_data
reddit_posts
sea_vessel_position_reports
root@fast-data-dev / $ kafka-topics –zookeeper 127.0.0.1:2181 –create –topic second-topic –partitions 3 –replication-factor 1
Created topic “second-topic”.
root@fast-data-dev / $ kafka-topics –zookeeper 127.0.0.1:2181 –list
__consumer_offsets
_schemas
connect-configs
connect-offsets
connect-statuses
coyote_test_avro
coyote_test_binary
coyote_test_json
first-topic
logs-broker
nyc_yellow_taxi_trip_data
reddit_posts
sea_vessel_position_reports
second-topic
root@fast-data-dev / $ kafka-topics –zookeeper 127.0.0.1:2181 –topic first-topic –delete
Topic first-topic is marked for deletion.
Note: This will have no impact if delete.topic.enable is not set to true.
root@fast-data-dev / $ kafka-topics –zookeeper 127.0.0.1:2181 –describe –topic first-topic
root@fast-data-dev / $ kafka-topics –zookeeper 127.0.0.1:2181 –describe –topic second-topic
Topic:second-topic PartitionCount:3 ReplicationFactor:1 Configs:
Topic: second-topic Partition: 0 Leader: 0 Replicas: 0 Isr: 0
Topic: second-topic Partition: 1 Leader: 0 Replicas: 0 Isr: 0
Topic: second-topic Partition: 2 Leader: 0 Replicas: 0 Isr: 0
SERVICES PORTS
9092 : Kafka Broker
9581 : JMX
8081 : Schema Registry
9582 : JMX
8082 : Kafka REST Proxy
9583 : JMX
8083 : Kafka Connect Distributed
9584 : JMX
2181 : ZooKeeper
9585 : JMX
3030 : Web Server
root@fast-data-dev / $ kafka-console-producer –broker-list 127.0.0.1:9092 –topic second-topic >hai
>this my learning in topic concept
>and its a good experience
>this is my new messge
>will stop here
>^Croot@fast-data-dev / $



root@fast-data-dev / $ kafka-console-producer –broker-list 127.0.0.1:9092 –topic new-topic
>hai
[2017-10-10 06:17:25,599] WARN Error while fetching metadata with correlation id 2 : {new-topic=LEADER_NOT_AVAILABLE} (org.apache.kafka.clients.NetworkClient)
>good morning
>both messages shoukd be visiable^C

run docker run –rm -it –net=host landoop/fast-data-dev bash in two terminal
root@fast-data-dev / $ kafka-console-producer –broker-list 127.0.0.1:9092 –topic second-topic
>hai this from producer cli
>this is new messge
>here is another msg
root@fast-data-dev / $ kafka-console-consumer –bootstrap-server 127.0.0.1:9092 –topic second-topic
hai this from producer cli
this is new messge
here is another msg
^CProcessed a total of 3 messages
root@fast-data-dev / $ kafka-console-consumer –bootstrap-server 127.0.0.1:9092 –topic second-topic –from-beginning
this my learning in topic concept
will stop here
here is another msg
and its a good experience
hai this from producer cli
hai
this is my new messge
this is new messge
root@fast-data-dev / $ kafka-console-consumer –bootstrap-server 127.0.0.1:9092 –topic second-topic –from-beginning –partition 0
hai
this is my new messge
this is new messge
^CProcessed a total of 3 messages
root@fast-data-dev / $ kafka-console-consumer –bootstrap-server 127.0.0.1:9092 –topic second-topic –from-beginning –partition 2
this my learning in topic concept
will stop here
here is another msg
^CProcessed a total of 3 messages
root@fast-data-dev / $ kafka-console-consumer –bootstrap-server 127.0.0.1:9092 –topic second-topic –from-beginning –partition 1
and its a good experience
hai this from producer cli
^CProcessed a total of 2 messages
root@fast-data-dev / $ kafka-console-consumer –bootstrap-server 127.0.0.1:9092 –topic second-topic –consumer-property group.id=mygroup –from-beginning
hey this is part of group id
^CProcessed a total of 1 messages
root@fast-data-dev / $ kafka-console-producer –broker-list 127.0.0.1:9092 –topic second-topic
>hai this from producer cli
>this is new messge
>here is another msg
>hey this is part of group id
>messgae one after consumer is stopped
>message two
>pubish only from where its has stopped
root@fast-data-dev / $ kafka-console-consumer –bootstrap-server 127.0.0.1:9092 –topic second-topic –consumer-property group.id=mygroup –from-beginning
message two
pubish only from where its has stopped
messgae one after consumer is stopped
