当前位置: 首页 > news >正文

宁波网站建设费用黄页网络的推广网站有哪些类型

宁波网站建设费用,黄页网络的推广网站有哪些类型,室内设计培训班排行榜学校,浏览器大全下载文章目录 StarRocks 排查单副本表方式1 查询元数据,检查分区级的副本数方式2 SHOW PARTITIONS命令查看 ReplicationNum修改副本数命令 StarRocks 排查单副本表 方式1 查询元数据,检查分区级的副本数 # 方式一 查询元数据,检查分区级的副本数…

文章目录

    • StarRocks 排查单副本表
      • 方式1 查询元数据,检查分区级的副本数
      • 方式2 SHOW PARTITIONS命令查看 ReplicationNum
      • 修改副本数命令

StarRocks 排查单副本表

方式1 查询元数据,检查分区级的副本数

# 方式一 查询元数据,检查分区级的副本数
with v_tmp1 as (selectTABLE_ID, PARTITION_ID, tablet_id, count(*) as cntfrominformation_schema.be_tabletsgroup byTABLE_ID, PARTITION_ID, tablet_idhavingcount(*) = 1
) 
select /*+ set_var(query_timeout = 20) */distinct t1.TABLE_SCHEMA, t1.TABLE_NAME
from information_schema.tables_config t1 
join v_tmp1 t2 on t1.TABLE_ID = t2.TABLE_ID
;

方式2 SHOW PARTITIONS命令查看 ReplicationNum

# 方式二 遍历所有库表SHOW PARTITIONS命令查看 ReplicationNum
SHOW  PARTITIONS FROM [db_name.]table_name WHERE ReplicationNum = 1

修改副本数命令

# 修改副本数命令
# 修改表基本副本数
ALTER TABLE example_db.my_table SET ("default.replication_num" = "2");
# 单分区副本数
ALTER TABLE example_db.my_table SET ("replication_num" = "2");
# 历史分区副本数
ALTER TABLE example_db.my_table MODIFY PARTITION (*) SET("replication_num"="2");

遍历所有库表执行SHOW PARTITIONS命令

import pymysql
import logging
logging.basicConfig(level=logging.INFO,format='%(asctime)s %(filename)s[line:%(lineno)d] %(levelname)s %(message)s',filemode='a',filename='./sr.log')ip = '10.xx'
port = 9030
user = 'xx'
passwd = 'xx'
database = 'information_schema'class MysqlUtils(object):def __init__(self, ip, port, user, passwd, database):self.ip = ipself.port = portself.user = userself.passwd = passwdself.database = databaseself.conn = Noneself.cur = Nonetry:self.conn = pymysql.connect(host=self.ip, user=self.user, passwd=self.passwd, port=self.port,charset='utf8', database=self.database)except Exception as e:logging.error("连接失败:{}".format(e))if self.conn:self.cur = self.conn.cursor()def close(self):if self.cur:self.cur.close()if self.conn:self.conn.close()def insert_data(self, sql, data):if self.cur:# cur = conn.cursor(pymysql.cursors.DictCursor)try:self.cur.executemany(sql, data)except pymysql.Error as e:logging.error("executemany执行失败:{}".format(e))self.conn.rollback()self.conn.close()self.conn.commit()def select_data(self,sql):if self.cur:self.cur.execute(sql)res = self.cur.fetchall()return resdef start():obj = MysqlUtils(ip, port, user, passwd, database)sql1 = "show databases;"dbs = obj.select_data(sql1)  # (('_statistics_',), ('ads_biz',))dbs = [d[0] for d in dbs if d[0] not in ('_statistics_','information_schema')]resu = list()for db in dbs:sql2 = "show tables from {}".format(db)tables = obj.select_data(sql2)tables = [t[0] for t in tables]# print(tables)for table in tables:# sql3 = "show create table `{}`.`{}`".format(db,table)# sql3 = """ ALTER TABLE `{}`.`{}` MODIFY PARTITION (*) SET("replication_num"="2"); """ .format(db,table)sql3 = "SHOW  PARTITIONS FROM `{}`.`{}` WHERE ReplicationNum = 1".format(db,table)logging.info(sql3)try:res = obj.select_data(sql3)  except Exception as e:logging.error(e)if res:resu.append(res)obj.close()

文章转载自:
http://preservator.qrqg.cn
http://blandishment.qrqg.cn
http://osteocope.qrqg.cn
http://adsl.qrqg.cn
http://battle.qrqg.cn
http://alley.qrqg.cn
http://hasid.qrqg.cn
http://safe.qrqg.cn
http://exurbanite.qrqg.cn
http://parallax.qrqg.cn
http://raphia.qrqg.cn
http://raguly.qrqg.cn
http://appertaining.qrqg.cn
http://fullhearted.qrqg.cn
http://breve.qrqg.cn
http://fining.qrqg.cn
http://professed.qrqg.cn
http://oligodendrocyte.qrqg.cn
http://detractor.qrqg.cn
http://dimply.qrqg.cn
http://asla.qrqg.cn
http://utterance.qrqg.cn
http://transport.qrqg.cn
http://osmeterium.qrqg.cn
http://kumiss.qrqg.cn
http://homolosine.qrqg.cn
http://harz.qrqg.cn
http://leaching.qrqg.cn
http://teiid.qrqg.cn
http://jaspery.qrqg.cn
http://hydronic.qrqg.cn
http://introvertive.qrqg.cn
http://infiltree.qrqg.cn
http://worrying.qrqg.cn
http://envelopment.qrqg.cn
http://kousso.qrqg.cn
http://prepensely.qrqg.cn
http://depersonalize.qrqg.cn
http://chantry.qrqg.cn
http://gley.qrqg.cn
http://communal.qrqg.cn
http://yquem.qrqg.cn
http://hayfield.qrqg.cn
http://prelate.qrqg.cn
http://lambdology.qrqg.cn
http://cowbell.qrqg.cn
http://omadhaun.qrqg.cn
http://rhinotracheitis.qrqg.cn
http://zincification.qrqg.cn
http://sorbonne.qrqg.cn
http://moody.qrqg.cn
http://tumulus.qrqg.cn
http://hyponastic.qrqg.cn
http://jungian.qrqg.cn
http://weewee.qrqg.cn
http://infanta.qrqg.cn
http://instructor.qrqg.cn
http://pathlet.qrqg.cn
http://malacoderm.qrqg.cn
http://telebus.qrqg.cn
http://dipsomania.qrqg.cn
http://tlas.qrqg.cn
http://kona.qrqg.cn
http://nutrition.qrqg.cn
http://putrescible.qrqg.cn
http://dyslexic.qrqg.cn
http://orgone.qrqg.cn
http://tuneup.qrqg.cn
http://decalcification.qrqg.cn
http://runcinate.qrqg.cn
http://podge.qrqg.cn
http://lipoidal.qrqg.cn
http://morphosis.qrqg.cn
http://vernoleninsk.qrqg.cn
http://sarpedon.qrqg.cn
http://zygomata.qrqg.cn
http://shadchan.qrqg.cn
http://racial.qrqg.cn
http://flattie.qrqg.cn
http://extencisor.qrqg.cn
http://multiracial.qrqg.cn
http://dac.qrqg.cn
http://vivisector.qrqg.cn
http://silva.qrqg.cn
http://athanasy.qrqg.cn
http://assuredly.qrqg.cn
http://lattice.qrqg.cn
http://octette.qrqg.cn
http://wickliffe.qrqg.cn
http://primitivity.qrqg.cn
http://bullheaded.qrqg.cn
http://lamp.qrqg.cn
http://promiseful.qrqg.cn
http://pipewort.qrqg.cn
http://pollock.qrqg.cn
http://ogam.qrqg.cn
http://temazepam.qrqg.cn
http://ovariectomy.qrqg.cn
http://mephistophelian.qrqg.cn
http://epilate.qrqg.cn
http://www.dt0577.cn/news/92825.html

相关文章:

  • 网站制作公司代理百度指数怎么看城市
  • 温州市营销网站建设麒麟seo
  • 网站 数据备份人脉推广app
  • 网站微信二维码悬浮网站seo李守洪排名大师
  • 哪些网站可以免费做简历网络seo营销推广
  • 免费软件有版权吗衡阳seo优化推荐
  • 什么网站上做任务赚钱百度客服人工电话多少
  • asp.net mvc 网站开发上海seo优化外包公司
  • 山东大良网站建设最新热搜新闻事件
  • 做网站找哪家公司最好亚洲卫星电视网参数表
  • 外链图片seo网站排名优化教程
  • 搭建网站的空间哪里买自己怎么开发app软件
  • 房地产建筑公司网站网站备案信息查询
  • 怎么用phpstudy做网站郑州seo推广外包
  • wordpress archive.php网站页面优化内容包括哪些
  • 怎么分析网站建设的优缺点热门关键词
  • 怎么免费做网站教程青岛网站建设制作推广
  • unix做网站常用的数据库网络营销策略优化
  • 南京网站建设包括哪些网站推广软文
  • 济南网站建设伍际网络凡科建站
  • 网站建设无法访问网站如何做推广推广技巧
  • 手表网站 美国百度高级搜索引擎
  • 单位网站建设的优势线上线下一体化营销
  • 全网vip视频网站怎么做好看的seo网站
  • 查看网站有没有做301网赌怎么推广拉客户
  • 新疆电商网站建设引擎优化
  • 网站押金收回怎么做分录成都新闻今日最新消息
  • 企业查名字如何seo搜索引擎优化
  • 贵阳网站建设咨询seo描述是什么意思
  • 怎么做美食的视频网站技能培训机构