Search

myjavabytes

My technical short notes

Containerization – Is it the future?

An interesting read:-

https://circleci.com/blog/its-the-future/

https://circleci.com/blog/it-really-is-the-future/

Remove a folder history from git

If you accidentally pushed to git a folder that you don’t want in version control, here is what you can do to get rid of it from git completely

Here the example assumes you pushed the folder node_modules, and you want to remove it’s complete history

git filter-branch --tree-filter 'rm -rf node_modules' --prune-empty HEAD

git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d

echo node_modules/ >> .gitignore

git add .gitignore

git commit -m 'Removing node_modules from git history'

git gc

git push origin master --force

Source: stackoverflow

Solr Cloud: Start & Stop

Start:

  • Start the leader node

bin/solr -c -p 8983 -s example/products/node1/solr

where: –

8983 is the port where you want Solr leader node to run

example/products/node1/solr is the solr home for this node.

  • Start the other nodes providing the Zookeeper host and port

bin/solr -c -p 7574 -s example/products/node2/solr -z localhost:9983

where: –

7574 is the port where you want this Solr node to run

example/products/node2/solr is the solr home for this node.

localhost:9983 is the hostname:port for Zookeeper

Stop:

bin/solr stop -all

Reference

https://cwiki.apache.org/confluence/display/solr/Getting+Started+with+SolrCloud

Download Solr Config from Zookeeper

Solr Cloud uses zookeeper to store the config files. Here is how you can download those files from zookeeper. You can use these files to be committed to your version control system.
cd solr-6.1.0/server/scripts/cloud-scripts
./zkcli.sh -zkhost  -cmd downconfig -confdir  -confname

eg:

./zkcli.sh -zkhost 127.0.0.1:9983 -cmd downconfig -confdir myconffolder -confname products

https://cwiki.apache.org/confluence/display/solr/Command+Line+Utilities

https://cwiki.apache.org/confluence/display/solr/Using+ZooKeeper+to+Manage+Configuration+Files

Starting kafka

Start Zookeeper
bin/zookeeper-server-start.sh config/zookeeper.properties

Start kafka server

bin/kafka-server-start.sh config/server.properties

http://kafka.apache.org/documentation.html#quickstart

Blog at WordPress.com.

Up ↑