Skip to content

Instantly share code, notes, and snippets.

View sergibondarenko's full-sized avatar
🎯
Adapting to the prevailing level of light to be able to see clearly

Sergii Bondarenko sergibondarenko

🎯
Adapting to the prevailing level of light to be able to see clearly
View GitHub Profile
@sergibondarenko
sergibondarenko / Debugging Kibi backend
Last active April 28, 2016 14:53
Debug Kibana backend Node.js code.
# First breakpoint.
Write `debugger;` on a new line before the piece of code you want to debug.
# Run Kibi with debug option
## 1st way.
NODE_OPTIONS=--debug bin/kibi --dev
## 2nd way.
@sergibondarenko
sergibondarenko / es-reindex.conf
Created July 13, 2016 14:44
Reindex data via Logstash
input {
elasticsearch {
hosts => ["es0.dev.ukcris"]
index => "carenotes_etl"
}
}
output {
stdout {
codec => rubydebug
}
{
"tokens": [
{
"end_offset": 2,
"token": "f0",
"type": "word",
"start_offset": 0,
"position": 0
},
{
{
"tokens": [
{
"end_offset": 5,
"token": "f0",
"type": "word",
"start_offset": 0,
"position": 0
},
{
Traceback (most recent call last):
File "./denormalize.py", line 180, in <module>
df_join = reduce(lambda left, right: pd.merge(left, right, how='outer', on=['USER_ID']), df_arr)
File "./denormalize.py", line 180, in <lambda>
df_join = reduce(lambda left, right: pd.merge(left, right, how='outer', on=['USER_ID']), df_arr)
File "/usr/local/lib/python2.7/dist-packages/pandas/tools/merge.py", line 38, in merge
copy=copy, indicator=indicator)
File "/usr/local/lib/python2.7/dist-packages/pandas/tools/merge.py", line 210, in __init__
self.join_names) = self._get_merge_keys()
File "/usr/local/lib/python2.7/dist-packages/pandas/tools/merge.py", line 443, in _get_merge_keys
Traceback (most recent call last):
File "./denormalize.py", line 185, in <module>
df_join = pd.concat([d.set_index('USER_ID') for d in df_arr], axis=1, keys=sql_tables)
File "/usr/local/lib/python2.7/dist-packages/pandas/tools/merge.py", line 845, in concat
copy=copy)
File "/usr/local/lib/python2.7/dist-packages/pandas/tools/merge.py", line 984, in __init__
self.new_axes = self._get_new_axes()
File "/usr/local/lib/python2.7/dist-packages/pandas/tools/merge.py", line 1060, in _get_new_axes
new_axes[i] = self._get_comb_axis(i)
File "/usr/local/lib/python2.7/dist-packages/pandas/tools/merge.py", line 1086, in _get_comb_axis
Install elasticsearch 2.4.x
Copy the data folder from your elasticsearch 2.3.5 (used with kibi 4.5.4) and paste it into elasticsearch 2.4.x installed at the step above
Install Kibi 4.6.x and configure it to work with elasticsearch 2.4.x
Run bin/kibi upgrade
Run bin/kibi
Try to reproduce the issue
git checkout master
git pull
git checkout branch-4.6.3
git pull
git checkout -b issue-924-back
git cherry-pick HERE SHA1 of all commits in correct order
git push origin issue-924-back
Request {
domain: null,
_events:
{ error: [Function: bound ],
complete: [Function: bound ],
pipe: [Function] },
_eventsCount: 3,
_maxListeners: undefined,
url:
Url {
{
"query": {
"bool": {
"must": {
"match_all": {}
},
"must_not": [],
"filter": {
"bool": {
"must": [