Monday, June 17, 2019

Confluent platform installed

Much happy to have Confluent platform installed into Ubuntu Linux on the windows.

Thanks for this instruction.

I have real console on the browser.
And, also can play between windows and linux.



Ubuntun file system in the windows 10

It's in

C:\Users\[user name]\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs


Install jdk 8 into Ubuntun in the windows

Today, I would like to see if I can get Confluent platform working in the windows.

Trying to install JDK 8 now.

Learn the installation from
sudo add-apt-repository ppa:webupd8team/java 
sudo apt-get update 
sudo apt-get install oracle-java8-installer
  

However, it's not available as oracle tighten the jdk license recently.

Find another package

sudo apt-get update 
sudo apt-get install openjdk-8-jdk
  
I can get through  this installation

Sunday, June 16, 2019

Simple way to start up kafka in windows

In the kafka home folder, create a start script like

D:\apps\kafka_2.12-2.2.0\start.bat

start "Zookeeper" bin\windows\zookeeper-server-start.bat "config\zookeeper.properties"
start "Kafka" bin\windows\kafka-server-start.bat "config\server.properties"

Saturday, June 15, 2019

Kafka command line cheat sheet in windows

The following are the command line to startup kafka after installed.
In here, I have kafka unzip into d:\app.

Start kafka

cd D:\apps\kafka_2.12-2.2.0

bin\windows\zookeeper-server-start.bat "config\zookeeper.properties"

 
bin\windows\kafka-server-start.bat "config\server.properties"


Topic :

Create topic
bin\windows\kafka-topics.bat --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1 --topic test   

List topic
bin\windows\kafka-topics.bat --list --bootstrap-server localhost:9092

bin\windows\kafka-topics.bat --describe --bootstrap-server localhost:9092


bin\windows\kafka-topics.bat --describe --bootstrap-server localhost:9092 --topic test


Producer:

console
bin\windows\kafka-console-producer.bat --broker-list localhost:9092 --topic test

Power shell to pipe apache web server access log
gc access.log | D:\dvp\kafka\kafka_2.12-2.2.0\bin\windows\kafka-console-producer.bat --broker-list localhost:9092 --topic test
 

gc access.log -wait -tail 1 | ... (Like linux tail -f access.log. Not working)

Configure apache httpd.conf
TransferLog "| d:/dvp/kafka/kafka_2.12-2.2.0/bin/windows/kafka-console-producer.bat --topic test --broker-list localhost:9092"

For both pipe and TransferLog, I really doubt the reliabliability.




Consumer:
Console
bin\windows\kafka-console-consumer.bat --bootstrap-server localhost:9092 --topic test --from-beginning

Friday, June 14, 2019

Starting hadoop in windows

If you run start-dfs.cmd and see the error like the following
... FATAL datanode.DataNode: Exception in secureMain
java.lang.RuntimeException: Error while running command to get file permissions : ExitCodeException exitCode=-1073741515
Or like the message in the stackoverflow : https://stackoverflow.com/questions/53341528/java-lang-runtimeexception-error-while-running-command-to-get-file-permissions#new-answer

Try to run winutils.exe in the command line.

If you see the following message :
The code execution cannot proceed because MSVCR100.dll was not found. ....




See how to fix in
https://www.lifewire.com/how-to-fix-msvcr100-dll-not-found-or-missing-errors-2623799 

Or google your solution.



Friday, February 22, 2019