Skip to content

Instantly share code, notes, and snippets.

@vagetablechicken
vagetablechicken / core.log
Last active July 20, 2020 03:11
travis log
travis_fold:start:worker_info
Worker information
hostname: 97930632-cd86-4abc-b530-adb660c4d0ea@1.worker-org-977b464db-df92s.gce-production-2
version: v6.2.1 https://github.com/travis-ci/worker/tree/4e3246c044eb4915c2378ffacd0b3d3ed0136bba
instance: travis-job-e17d9b0f-9f40-41eb-b06a-6d3a60c7d4cb travis-ci-garnet-trusty-1512502259-986baf0 (via amqp)
startup: 6.517163387s
travis_fold:end:worker_info
travis_time:start:03488a9c
travis_time:end:03488a9c:start=1571800159023736470,finish=1571800159202572543,duration=178836073,event=no_world_writable_dirs
travis_time:start:114ab7a6
@vagetablechicken
vagetablechicken / .clang-format
Last active January 10, 2020 03:23
clang-format
---
Language: Cpp
# BasedOnStyle: Google
AccessModifierOffset: -4 # modified
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
#AlignConsecutiveMacros: true # ver >= 9
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: true
AlignOperands: true
@vagetablechicken
vagetablechicken / gist:536a490f394a8575599e082105973585
Created July 20, 2020 03:02
simple_lb_cure_test core: pure virtual method called
travis_fold:start:worker_info
Worker information
hostname: 4a00c8d5-1523-4e98-9a7c-6ac29be8ea28@1.worker-org-694dfb888f-qv26p.gce-production-1
version: v6.2.17 https://github.com/travis-ci/worker/tree/bc420764f334fe0d096a417c80426f672f1b7d18
instance: travis-job-d9ed5289-fc4d-424d-b4f6-9826f3707ebd travis-ci-ubuntu-1804-1582576938-a9b1ae58 (via amqp)
startup: 6.326329803s
travis_fold:end:worker_info
travis_time:start:0a6ecbbe
travis_time:end:0a6ecbbe:start=1594972844536650603,finish=1594972844953012258,duration=416361655,event=no_world_writable_dirs
travis_time:start:0e5c5364
@vagetablechicken
vagetablechicken / gist:c662057bc1020eb05f2e8ae3afbfe5ea
Last active July 20, 2020 03:05
simple_lb_cure_test core: got signal 11
travis_fold:start:worker_info
Worker information
hostname: 97930632-cd86-4abc-b530-adb660c4d0ea@1.worker-org-977b464db-df92s.gce-production-2
version: v6.2.1 https://github.com/travis-ci/worker/tree/4e3246c044eb4915c2378ffacd0b3d3ed0136bba
instance: travis-job-e17d9b0f-9f40-41eb-b06a-6d3a60c7d4cb travis-ci-garnet-trusty-1512502259-986baf0 (via amqp)
startup: 6.517163387s
travis_fold:end:worker_info
travis_time:start:03488a9c
travis_time:end:03488a9c:start=1571800159023736470,finish=1571800159202572543,duration=178836073,event=no_world_writable_dirs
travis_time:start:114ab7a6
@vagetablechicken
vagetablechicken / descprition.md
Last active November 2, 2021 02:34
OpenMLDB ttl setting

逻辑梳理

  1. hybridse GetAbsTTL可能为-2,-1,[0, MAX]。其中,-2为默认值,应该理解为“不gc”;-1是无效设置时赋予的值,如果GetAbsTTL为-1,就应报错; [0, MAX]则是有效的ttl值 -> 推论:GetAbsTTL为0时,不应该理解为不gc,而应该是一个极短的ttl。<1min的值都可以提升为1min的ttl(结构common::TTLSt)

问题即(ttl_type=absolute,ttl=0m)是不gc还是1min?——结论:不gc

  1. 目前openmldb的create table/create index是没有特殊处理“小于1min的abs ttl”,导致如果GetAbsTTL大于等于0小于1min时,转换出来的abs ttl 就是0,即不gc
  2. 不仅是小于1min的,规则应该是换算为min时向上取整

scripts about cmd, github gh cli ...

import math
class WinnerTree:
def __init__(self, ext):
self.ext = ext
self.N = len(ext)
self.k = math.ceil(math.log(self.N, 2))
print(self.k, ", bottom layer node ", pow(2, self.k))
higher gcc(>=7) don't have pthread,m,...
gcc 4.8.5/5.4.0 download and their prerequire dependencies:
https://gcc.gnu.org/pub/gcc/
depends: https://gcc.gnu.org/pub/gcc/infrastructure/
mkdir build & cd build
../configure --prefix=`pwd`/../output --enable-checking=release --enable-languages=c,c++ --disable-multilib # Multilib means support for multiple architectures
make
make install
@vagetablechicken
vagetablechicken / README.md
Created July 20, 2022 08:24
openmldb test sample

openmldb/bin/openmldb --zk_cluster=127.0.0.1:2181 --zk_root_path=/openmldb --role=sql_client < test.sql 即可 注意test.sql内,c1.csv的路径,需要跟taskmanager(spark.home=local)在同一台机器上,并且写绝对路径。 输出结果里都是SUCCEED,没有ERROR就可以。

@vagetablechicken
vagetablechicken / diagnose.py
Last active March 28, 2023 08:36
template fix to inspect offline ls
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2021 4Paradigm
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#