示例
1 | 下载镜像 |
1 | 下载镜像 |
1 | with open('data.csv', 'r') as f: |
1 | ERROR: Can not execute setup.py since setuptools is not available in the build environment. |
解决
1 | pip3 install --upgrade setuptools |
1 | sqlite3 db.sqlite3 |
参考 sqlite.org/cli。
1 | .tables |
1 | .schema <tablename> # 去掉 <> , 不用 ; 结尾 |
1 | curl https://pyenv.run | bash |
1 | 安装 brew |
1 | eval "$(pyenv init -)" |
1 | pyenv install -l |
1 | pyenv install 3.9.10 |
1 | pyenv global 3.9.10 |
1 | sudo apt install libreadline-dev libbz2-dev libncurses-dev libffi-dev libssl-dev sqlite3 libsqlite3-dev |
1 | ... |
解决
1 | PYTHON_BUILD_HOMEBREW_OPENSSL_FORMULA=openssl@1.0 pyenv install 2.7.16 |
引入依赖
1 | <dependency> |
设置自定义序列化类
1 | import com.twitter.chill.protobuf.ProtobufSerializer |
1 | -m address of job manager which to connect |
CQL。
1 | use system; |
1 | CREATE ROLE [IF NOT EXISTS] role_name |
示例
1 | CREATE ROLE IF NOT EXISTS 'root' WITH SUPERUSER = true AND LOGIN = false; |
1 | ALTER ROLE role_name |
示例
1 | ALTER ROLE root WITH PASSWORD = 'NewPassword'; |
1 | 列出所有 keysapces |
1 | CREATE KEYSPACE [IF NOT EXISTS] keyspace_name |
示例
1 | CREATE KEYSPACE IF NOT EXISTS "trace" WITH REPLICATION = { |
1 | desc <keyspace-name>; |
1 | use <keyspace-name>; |
1 | CREATE TABLE [IF NOT EXISTS] [keyspace_name.]table_name ( |
数据类型参考这里。
1 | DROP TABLE [IF EXISTS] keyspace_name.table_name |
1 | ALTER TABLE [keyspace_name.] table_name |
示例
1 | ALTER TABLE trace.ranker ADD rid TEXT; |
1 | // 查询一条 |
1 | bin/cqlsh $host $port -u $username -p $password |