Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/python
"""This tool prints a list of all vttablets from vtctld.
This is meant to be used in conjucntion with vtexec.py.
Run vtlist.py and pipe it through grep filters to narrow down
the list of vttablets you want to identify. Once you're satisfied with the
list, pipe the final output to vtexec.py, which will execute the given
command on all vttablets of the list.
#!/usr/bin/python
"""This executes the specified commands from the output of vtlist.py.
This tool expects its input to be piped from vtlist.py. Please
view the documentation of vtlist.py on how to use it.
"""
import argparse
import subprocess
diff --git a/autoload/go/list.vim b/autoload/go/list.vim
index 6859a9f..aa53759 100644
--- a/autoload/go/list.vim
+++ b/autoload/go/list.vim
@@ -32,9 +32,9 @@ function! go#list#Window(listtype, ...)
endif
if l:listtype == "locationlist"
- exe 'lopen ' . height
+ exe 'botright lopen ' . height
diff --git a/imports/fix.go b/imports/fix.go
index 1387c997..3504d40b 100644
--- a/imports/fix.go
+++ b/imports/fix.go
@@ -641,12 +641,6 @@ func loadExportsGoPath(expectPackage, dir string) map[string]bool {
// handled by ctx.MatchFile.
continue
}
- if pkgName != expectPackage {
- if Debug {
@sougou
sougou / cluster-up.sh
Created January 24, 2018 03:43
Automation for bringing up local cluster
set -e
script_root=.
$script_root/zk-up.sh
$script_root/vtctld-up.sh
$script_root/vttablet-up.sh
sleep 10s
$script_root/lvtctl.sh InitShardMaster -force test_keyspace/0 test-100
@sougou
sougou / cluster-down.sh
Created December 22, 2017 06:59
Vitess resharding commands for local example
#!/bin/bash
# Copyright 2017 Google Inc.
#
# 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
#
@sougou
sougou / cluster-down.sh
Created July 13, 2018 04:19
Local Example shortcuts
./vtgate-down.sh
./sharded-vttablet-down.sh
./vttablet-down.sh
./vtctld-down.sh
./zk-down.sh
rm -r $VTDATAROOT/*
@sougou
sougou / mysql_table_stats.json
Last active January 15, 2019 22:33
Prometheus and Grafa files used in Percona presentation
{
"__inputs": [
{
"name": "DS_VITESS",
"label": "vitess",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
/*
Copyright 2019 The Vitess Authors.
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
Unless required by applicable law or agreed to in writing, software
WARN [runner] Can't run linter goanalysis_metalinter: S1009: failed prerequisites: [(inspect@command-line-arguments, isgenerated@command-line-arguments): analysis skipped: errors in package: [/home/sougou/dev/src/vitess.io/vitess/go/vt/vttablet/heartbeat/writer.go:160:2: undeclared name: writes /home/sougou/dev/src/vitess.io/vitess/go/vt/vttablet/heartbeat/writer.go:185:2:
undeclared name: writeErrors]]
WARN [runner] Can't run linter unused: buildir: analysis skipped: errors in package: [/home/sougou/dev/src/vitess.io/vitess/go/vt/vttablet/heartbeat/writer.go:160:2: undeclared name: writes /home/sougou/dev/src/vitess.io/vitess/go/vt/vttablet/heartbeat/writer.go:185:2: undeclared name: writeErrors]
ERRO Running error: buildir: analysis skipped: errors in package: [/home/sougou/dev/src/vitess.io/vitess/go/vt/vttablet/heartbeat/writer.go:160:2: undeclared name: writes /home/sougou/dev/src/vitess.io/vitess/go/vt/vttablet/heartbeat/writer.go:185:2: undeclared name: writeErrors]
go/vt/vttablet/heartbeat/writer.go