Skip to content

Instantly share code, notes, and snippets.

View libbkmz's full-sized avatar

Ilya libbkmz

View GitHub Profile
2021-12-28 10:23:49
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.51-b03 mixed mode):
"pool-25-thread-2" #269 prio=5 os_prio=0 tid=0x0000000039a54000 nid=0x30d0 waiting on condition [0x000000009f33d000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x000000063c6010a0> (a java.util.concurrent.CompletableFuture$Signaller)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.CompletableFuture$Signaller.block(CompletableFuture.java:1685)
at java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3320)
import itertools
import subprocess as sp
import json
import pprint
from collections import namedtuple
JQ_PATH = "/usr/local/bin/jq"
FIO_PATH = "/usr/local/bin/fio"
JQ_QUERY = namedtuple("JQ_QUERY", ["query", "name", "parse_fn"])
diff --git a/server/src/main/java/org/elasticsearch/tasks/TaskManager.java b/server/src/main/java/org/elasticsearch/tasks/TaskManager.java
index 10fb4eced77..4be7707d886 100644
--- a/server/src/main/java/org/elasticsearch/tasks/TaskManager.java
+++ b/server/src/main/java/org/elasticsearch/tasks/TaskManager.java
@@ -81,6 +81,8 @@ public class TaskManager implements ClusterStateApplier {
private final ConcurrentMapLong<CancellableTaskHolder> cancellableTasks = ConcurrentCollections
.newConcurrentMapLongWithAggressiveConcurrency();
+ private final ConcurrentMapLong<Set<CancellableTaskHolder>> cancellableChildTasks = ConcurrentCollections
+ .newConcurrentMapLongWithAggressiveConcurrency();
@libbkmz
libbkmz / docker-compose.yaml
Created September 20, 2020 21:27
ElasticSearch 7.6.2 cluster with grafana, prometheus and es_exporter
version: '2.2'
services:
es01:
image: docker.elastic.co/elasticsearch/elasticsearch:7.6.2
container_name: es01
environment:
- node.name=es01
- cluster.name=es-docker-cluster
- discovery.seed_hosts=es02,es03
# - discovery.zen.ping.unicast.hosts=es02,es03
@libbkmz
libbkmz / docker-compose.yaml
Created September 17, 2020 12:20
Elastic search simple cluster with docker-compose 7.6.2
version: '2.2'
services:
es01:
image: docker.elastic.co/elasticsearch/elasticsearch:7.6.2
container_name: es01
environment:
- node.name=es01
- cluster.name=es-docker-cluster
- discovery.seed_hosts=es02,es03
# - discovery.zen.ping.unicast.hosts=es02,es03
import math
import sys
import ppft as pp
def worker():
import builtins
try:
__builtins__._DATA
except:
from unittest import TestCase
class ManuallyTypedTest(TestCase):
def test_1(self):
self.fail()
def test_2(self):
pass
[Violation] Forced reflow while executing JavaScript took 108ms
tag.js:117 [Violation] 'requestAnimationFrame' handler took 68ms
TalkerClassPackage.e43f98.min.js:13 Uncaught (in promise) DOMException
play @ TalkerClassPackage.e43f98.min.js:13
e @ TalkerClassPackage.e43f98.min.js:1
y @ TalkerClassPackage.e43f98.min.js:13
(anonymous) @ TalkerClassPackage.e43f98.min.js:13
b @ t.js:4
setTimeout (async)
(anonymous) @ t.js:6
@libbkmz
libbkmz / vs_attach.py
Created July 1, 2019 15:14
Use Visual Studio 2017 com api to attach to running python process with loaded dll for debugging
import os,sys
import win32com.client as win32
# import pythoncom as com
def attach_visual_studio():
# a = com.GetActiveObject("VisualStudio.DTE.12.0")
dte = win32.GetActiveObject("VisualStudio.DTE.15.0")
# https://docs.microsoft.com/en-us/dotnet/api/envdte80.dte2?view=visualstudiosdk-2017
# @TODO: check if there more than 1 solution open.
from flask import Flask, request, Response
import json
from nest import convert
app = Flask(__name__)
# usage example:
# cat input.json | http 'http://127.0.0.1:5000?level=currency&level=country&level=city'
@app.route('/', methods=["POST"])
def hello_world():
levels = request.args.getlist('level')