Posty oznaczone etykietą tips

Reducing a mess generated by vim-ale

In case of mess in your editor window, just add this line to your .vimrc:

let g:ale_virtualtext_cursor = 'disabled'

a mess in vim A mess in VIM (look at these red inline error messages)

The root cause of the issue

Some idiot creative guys thought that mixing warning messages with code makes some sense and increases readability, and someone smart enough implemented it (to the misfortune of mankind).

A source of the mess in vim

The other one great dev enabled the mess at default (dunno why, maybe he thinks that mess in the editor window is so awesome):

An awesome idea of enabling mess in the VIM editor at default

Cassandra - zmiana nazwy klastra

Zmiana nazwy klastra Cassandry może być nieciekawa w skutkach, ponieważ klaster dokonuje dodatkowej weryfikacji węzłów po zadeklarowanych w nich nazwach klastra, a zmieniając nazwę trzeba wykonać rolling restart każdego węzła i w tym czasie węzły będą zgłaszały błędy niespójności nazw (ergo - klaster będzie niekompletny). Operację trzeba przeprowadzić z zachowaniem należytej ostrożności.

Procedura dla każdego węzła :

 $ zmienić nazwę w `cassandra.conf`
 $ cqlsh
 $ > UPDATE system.local SET cluster_name = '<NOWA NAZWA KLASTRA>' where key='local';
 ^D
 $ nodetool flush
 $ sudo service cassandra restart

Dodatkowo w OpsCenter trzeba zrobić sobie rename w UI, bo OpsCenter wyświetla swego rodzaju alias.

Być może lepszą sekwencją będzie nawet wykonanie zmian nazw w column family system.local dla każdego node po zmianie wszystkich cassandra.yaml, i dopiero po tym zrobić flushe na każdym node i zrestartować usługi tak, aby nie było downtime.