前端技术
HTML
CSS
Javascript
前端框架和UI库
VUE
ReactJS
AngularJS
JQuery
NodeJS
JSON
Element-UI
Bootstrap
Material UI
服务端和客户端
Java
Python
PHP
Golang
Scala
Kotlin
Groovy
Ruby
Lua
.net
c#
c++
后端WEB和工程框架
SpringBoot
SpringCloud
Struts2
MyBatis
Hibernate
Tornado
Beego
Go-Spring
Go Gin
Go Iris
Dubbo
HessianRPC
Maven
Gradle
数据库
MySQL
Oracle
Mongo
中间件与web容器
Redis
MemCache
Etcd
Cassandra
Kafka
RabbitMQ
RocketMQ
ActiveMQ
Nacos
Consul
Tomcat
Nginx
Netty
大数据技术
Hive
Impala
ClickHouse
DorisDB
Greenplum
PostgreSQL
HBase
Kylin
Hadoop
Apache Pig
ZooKeeper
SeaTunnel
Sqoop
Datax
Flink
Spark
Mahout
数据搜索与日志
ElasticSearch
Apache Lucene
Apache Solr
Kibana
Logstash
数据可视化与OLAP
Apache Atlas
Superset
Saiku
Tesseract
系统与容器
Linux
Shell
Docker
Kubernetes
[利用row-click控制表格行展开与折...]的搜索结果
这里是文章列表。热门标签的颜色随机变换,标签颜色没有特殊含义。
点击某个标签可搜索标签相关的文章。
点击某个标签可搜索标签相关的文章。
转载文章
...og-format=ROW 二进制日志文件格式log-slave-updates=True slave更新是否记入日志sync-master-info=1 值为1确保信息不会丢失slave-parallel-threads=3 同时启动多少个复制线程,最多与要复制的数据库数量相等即可binlog-checksum=CRC32 效验码master-verify-checksum=1 启动主服务器效验slave-sql-verify-checksum=1 启动从服务器效验[galera][embedded][mariadb][mariadb-10.6][root@mster-k8s mysql] 11.2 修改从库配置 [mysqld]character-set-server=utf8collation-server=utf8_general_ciserver_id=14log-bin= mysql-bin log-bin是二进制文件relay_log = relay-bin 中继日志, 后面指定存放位置。如果只是指定名字,默认存放在/var/lib/mysql下lower_case_table_names=1 11.3 重启主库和从库服务 systemctl restart mariad 11.4 master节点配置 MariaDB [huawei]> grant replication slave, replication client on . to 'liu'@'%' identified by '123456';Query OK, 0 rows affected (0.001 sec)MariaDB [huawei]> show master status;+------------------+----------+--------------+------------------+| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |+------------------+----------+--------------+------------------+| mysql-bin.000001 | 4990 | | |+------------------+----------+--------------+------------------+1 row in set (0.000 sec)MariaDB [huawei]> select binlog_gtid_pos('mysql-bin.000001', 4990 );+-------------------------------------------+| binlog_gtid_pos('mysql-bin.000001', 4990) |+-------------------------------------------+| 0-13-80 |+-------------------------------------------+1 row in set (0.000 sec)MariaDB [huawei]> flush privileges; 11.5 slave节点配置 MariaDB [(none)]> set global gtid_slave_pos='0-13-80';Query OK, 0 rows affected (0.004 sec)MariaDB [(none)]> change master to master_host='101.34.141.216',master_user='liu',master_password='123456',master_use_gtid=slave_pos;Query OK, 0 rows affected (0.008 sec)MariaDB [(none)]> start slave;Query OK, 0 rows affected (0.005 sec)MariaDB [(none)]> 11.6 验证salve状态 MariaDB [(none)]> show slave status\G 1. row Slave_IO_State: Waiting for master to send eventMaster_Host: 101.34.141.216Master_User: liuMaster_Port: 3306Connect_Retry: 60Master_Log_File: mysql-bin.000001Read_Master_Log_Pos: 13260Relay_Log_File: relay-bin.000002Relay_Log_Pos: 10246Relay_Master_Log_File: mysql-bin.000001Slave_IO_Running: YesSlave_SQL_Running: YesReplicate_Do_DB: Replicate_Ignore_DB: Replicate_Do_Table: Replicate_Ignore_Table: Replicate_Wild_Do_Table: Replicate_Wild_Ignore_Table: Last_Errno: 0Last_Error: Skip_Counter: 0Exec_Master_Log_Pos: 13260Relay_Log_Space: 10549Until_Condition: NoneUntil_Log_File: Until_Log_Pos: 0Master_SSL_Allowed: NoMaster_SSL_CA_File: 本篇文章为转载内容。原文链接:https://blog.csdn.net/l363130002/article/details/126121255。 该文由互联网用户投稿提供,文中观点代表作者本人意见,并不代表本站的立场。 作为信息平台,本站仅提供文章转载服务,并不拥有其所有权,也不对文章内容的真实性、准确性和合法性承担责任。 如发现本文存在侵权、违法、违规或事实不符的情况,请及时联系我们,我们将第一时间进行核实并删除相应内容。
2023-07-12 10:11:01
310
转载
转载文章
...句 分布式多版本并发控制(MVCC:Multi-version Concurrency Control) 支持JSON和XML格式 Postgres-XL缺少的功能 内建的高可用机制 使用外部机制实现高可能,如:Corosync/Pacemaker 有未来功能提升的空间 增加节点/重新分片数据(re-shard)的简便性 数据重分布(redistribution)期间会锁表 可采用预分片(pre-shard)方式解决,在同台物理服务器上建立多个数据节点,每个节点存储一个数据分片。数据重分布时,将一些数据节点迁出即可 某些外键、唯一性约束功能 Postgres-XL架构 [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-M9lFuEIP-1640133702200)(./assets/postgre-xl.jpg)] 基于开源项目Postgres-XC XL增加了MPP,允许数据节点间直接通讯,交换复杂跨节点关联查询相关数据信息,减少协调器负载。 多个协调器(Coordinator) 应用程序的数据库连入点 分析查询语句,生成执行计划 多个数据节点(DataNode) 实际的数据存储 数据自动打散分布到集群中各数据节点 本地执行查询 一个查询在所有相关节点上并行查询 全局事务管理器(GTM:Global Transaction Manager) 提供事务间一致性视图 部署GTM Proxy实例,以提高性能 Postgre-XL主要组件 GTM (Global Transaction Manager) - 全局事务管理器 GTM是Postgres-XL的一个关键组件,用于提供一致的事务管理和元组可见性控制。 GTM Standby GTM的备节点,在pgxc,pgxl中,GTM控制所有的全局事务分配,如果出现问题,就会导致整个集群不可用,为了增加可用性,增加该备用节点。当GTM出现问题时,GTM Standby可以升级为GTM,保证集群正常工作。 GTM-Proxy GTM需要与所有的Coordinators通信,为了降低压力,可以在每个Coordinator机器上部署一个GTM-Proxy。 Coordinator --协调器 协调器是应用程序到数据库的接口。它的作用类似于传统的PostgreSQL后台进程,但是协调器不存储任何实际数据。实际数据由数据节点存储。协调器接收SQL语句,根据需要获取全局事务Id和全局快照,确定涉及哪些数据节点,并要求它们执行(部分)语句。当向数据节点发出语句时,它与GXID和全局快照相关联,以便多版本并发控制(MVCC)属性扩展到集群范围。 Datanode --数据节点 用于实际存储数据。表可以分布在各个数据节点之间,也可以复制到所有数据节点。数据节点没有整个数据库的全局视图,它只负责本地存储的数据。接下来,协调器将检查传入语句,并制定子计划。然后,根据需要将这些数据连同GXID和全局快照一起传输到涉及的每个数据节点。数据节点可以在不同的会话中接收来自各个协调器的请求。但是,由于每个事务都是惟一标识的,并且与一致的(全局)快照相关联,所以每个数据节点都可以在其事务和快照上下文中正确执行。 Postgres-XL继承了PostgreSQL Postgres-XL是PostgreSQL的扩展并继承了其很多特性: 复杂查询 外键 触发器 视图 事务 MVCC(多版本控制) 此外,类似于PostgreSQL,用户可以通过多种方式扩展Postgres-XL,例如添加新的 数据类型 函数 操作 聚合函数 索引类型 过程语言 安装 环境说明 由于资源有限,gtm一台、另外两台身兼数职。 主机名 IP 角色 端口 nodename 数据目录 gtm 192.168.20.132 GTM 6666 gtm /nodes/gtm 协调器 5432 coord1 /nodes/coordinator xl1 192.168.20.133 数据节点 5433 node1 /nodes/pgdata gtm代理 6666 gtmpoxy01 /nodes/gtm_pxy1 协调器 5432 coord2 /nodes/coordinator xl2 192.168.20.134 数据节点 5433 node2 /nodes/pgdata gtm代理 6666 gtmpoxy02 /nodes/gtm_pxy2 要求 GNU make版本 3.8及以上版本 [root@pg ~] make --versionGNU Make 3.82Built for x86_64-redhat-linux-gnuCopyright (C) 2010 Free Software Foundation, Inc.License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>This is free software: you are free to change and redistribute it.There is NO WARRANTY, to the extent permitted by law. 需安装GCC包 需安装tar包 用于解压缩文件 默认需要GNU Readline library 其作用是可以让psql命令行记住执行过的命令,并且可以通过键盘上下键切换命令。但是可以通过--without-readline禁用这个特性,或者可以指定--withlibedit-preferred选项来使用libedit 默认使用zlib压缩库 可通过--without-zlib选项来禁用 配置hosts 所有主机上都配置 [root@xl2 11] cat /etc/hosts127.0.0.1 localhost192.168.20.132 gtm192.168.20.133 xl1192.168.20.134 xl2 关闭防火墙、Selinux 所有主机都执行 关闭防火墙: [root@gtm ~] systemctl stop firewalld.service[root@gtm ~] systemctl disable firewalld.service selinux设置: [root@gtm ~]vim /etc/selinux/config 设置SELINUX=disabled,保存退出。 This file controls the state of SELinux on the system. SELINUX= can take one of these three values: enforcing - SELinux security policy is enforced. permissive - SELinux prints warnings instead of enforcing. disabled - No SELinux policy is loaded.SELINUX=disabled SELINUXTYPE= can take one of three two values: targeted - Targeted processes are protected, minimum - Modification of targeted policy. Only selected processes are protected. mls - Multi Level Security protection. 安装依赖包 所有主机上都执行 yum install -y flex bison readline-devel zlib-devel openjade docbook-style-dsssl gcc 创建用户 所有主机上都执行 [root@gtm ~] useradd postgres[root@gtm ~] passwd postgres[root@gtm ~] su - postgres[root@gtm ~] mkdir ~/.ssh[root@gtm ~] chmod 700 ~/.ssh 配置SSH免密登录 仅仅在gtm节点配置如下操作: [root@gtm ~] su - postgres[postgres@gtm ~] ssh-keygen -t rsa[postgres@gtm ~] cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys[postgres@gtm ~] chmod 600 ~/.ssh/authorized_keys 将刚生成的认证文件拷贝到xl1到xl2中,使得gtm节点可以免密码登录xl1~xl2的任意一个节点: [postgres@gtm ~] scp ~/.ssh/authorized_keys postgres@xl1:~/.ssh/[postgres@gtm ~] scp ~/.ssh/authorized_keys postgres@xl2:~/.ssh/ 对所有提示都不要输入,直接enter下一步。直到最后,因为第一次要求输入目标机器的用户密码,输入即可。 下载源码 下载地址:https://www.postgres-xl.org/download/ [root@slave ~] ll postgres-xl-10r1.1.tar.gz-rw-r--r-- 1 root root 28121666 May 30 05:21 postgres-xl-10r1.1.tar.gz 编译、安装Postgres-XL 所有节点都安装,编译需要一点时间,最好同时进行编译。 [root@slave ~] tar xvf postgres-xl-10r1.1.tar.gz[root@slave ~] ./configure --prefix=/home/postgres/pgxl/[root@slave ~] make[root@slave ~] make install[root@slave ~] cd contrib/ --安装必要的工具,在gtm节点上安装即可[root@slave ~] make[root@slave ~] make install 配置环境变量 所有节点都要配置 进入postgres用户,修改其环境变量,开始编辑 [root@gtm ~]su - postgres[postgres@gtm ~]vi .bashrc --不是.bash_profile 在打开的文件末尾,新增如下变量配置: export PGHOME=/home/postgres/pgxlexport LD_LIBRARY_PATH=$PGHOME/lib:$LD_LIBRARY_PATHexport PATH=$PGHOME/bin:$PATH 按住esc,然后输入:wq!保存退出。输入以下命令对更改重启生效。 [postgres@gtm ~] source .bashrc --不是.bash_profile 输入以下语句,如果输出变量结果,代表生效 [postgres@gtm ~] echo $PGHOME 应该输出/home/postgres/pgxl代表生效 配置集群 生成pgxc_ctl.conf配置文件 [postgres@gtm ~] pgxc_ctl prepare/bin/bashInstalling pgxc_ctl_bash script as /home/postgres/pgxl/pgxc_ctl/pgxc_ctl_bash.ERROR: File "/home/postgres/pgxl/pgxc_ctl/pgxc_ctl.conf" not found or not a regular file. No such file or directoryInstalling pgxc_ctl_bash script as /home/postgres/pgxl/pgxc_ctl/pgxc_ctl_bash.Reading configuration using /home/postgres/pgxl/pgxc_ctl/pgxc_ctl_bash --home /home/postgres/pgxl/pgxc_ctl --configuration /home/postgres/pgxl/pgxc_ctl/pgxc_ctl.confFinished reading configuration. PGXC_CTL START Current directory: /home/postgres/pgxl/pgxc_ctl 配置pgxc_ctl.conf 新建/home/postgres/pgxc_ctl/pgxc_ctl.conf文件,编辑如下: 对着模板文件一个一个修改,否则会造成初始化过程出现各种神奇问题。 pgxcInstallDir=$PGHOMEpgxlDATA=$PGHOME/data pgxcOwner=postgres---- GTM Master -----------------------------------------gtmName=gtmgtmMasterServer=gtmgtmMasterPort=6666gtmMasterDir=$pgxlDATA/nodes/gtmgtmSlave=y Specify y if you configure GTM Slave. Otherwise, GTM slave will not be configured and all the following variables will be reset.gtmSlaveName=gtmSlavegtmSlaveServer=gtm value none means GTM slave is not available. Give none if you don't configure GTM Slave.gtmSlavePort=20001 Not used if you don't configure GTM slave.gtmSlaveDir=$pgxlDATA/nodes/gtmSlave Not used if you don't configure GTM slave.---- GTM-Proxy Master -------gtmProxyDir=$pgxlDATA/nodes/gtm_proxygtmProxy=y gtmProxyNames=(gtm_pxy1 gtm_pxy2) gtmProxyServers=(xl1 xl2) gtmProxyPorts=(6666 6666) gtmProxyDirs=($gtmProxyDir $gtmProxyDir) ---- Coordinators ---------coordMasterDir=$pgxlDATA/nodes/coordcoordNames=(coord1 coord2) coordPorts=(5432 5432) poolerPorts=(6667 6667) coordPgHbaEntries=(0.0.0.0/0)coordMasterServers=(xl1 xl2) coordMasterDirs=($coordMasterDir $coordMasterDir)coordMaxWALsernder=0 没设置备份节点,设置为0coordMaxWALSenders=($coordMaxWALsernder $coordMaxWALsernder) 数量保持和coordMasterServers一致coordSlave=n---- Datanodes ----------datanodeMasterDir=$pgxlDATA/nodes/dn_masterprimaryDatanode=xl1 主数据节点datanodeNames=(node1 node2)datanodePorts=(5433 5433) datanodePoolerPorts=(6668 6668) datanodePgHbaEntries=(0.0.0.0/0)datanodeMasterServers=(xl1 xl2)datanodeMasterDirs=($datanodeMasterDir $datanodeMasterDir)datanodeMaxWalSender=4datanodeMaxWALSenders=($datanodeMaxWalSender $datanodeMaxWalSender) 集群初始化,启动,停止 初始化 pgxc_ctl -c /home/postgres/pgxc_ctl/pgxc_ctl.conf init all 输出结果: /bin/bashInstalling pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Installing pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Reading configuration using /home/postgres/pgxc_ctl/pgxc_ctl_bash --home /home/postgres/pgxc_ctl --configuration /home/postgres/pgxc_ctl/pgxc_ctl.conf/home/postgres/pgxc_ctl/pgxc_ctl.conf: line 189: $coordExtraConfig: ambiguous redirectFinished reading configuration. PGXC_CTL START Current directory: /home/postgres/pgxc_ctlStopping all the coordinator masters.Stopping coordinator master coord1.Stopping coordinator master coord2.pg_ctl: directory "/home/postgres/pgxc/nodes/coord/coord1" does not existpg_ctl: directory "/home/postgres/pgxc/nodes/coord/coord2" does not existDone.Stopping all the datanode masters.Stopping datanode master datanode1.Stopping datanode master datanode2.pg_ctl: PID file "/home/postgres/pgxc/nodes/datanode/datanode1/postmaster.pid" does not existIs server running?Done.Stop GTM masterwaiting for server to shut down.... doneserver stopped[postgres@gtm ~]$ echo $PGHOME/home/postgres/pgxl[postgres@gtm ~]$ ll /home/postgres/pgxl/pgxc/nodes/gtm/gtm.^C[postgres@gtm ~]$ pgxc_ctl -c /home/postgres/pgxc_ctl/pgxc_ctl.conf init all/bin/bashInstalling pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Installing pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Reading configuration using /home/postgres/pgxc_ctl/pgxc_ctl_bash --home /home/postgres/pgxc_ctl --configuration /home/postgres/pgxc_ctl/pgxc_ctl.conf/home/postgres/pgxc_ctl/pgxc_ctl.conf: line 189: $coordExtraConfig: ambiguous redirectFinished reading configuration. PGXC_CTL START Current directory: /home/postgres/pgxc_ctlInitialize GTM masterERROR: target directory (/home/postgres/pgxc/nodes/gtm) exists and not empty. Skip GTM initilializationDone.Start GTM masterserver startingInitialize all the coordinator masters.Initialize coordinator master coord1.ERROR: target coordinator master coord1 is running now. Skip initilialization.Initialize coordinator master coord2.The files belonging to this database system will be owned by user "postgres".This user must also own the server process.The database cluster will be initialized with locale "en_US.UTF-8".The default database encoding has accordingly been set to "UTF8".The default text search configuration will be set to "english".Data page checksums are disabled.fixing permissions on existing directory /home/postgres/pgxc/nodes/coord/coord2 ... okcreating subdirectories ... okselecting default max_connections ... 100selecting default shared_buffers ... 128MBselecting dynamic shared memory implementation ... posixcreating configuration files ... okrunning bootstrap script ... okperforming post-bootstrap initialization ... creating cluster information ... oksyncing data to disk ... okfreezing database template0 ... okfreezing database template1 ... okfreezing database postgres ... okWARNING: enabling "trust" authentication for local connectionsYou can change this by editing pg_hba.conf or using the option -A, or--auth-local and --auth-host, the next time you run initdb.Success.Done.Starting coordinator master.Starting coordinator master coord1ERROR: target coordinator master coord1 is already running now. Skip initialization.Starting coordinator master coord22019-05-30 21:09:25.562 EDT [2148] LOG: listening on IPv4 address "0.0.0.0", port 54322019-05-30 21:09:25.562 EDT [2148] LOG: listening on IPv6 address "::", port 54322019-05-30 21:09:25.563 EDT [2148] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432"2019-05-30 21:09:25.601 EDT [2149] LOG: database system was shut down at 2019-05-30 21:09:22 EDT2019-05-30 21:09:25.605 EDT [2148] LOG: database system is ready to accept connections2019-05-30 21:09:25.612 EDT [2156] LOG: cluster monitor startedDone.Initialize all the datanode masters.Initialize the datanode master datanode1.Initialize the datanode master datanode2.The files belonging to this database system will be owned by user "postgres".This user must also own the server process.The database cluster will be initialized with locale "en_US.UTF-8".The default database encoding has accordingly been set to "UTF8".The default text search configuration will be set to "english".Data page checksums are disabled.fixing permissions on existing directory /home/postgres/pgxc/nodes/datanode/datanode1 ... okcreating subdirectories ... okselecting default max_connections ... 100selecting default shared_buffers ... 128MBselecting dynamic shared memory implementation ... posixcreating configuration files ... okrunning bootstrap script ... okperforming post-bootstrap initialization ... creating cluster information ... oksyncing data to disk ... okfreezing database template0 ... okfreezing database template1 ... okfreezing database postgres ... okWARNING: enabling "trust" authentication for local connectionsYou can change this by editing pg_hba.conf or using the option -A, or--auth-local and --auth-host, the next time you run initdb.Success.The files belonging to this database system will be owned by user "postgres".This user must also own the server process.The database cluster will be initialized with locale "en_US.UTF-8".The default database encoding has accordingly been set to "UTF8".The default text search configuration will be set to "english".Data page checksums are disabled.fixing permissions on existing directory /home/postgres/pgxc/nodes/datanode/datanode2 ... okcreating subdirectories ... okselecting default max_connections ... 100selecting default shared_buffers ... 128MBselecting dynamic shared memory implementation ... posixcreating configuration files ... okrunning bootstrap script ... okperforming post-bootstrap initialization ... creating cluster information ... oksyncing data to disk ... okfreezing database template0 ... okfreezing database template1 ... okfreezing database postgres ... okWARNING: enabling "trust" authentication for local connectionsYou can change this by editing pg_hba.conf or using the option -A, or--auth-local and --auth-host, the next time you run initdb.Success.Done.Starting all the datanode masters.Starting datanode master datanode1.WARNING: datanode master datanode1 is running now. Skipping.Starting datanode master datanode2.2019-05-30 21:09:33.352 EDT [2404] LOG: listening on IPv4 address "0.0.0.0", port 154322019-05-30 21:09:33.352 EDT [2404] LOG: listening on IPv6 address "::", port 154322019-05-30 21:09:33.355 EDT [2404] LOG: listening on Unix socket "/tmp/.s.PGSQL.15432"2019-05-30 21:09:33.392 EDT [2404] LOG: redirecting log output to logging collector process2019-05-30 21:09:33.392 EDT [2404] HINT: Future log output will appear in directory "pg_log".Done.psql: FATAL: no pg_hba.conf entry for host "192.168.20.132", user "postgres", database "postgres"psql: FATAL: no pg_hba.conf entry for host "192.168.20.132", user "postgres", database "postgres"Done.psql: FATAL: no pg_hba.conf entry for host "192.168.20.132", user "postgres", database "postgres"psql: FATAL: no pg_hba.conf entry for host "192.168.20.132", user "postgres", database "postgres"Done.[postgres@gtm ~]$ pgxc_ctl -c /home/postgres/pgxc_ctl/pgxc_ctl.conf stop all/bin/bashInstalling pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Installing pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Reading configuration using /home/postgres/pgxc_ctl/pgxc_ctl_bash --home /home/postgres/pgxc_ctl --configuration /home/postgres/pgxc_ctl/pgxc_ctl.conf/home/postgres/pgxc_ctl/pgxc_ctl.conf: line 189: $coordExtraConfig: ambiguous redirectFinished reading configuration. PGXC_CTL START Current directory: /home/postgres/pgxc_ctlStopping all the coordinator masters.Stopping coordinator master coord1.Stopping coordinator master coord2.pg_ctl: directory "/home/postgres/pgxc/nodes/coord/coord1" does not existDone.Stopping all the datanode masters.Stopping datanode master datanode1.Stopping datanode master datanode2.pg_ctl: PID file "/home/postgres/pgxc/nodes/datanode/datanode1/postmaster.pid" does not existIs server running?Done.Stop GTM masterwaiting for server to shut down.... doneserver stopped[postgres@gtm ~]$ pgxc_ctl/bin/bashInstalling pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Installing pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Reading configuration using /home/postgres/pgxc_ctl/pgxc_ctl_bash --home /home/postgres/pgxc_ctl --configuration /home/postgres/pgxc_ctl/pgxc_ctl.conf/home/postgres/pgxc_ctl/pgxc_ctl.conf: line 189: $coordExtraConfig: ambiguous redirectFinished reading configuration. PGXC_CTL START Current directory: /home/postgres/pgxc_ctlPGXC monitor allNot running: gtm masterRunning: coordinator master coord1Not running: coordinator master coord2Running: datanode master datanode1Not running: datanode master datanode2PGXC stop coordinator master coord1Stopping coordinator master coord1.pg_ctl: directory "/home/postgres/pgxc/nodes/coord/coord1" does not existDone.PGXC stop datanode master datanode1Stopping datanode master datanode1.pg_ctl: PID file "/home/postgres/pgxc/nodes/datanode/datanode1/postmaster.pid" does not existIs server running?Done.PGXC monitor allNot running: gtm masterRunning: coordinator master coord1Not running: coordinator master coord2Running: datanode master datanode1Not running: datanode master datanode2PGXC monitor allNot running: gtm masterNot running: coordinator master coord1Not running: coordinator master coord2Not running: datanode master datanode1Not running: datanode master datanode2PGXC exit[postgres@gtm ~]$ pgxc_ctl -c /home/postgres/pgxc_ctl/pgxc_ctl.conf init all/bin/bashInstalling pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Installing pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Reading configuration using /home/postgres/pgxc_ctl/pgxc_ctl_bash --home /home/postgres/pgxc_ctl --configuration /home/postgres/pgxc_ctl/pgxc_ctl.conf/home/postgres/pgxc_ctl/pgxc_ctl.conf: line 189: $coordExtraConfig: ambiguous redirectFinished reading configuration. PGXC_CTL START Current directory: /home/postgres/pgxc_ctlInitialize GTM masterERROR: target directory (/home/postgres/pgxc/nodes/gtm) exists and not empty. Skip GTM initilializationDone.Start GTM masterserver startingInitialize all the coordinator masters.Initialize coordinator master coord1.Initialize coordinator master coord2.The files belonging to this database system will be owned by user "postgres".This user must also own the server process.The database cluster will be initialized with locale "en_US.UTF-8".The default database encoding has accordingly been set to "UTF8".The default text search configuration will be set to "english".Data page checksums are disabled.fixing permissions on existing directory /home/postgres/pgxc/nodes/coord/coord1 ... okcreating subdirectories ... okselecting default max_connections ... 100selecting default shared_buffers ... 128MBselecting dynamic shared memory implementation ... posixcreating configuration files ... okrunning bootstrap script ... okperforming post-bootstrap initialization ... creating cluster information ... oksyncing data to disk ... okfreezing database template0 ... okfreezing database template1 ... okfreezing database postgres ... okWARNING: enabling "trust" authentication for local connectionsYou can change this by editing pg_hba.conf or using the option -A, or--auth-local and --auth-host, the next time you run initdb.Success.The files belonging to this database system will be owned by user "postgres".This user must also own the server process.The database cluster will be initialized with locale "en_US.UTF-8".The default database encoding has accordingly been set to "UTF8".The default text search configuration will be set to "english".Data page checksums are disabled.fixing permissions on existing directory /home/postgres/pgxc/nodes/coord/coord2 ... okcreating subdirectories ... okselecting default max_connections ... 100selecting default shared_buffers ... 128MBselecting dynamic shared memory implementation ... posixcreating configuration files ... okrunning bootstrap script ... okperforming post-bootstrap initialization ... creating cluster information ... oksyncing data to disk ... okfreezing database template0 ... okfreezing database template1 ... okfreezing database postgres ... okWARNING: enabling "trust" authentication for local connectionsYou can change this by editing pg_hba.conf or using the option -A, or--auth-local and --auth-host, the next time you run initdb.Success.Done.Starting coordinator master.Starting coordinator master coord1Starting coordinator master coord22019-05-30 21:13:03.998 EDT [25137] LOG: listening on IPv4 address "0.0.0.0", port 54322019-05-30 21:13:03.998 EDT [25137] LOG: listening on IPv6 address "::", port 54322019-05-30 21:13:04.000 EDT [25137] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432"2019-05-30 21:13:04.038 EDT [25138] LOG: database system was shut down at 2019-05-30 21:13:00 EDT2019-05-30 21:13:04.042 EDT [25137] LOG: database system is ready to accept connections2019-05-30 21:13:04.049 EDT [25145] LOG: cluster monitor started2019-05-30 21:13:04.020 EDT [2730] LOG: listening on IPv4 address "0.0.0.0", port 54322019-05-30 21:13:04.020 EDT [2730] LOG: listening on IPv6 address "::", port 54322019-05-30 21:13:04.021 EDT [2730] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432"2019-05-30 21:13:04.057 EDT [2731] LOG: database system was shut down at 2019-05-30 21:13:00 EDT2019-05-30 21:13:04.061 EDT [2730] LOG: database system is ready to accept connections2019-05-30 21:13:04.062 EDT [2738] LOG: cluster monitor startedDone.Initialize all the datanode masters.Initialize the datanode master datanode1.Initialize the datanode master datanode2.The files belonging to this database system will be owned by user "postgres".This user must also own the server process.The database cluster will be initialized with locale "en_US.UTF-8".The default database encoding has accordingly been set to "UTF8".The default text search configuration will be set to "english".Data page checksums are disabled.fixing permissions on existing directory /home/postgres/pgxc/nodes/datanode/datanode1 ... okcreating subdirectories ... okselecting default max_connections ... 100selecting default shared_buffers ... 128MBselecting dynamic shared memory implementation ... posixcreating configuration files ... okrunning bootstrap script ... okperforming post-bootstrap initialization ... creating cluster information ... oksyncing data to disk ... okfreezing database template0 ... okfreezing database template1 ... okfreezing database postgres ... okWARNING: enabling "trust" authentication for local connectionsYou can change this by editing pg_hba.conf or using the option -A, or--auth-local and --auth-host, the next time you run initdb.Success.The files belonging to this database system will be owned by user "postgres".This user must also own the server process.The database cluster will be initialized with locale "en_US.UTF-8".The default database encoding has accordingly been set to "UTF8".The default text search configuration will be set to "english".Data page checksums are disabled.fixing permissions on existing directory /home/postgres/pgxc/nodes/datanode/datanode2 ... okcreating subdirectories ... okselecting default max_connections ... 100selecting default shared_buffers ... 128MBselecting dynamic shared memory implementation ... posixcreating configuration files ... okrunning bootstrap script ... okperforming post-bootstrap initialization ... creating cluster information ... oksyncing data to disk ... okfreezing database template0 ... okfreezing database template1 ... okfreezing database postgres ... okWARNING: enabling "trust" authentication for local connectionsYou can change this by editing pg_hba.conf or using the option -A, or--auth-local and --auth-host, the next time you run initdb.Success.Done.Starting all the datanode masters.Starting datanode master datanode1.Starting datanode master datanode2.2019-05-30 21:13:12.077 EDT [25392] LOG: listening on IPv4 address "0.0.0.0", port 154322019-05-30 21:13:12.077 EDT [25392] LOG: listening on IPv6 address "::", port 154322019-05-30 21:13:12.079 EDT [25392] LOG: listening on Unix socket "/tmp/.s.PGSQL.15432"2019-05-30 21:13:12.114 EDT [25392] LOG: redirecting log output to logging collector process2019-05-30 21:13:12.114 EDT [25392] HINT: Future log output will appear in directory "pg_log".2019-05-30 21:13:12.079 EDT [2985] LOG: listening on IPv4 address "0.0.0.0", port 154322019-05-30 21:13:12.079 EDT [2985] LOG: listening on IPv6 address "::", port 154322019-05-30 21:13:12.081 EDT [2985] LOG: listening on Unix socket "/tmp/.s.PGSQL.15432"2019-05-30 21:13:12.117 EDT [2985] LOG: redirecting log output to logging collector process2019-05-30 21:13:12.117 EDT [2985] HINT: Future log output will appear in directory "pg_log".Done.psql: FATAL: no pg_hba.conf entry for host "192.168.20.132", user "postgres", database "postgres"psql: FATAL: no pg_hba.conf entry for host "192.168.20.132", user "postgres", database "postgres"Done.psql: FATAL: no pg_hba.conf entry for host "192.168.20.132", user "postgres", database "postgres"psql: FATAL: no pg_hba.conf entry for host "192.168.20.132", user "postgres", database "postgres"Done. 启动 pgxc_ctl -c /home/postgres/pgxc_ctl/pgxc_ctl.conf start all 关闭 pgxc_ctl -c /home/postgres/pgxc_ctl/pgxc_ctl.conf stop all 查看集群状态 [postgres@gtm ~]$ pgxc_ctl monitor all/bin/bashInstalling pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Installing pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Reading configuration using /home/postgres/pgxc_ctl/pgxc_ctl_bash --home /home/postgres/pgxc_ctl --configuration /home/postgres/pgxc_ctl/pgxc_ctl.conf/home/postgres/pgxc_ctl/pgxc_ctl.conf: line 189: $coordExtraConfig: ambiguous redirectFinished reading configuration. PGXC_CTL START Current directory: /home/postgres/pgxc_ctlRunning: gtm masterRunning: coordinator master coord1Running: coordinator master coord2Running: datanode master datanode1Running: datanode master datanode2 配置集群信息 分别在数据节点、协调器节点上分别执行以下命令: 注:本节点只执行修改操作即可(alert node),其他节点执行创建命令(create node)。因为本节点已经包含本节点的信息。 create node coord1 with (type=coordinator,host=xl1, port=5432);create node coord2 with (type=coordinator,host=xl2, port=5432);alter node coord1 with (type=coordinator,host=xl1, port=5432);alter node coord2 with (type=coordinator,host=xl2, port=5432);create node datanode1 with (type=datanode, host=xl1,port=15432,primary=true,PREFERRED);create node datanode2 with (type=datanode, host=xl2,port=15432);alter node datanode1 with (type=datanode, host=xl1,port=15432,primary=true,PREFERRED);alter node datanode2 with (type=datanode, host=xl2,port=15432);select pgxc_pool_reload(); 分别登陆数据节点、协调器节点验证 postgres= select from pgxc_node;node_name | node_type | node_port | node_host | nodeis_primary | nodeis_preferred | node_id-----------+-----------+-----------+-----------+----------------+------------------+-------------coord1 | C | 5432 | xl1 | f | f | 1885696643coord2 | C | 5432 | xl2 | f | f | -1197102633datanode2 | D | 15432 | xl2 | f | f | -905831925datanode1 | D | 15432 | xl1 | t | f | 888802358(4 rows) 测试 插入数据 在数据节点1,执行相关操作。 通过协调器端口登录PG [postgres@xl1 ~]$ psql -p 5432psql (PGXL 10r1.1, based on PG 10.6 (Postgres-XL 10r1.1))Type "help" for help.postgres= create database lei;CREATE DATABASEpostgres= \c lei;You are now connected to database "lei" as user "postgres".lei= create table test1(id int,name text);CREATE TABLElei= insert into test1(id,name) select generate_series(1,8),'测试';INSERT 0 8lei= select from test1;id | name----+------1 | 测试2 | 测试5 | 测试6 | 测试8 | 测试3 | 测试4 | 测试7 | 测试(8 rows) 注:默认创建的表为分布式表,也就是每个数据节点值存储表的部分数据。关于表类型具体说明,下面有说明。 通过15432端口登录数据节点,查看数据 有5条数据 [postgres@xl1 ~]$ psql -p 15432psql (PGXL 10r1.1, based on PG 10.6 (Postgres-XL 10r1.1))Type "help" for help.postgres= \c lei;You are now connected to database "lei" as user "postgres".lei= select from test1;id | name----+------1 | 测试2 | 测试5 | 测试6 | 测试8 | 测试(5 rows) 登录到节点2,查看数据 有3条数据 [postgres@xl2 ~]$ psql -p15432psql (PGXL 10r1.1, based on PG 10.6 (Postgres-XL 10r1.1))Type "help" for help.postgres= \c lei;You are now connected to database "lei" as user "postgres".lei= select from test1;id | name----+------3 | 测试4 | 测试7 | 测试(3 rows) 两个节点的数据加起来整个8条,没有问题。 至此Postgre-XL集群搭建完成。 创建数据库、表时可能会出现以下错误: ERROR: Failed to get pooled connections 是因为pg_hba.conf配置不对,所有节点加上host all all 192.168.20.0/0 trust并重启集群即可。 ERROR: No Datanode defined in cluster 首先确认是否创建了数据节点,也就是create node相关的命令。如果创建了则执行select pgxc_pool_reload();使其生效即可。 集群管理与应用 表类型说明 REPLICATION表:各个datanode节点中,表的数据完全相同,也就是说,插入数据时,会分别在每个datanode节点插入相同数据。读数据时,只需要读任意一个datanode节点上的数据。 建表语法: CREATE TABLE repltab (col1 int, col2 int) DISTRIBUTE BY REPLICATION; DISTRIBUTE :会将插入的数据,按照拆分规则,分配到不同的datanode节点中存储,也就是sharding技术。每个datanode节点只保存了部分数据,通过coordinate节点可以查询完整的数据视图。 CREATE TABLE disttab(col1 int, col2 int, col3 text) DISTRIBUTE BY HASH(col1); 模拟数据插入 任意登录一个coordinate节点进行建表操作 [postgres@gtm ~]$ psql -h xl1 -p 5432 -U postgrespostgres= INSERT INTO disttab SELECT generate_series(1,100), generate_series(101, 200), 'foo';INSERT 0 100postgres= INSERT INTO repltab SELECT generate_series(1,100), generate_series(101, 200);INSERT 0 100 查看数据分布结果: DISTRIBUTE表分布结果 postgres= SELECT xc_node_id, count() FROM disttab GROUP BY xc_node_id;xc_node_id | count ------------+-------1148549230 | 42-927910690 | 58(2 rows) REPLICATION表分布结果 postgres= SELECT count() FROM repltab;count -------100(1 row) 查看另一个datanode2中repltab表结果 [postgres@datanode2 pgxl9.5]$ psql -p 15432psql (PGXL 10r1.1, based on PG 10.6 (Postgres-XL 10r1.1))Type "help" for help.postgres= SELECT count() FROM repltab;count -------100(1 row) 结论:REPLICATION表中,datanode1,datanode2中表是全部数据,一模一样。而DISTRIBUTE表,数据散落近乎平均分配到了datanode1,datanode2节点中。 新增数据节点与数据重分布 在线新增节点、并重新分布数据。 新增datanode节点 在gtm集群管理节点上执行pgxc_ctl命令 [postgres@gtm ~]$ pgxc_ctl/bin/bashInstalling pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Installing pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Reading configuration using /home/postgres/pgxc_ctl/pgxc_ctl_bash --home /home/postgres/pgxc_ctl --configuration /home/postgres/pgxc_ctl/pgxc_ctl.confFinished reading configuration. PGXC_CTL START Current directory: /home/postgres/pgxc_ctlPGXC 在服务器xl3上,新增一个master角色的datanode节点,名称是datanode3 端口号暂定5430,pool master暂定6669 ,指定好数据目录位置,从两个节点升级到3个节点,之后要写3个none none应该是datanodeSpecificExtraConfig或者datanodeSpecificExtraPgHba配置PGXC add datanode master datanode3 xl3 15432 6671 /home/postgres/pgxc/nodes/datanode/datanode3 none none none 等待新增完成后,查询集群节点状态: postgres= select from pgxc_node;node_name | node_type | node_port | node_host | nodeis_primary | nodeis_preferred | node_id-----------+-----------+-----------+-----------+----------------+------------------+-------------datanode1 | D | 15432 | xl1 | t | f | 888802358datanode2 | D | 15432 | xl2 | f | f | -905831925datanode3 | D | 15432 | xl3 | f | f | -705831925coord1 | C | 5432 | xl1 | f | f | 1885696643coord2 | C | 5432 | xl2 | f | f | -1197102633(4 rows) 节点新增完毕 数据重新分布 由于新增节点后无法自动完成数据重新分布,需要手动操作。 DISTRIBUTE表分布在了node1,node2节点上,如下: postgres= SELECT xc_node_id, count() FROM disttab GROUP BY xc_node_id;xc_node_id | count ------------+-------1148549230 | 42-927910690 | 58(2 rows) 新增一个节点后,将sharding表数据重新分配到三个节点上,将repl表复制到新节点 重分布sharding表postgres= ALTER TABLE disttab ADD NODE (datanode3);ALTER TABLE 复制数据到新节点postgres= ALTER TABLE repltab ADD NODE (datanode3);ALTER TABLE 查看新的数据分布: postgres= SELECT xc_node_id, count() FROM disttab GROUP BY xc_node_id;xc_node_id | count ------------+--------700122826 | 36-927910690 | 321148549230 | 32(3 rows) 登录datanode3(新增的时候,放在了xl3服务器上,端口15432)节点查看数据: [postgres@gtm ~]$ psql -h xl3 -p 15432 -U postgrespsql (PGXL 10r1.1, based on PG 10.6 (Postgres-XL 10r1.1))Type "help" for help.postgres= select count() from repltab;count -------100(1 row) 很明显,通过 ALTER TABLE tt ADD NODE (dn)命令,可以将DISTRIBUTE表数据重新分布到新节点,重分布过程中会中断所有事务。可以将REPLICATION表数据复制到新节点。 从datanode节点中回收数据 postgres= ALTER TABLE disttab DELETE NODE (datanode3);ALTER TABLEpostgres= ALTER TABLE repltab DELETE NODE (datanode3);ALTER TABLE 删除数据节点 Postgresql-XL并没有检查将被删除的datanode节点是否有replicated/distributed表的数据,为了数据安全,在删除之前需要检查下被删除节点上的数据,有数据的话,要回收掉分配到其他节点,然后才能安全删除。删除数据节点分为四步骤: 1.查询要删除节点dn3的oid postgres= SELECT oid, FROM pgxc_node;oid | node_name | node_type | node_port | node_host | nodeis_primary | nodeis_preferred | node_id -------+-----------+-----------+-----------+-----------+----------------+------------------+-------------11819 | coord1 | C | 5432 | datanode1 | f | f | 188569664316384 | coord2 | C | 5432 | datanode2 | f | f | -119710263316385 | node1 | D | 5433 | datanode1 | f | t | 114854923016386 | node2 | D | 5433 | datanode2 | f | f | -92791069016397 | dn3 | D | 5430 | datanode1 | f | f | -700122826(5 rows) 2.查询dn3对应的oid中是否有数据 testdb= SELECT FROM pgxc_class WHERE nodeoids::integer[] @> ARRAY[16397];pcrelid | pclocatortype | pcattnum | pchashalgorithm | pchashbuckets | nodeoids ---------+---------------+----------+-----------------+---------------+-------------------16388 | H | 1 | 1 | 4096 | 16397 16385 1638616394 | R | 0 | 0 | 0 | 16397 16385 16386(2 rows) 3.有数据的先回收数据 postgres= ALTER TABLE disttab DELETE NODE (dn3);ALTER TABLEpostgres= ALTER TABLE repltab DELETE NODE (dn3);ALTER TABLEpostgres= SELECT FROM pgxc_class WHERE nodeoids::integer[] @> ARRAY[16397];pcrelid | pclocatortype | pcattnum | pchashalgorithm | pchashbuckets | nodeoids ---------+---------------+----------+-----------------+---------------+----------(0 rows) 4.安全删除dn3 PGXC$ remove datanode master dn3 clean 故障节点FAILOVER 1.查看当前集群状态 [postgres@gtm ~]$ psql -h xl1 -p 5432psql (PGXL 10r1.1, based on PG 10.6 (Postgres-XL 10r1.1))Type "help" for help.postgres= SELECT oid, FROM pgxc_node;oid | node_name | node_type | node_port | node_host | nodeis_primary | nodeis_preferred | node_id-------+-----------+-----------+-----------+-----------+----------------+------------------+-------------11739 | coord1 | C | 5432 | xl1 | f | f | 188569664316384 | coord2 | C | 5432 | xl2 | f | f | -119710263316387 | datanode2 | D | 15432 | xl2 | f | f | -90583192516388 | datanode1 | D | 15432 | xl1 | t | t | 888802358(4 rows) 2.模拟datanode1节点故障 直接关闭即可 PGXC stop -m immediate datanode master datanode1Stopping datanode master datanode1.Done. 3.测试查询 只要查询涉及到datanode1上的数据,那么该查询就会报错 postgres= SELECT xc_node_id, count() FROM disttab GROUP BY xc_node_id;WARNING: failed to receive file descriptors for connectionsERROR: Failed to get pooled connectionsHINT: This may happen because one or more nodes are currently unreachable, either because of node or network failure.Its also possible that the target node may have hit the connection limit or the pooler is configured with low connections.Please check if all nodes are running fine and also review max_connections and max_pool_size configuration parameterspostgres= SELECT xc_node_id, FROM disttab WHERE col1 = 3;xc_node_id | col1 | col2 | col3------------+------+------+-------905831925 | 3 | 103 | foo(1 row) 测试发现,查询范围如果涉及到故障的node1节点,会报错,而查询的数据范围不在node1上的话,仍然可以查询。 4.手动切换 要想切换,必须要提前配置slave节点。 PGXC$ failover datanode node1 切换完成后,查询集群 postgres= SELECT oid, FROM pgxc_node;oid | node_name | node_type | node_port | node_host | nodeis_primary | nodeis_preferred | node_id -------+-----------+-----------+-----------+-----------+----------------+------------------+-------------11819 | coord1 | C | 5432 | datanode1 | f | f | 188569664316384 | coord2 | C | 5432 | datanode2 | f | f | -119710263316386 | node2 | D | 15432 | datanode2 | f | f | -92791069016385 | node1 | D | 15433 | datanode2 | f | t | 1148549230(4 rows) 发现datanode1节点的ip和端口都已经替换为配置的slave了。 本篇文章为转载内容。原文链接:https://blog.csdn.net/qianglei6077/article/details/94379331。 该文由互联网用户投稿提供,文中观点代表作者本人意见,并不代表本站的立场。 作为信息平台,本站仅提供文章转载服务,并不拥有其所有权,也不对文章内容的真实性、准确性和合法性承担责任。 如发现本文存在侵权、违法、违规或事实不符的情况,请及时联系我们,我们将第一时间进行核实并删除相应内容。
2023-01-30 11:09:03
94
转载
JQuery插件下载
...菜单设计。该插件充分利用了jQuery强大的交互能力和CSS3出色的动画渲染效果,打造了一种用户点击汉堡包图标时会发生的弹性变形动画。当用户在小屏幕或折叠菜单状态下触碰标志性的小巧汉堡包图标时,图标将通过平滑且富有弹性的水平展开动画展现隐藏的导航菜单内容。这种动画特效的关键特性在于其动态十足的弹性伸展效果,不仅增强了用户体验,还为网页设计增添了视觉亮点与趣味性。此插件的HTML结构简洁明了,易于集成到现有项目中,并且对主流浏览器具有良好的兼容性。只需简单配置,开发者就能轻松实现一个既实用又吸睛的汉堡包导航菜单,使用户的交互体验更加顺畅自然,同时也彰显出网站的专业水准和设计品质。 点我下载 文件大小:38.96 KB 您将下载一个JQuery插件资源包,该资源包内部文件的目录结构如下: 本网站提供JQuery插件下载功能,旨在帮助广大用户在工作学习中提升效率、节约时间。 本网站的下载内容来自于互联网。如您发现任何侵犯您权益的内容,请立即告知我们,我们将迅速响应并删除相关内容。 免责声明:站内所有资源仅供个人学习研究及参考之用,严禁将这些资源应用于商业场景。 若擅自商用导致的一切后果,由使用者承担责任。
2023-10-19 08:36:15
274
本站
JQuery插件下载
...CSS3炫酷堆叠卡片展开和收缩特效”的插件,专为提升网页设计的互动性和视觉吸引力而设计。它利用前端技术的融合,结合jQuery的动态处理能力和CSS3的动画效果,为用户提供了一种独特的用户体验。初始时,多个卡片以紧凑的堆叠形式呈现,营造出一种有序且紧凑的视觉效果。当用户点击顶部的卡片,插件触发一个流畅的动画,使得该卡片平滑地从堆叠中弹出,如同抽屉般打开,展示其内部的内容。这种交互设计不仅增强了用户的参与感,还展示了卡片的独立性和可操作性。动画过程中,其他卡片会随之动态调整位置,形成一种视觉上的层次感。再次点击任何展开的卡片,它们会以相反的动画方式折叠回原位,恢复到最初的堆叠状态。整个过程既美观又直观,适用于各类网站,如新闻列表、产品展示或者信息面板,能有效提升用户界面的趣味性和易用性。通过简单的集成和定制设置,开发者可以快速为自己的网站增添这一高级功能。 点我下载 文件大小:142.03 KB 您将下载一个JQuery插件资源包,该资源包内部文件的目录结构如下: 本网站提供JQuery插件下载功能,旨在帮助广大用户在工作学习中提升效率、节约时间。 本网站的下载内容来自于互联网。如您发现任何侵犯您权益的内容,请立即告知我们,我们将迅速响应并删除相关内容。 免责声明:站内所有资源仅供个人学习研究及参考之用,严禁将这些资源应用于商业场景。 若擅自商用导致的一切后果,由使用者承担责任。
2024-04-14 19:04:53
302
本站
Docker
...入了更精细的资源限制控制以实现多容器环境下的高效运维。 与此同时,Kubernetes作为目前主流的容器编排工具,已广泛集成Docker以实现更大规模的应用部署与管理。近期,CNCF社区围绕Kubernetes和Docker的合作生态展开了诸多讨论,包括如何借助Helm charts简化Docker镜像在Kubernetes集群上的部署流程,以及如何利用Operator模式提升复杂有状态应用的生命周期管理能力。 此外,随着云服务提供商如AWS、Azure等不断加大对容器服务的支持力度,用户可以更加便捷地将基于Docker的本地应用程序无缝迁移至云端运行,同时享受到弹性伸缩、负载均衡等一系列高级特性。最近一篇来自TechCrunch的文章报道了AWS Fargate如何让开发者无需管理底层基础设施即可运行Docker容器,从而专注于业务逻辑开发与迭代。 总之,Docker作为容器化技术的基石,在持续演进中不断推动云计算领域的创新与发展。了解并掌握Docker与相关生态系统的发展动态,将有助于我们紧跟技术潮流,优化应用架构设计,提高软件交付效率与质量。
2023-02-25 10:58:36
491
数据库专家
CSS
...,开发者能够更精细地控制元素级样式及行为,进一步丰富了鼠标移动显示数据的实现方式。例如,可以利用自定义元素结合CSS Variables和JavaScript事件监听机制,实现在悬停时加载异步内容、动态调整布局大小或展示复杂动画序列等功能。 此外,无障碍设计原则也对这类交互效果提出了更高要求。为了确保所有用户(包括视觉障碍者)都能从这种交互中受益,开发者需要遵循WCAG(Web Content Accessibility Guidelines)标准,比如为隐藏的内容提供替代文本描述,或者确保键盘导航也能触发相关显示。 再者,响应式设计趋势下,CSS鼠标悬停效果在移动端的适配也成为热点话题。由于触摸屏设备不存在“hover”状态,开发者需要借助Houdini项目等前沿CSS API,或是采用JavaScript模拟类似功能,确保在不同设备上实现一致且友好的用户体验。 综上所述,CSS样式鼠标移动显示数据不仅是一种增强网站互动性的手段,更在新技术的推动下持续演化,成为前端开发人员不断探索与实践的重要领域。紧跟行业动态和技术发展趋势,深入理解和灵活运用这些技术和方法,将有助于我们构建更加高效、易用且富有趣味性的web界面。
2023-02-06 10:46:02
522
码农
JQuery
...'button').click(function() { $(this).toggleClass('selected'); }); 上面的代码使用jQuery选择器选择所有的button组件并绑定一个点击事件。当用户点击按钮时,toggleClass()函数会切换给定组件的CSS类。这段代码将选中功能和未选中功能交替应用在按钮上。 接下来我们需要修改CSS来增加风格。下面是一个例子CSS代码块,可以为按钮增加选中功能: button { background-color: DDD; border: none; padding: 10px; } .selected { background-color: 333; color: FFF; } 上面的代码块包含两个风格规则。第一个规则设定按钮的背景色,边框和填充。第二个规则用于按钮具有.selected类的情况下设定新的背景和文本颜色。 在两个代码块一起使用时,我们就能够为按钮增加点击选中功能。当用户点击按钮时,按钮将进行选中状态和非选中状态的切换。
2023-05-17 18:43:07
102
电脑达人
JQuery
...btnHide").click(function(){ $("input").hide(); }); $("btnShow").click(function(){ $("input").show(); }); }); 以上代码可以操纵input的展现和隐藏,首先在页面加载后,运行ready()函数可以保证文档对象模型完全载入后再运用jQuery代码。接着,在按钮被点击时,运行相应的隐藏和展现函数:hide()和show()。hide()函数将选中的元素隐藏,show()函数则将选中的元素展现。 除此之外,JQuery还提供了一些其他的方法来操纵input的展现和隐藏。例如toggle()函数可以在输入参数为 "toggle" 时集成show()和hide()函数,当点击一次按钮时,元素会从可见状态切换到隐藏状态,再从隐藏状态切换回可见状态。 $(document).ready(function(){ $("btnToggle").click(function(){ $("input").toggle(); }); }); 以上代码运用toggle()函数动态地将输入框的展现和隐藏进行切换。 总之,JQuery是一款非常方便易用的JavaScript集合,可以轻松地完成input的展现和隐藏。 熟练掌握JQuery的运用方法,可以让前端开发更加高效便捷。
2023-08-16 12:28:27
109
键盘勇士
CSS
...的标准实践,尤其对于表格元素的处理。随着移动设备使用率的持续增长,确保表格大小自适应各种屏幕尺寸的需求愈发迫切。近期,Bootstrap 5框架在其最新版本中强化了对表格样式的响应式支持,通过引入新的CSS类,开发者能够更方便地控制表格在不同视口宽度下的显示效果。 此外,W3C组织也在不断更新和细化CSS Grid布局规范,为复杂数据表的呈现提供了更多可能。Grid布局赋予了设计师和开发者精细调整单元格间距、动态调整列宽等功能,进一步提升了表格内容的可读性和用户体验。 同时,为了满足无障碍浏览需求,WCAG 2.1标准建议表格设计时应合理使用ARIA角色属性,以辅助技术正确识别表格结构及内容。例如,使用role="grid"和role="row"等属性能有效提升屏幕阅读器用户的理解度,让信息传达更为准确。 深入研究CSS Flexbox布局模式也能为表格设计带来新思路。Flexbox允许子元素在父容器内灵活伸缩与对齐,结合CSS变量和媒体查询,可以创建出高度适应性且表现力丰富的自适应表格样式。 总之,在实际项目中,掌握并灵活运用上述技术和规范,不仅能实现表格大小的自适应,更能打造出符合现代网页设计趋势、具有良好交互体验的高质量数据展示界面。
2023-02-13 17:47:53
459
编程狂人
VUE
...mageUrl" @click="toggleFullScreen" /> </div> </template> <script> export default { data() { return { isFullScreen: false, imageUrl: "https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885_960_720.jpg" }; }, methods: { toggleFullScreen() { this.isFullScreen = !this.isFullScreen; if (this.isFullScreen) { document.documentElement.requestFullscreen(); } else { document.exitFullscreen(); } } } }; </script> <style scoped> .fullscreen { 最大宽度: 100%; 最大高度: 100%; } .img-fullscreen { 最大宽度: 100%; 最大高度: 100%; cursor: pointer; } </style> 这里采用了作为图像标签,并设定了最大宽度和最大高度为100%以保证图像能填满显示器而不会被压缩。因为需要达成全屏成效,所以需要增加fullscreen类,并在鼠标点击事件中借助于document.documentElement.requestFullscreen()来达成全屏,并在离开全屏状态时采用document.exitFullscreen()。 上面的代码中采用了一个可用的图像,可以采用自己的图像替换。只需把imageUrl的值更改为你的图像链接即可。此外,当鼠标移上去时,采用了鼠标指针来给用户明确的反馈。
2023-04-27 22:56:48
119
码农
JQuery
...地实现网页元素的动态控制,特别是图片的显示与隐藏功能之后,我们可将视线转向现代Web开发领域的最新进展。随着技术的发展和用户交互需求的增长,前端框架如React、Vue.js等逐渐崭露头角,它们不仅继承了jQuery对DOM操作的便利性,更引入了组件化、虚拟DOM等先进理念,使得构建复杂的交互式应用变得更加高效。 例如,在React中,通过状态(state)管理和JSX语法,开发者可以轻松实现按钮点击事件与图片显隐状态的联动,并且具备更好的性能优化。近期,React 18的发布带来了并发渲染、自动批处理更新等诸多新特性,这些改进无疑将进一步提升用户体验和开发效率。 同时,对于网页交互设计领域,响应式设计和无障碍访问已成为标准实践。根据W3C规范,开发者不仅需关注视觉效果,还要确保所有用户无论使用何种设备或存在何种障碍都能顺畅地与网页进行交互。这要求我们在利用诸如jQuery这类工具的同时,充分考虑其在不同场景下的兼容性和可访问性表现。 综上所述,虽然jQuery在简化JavaScript编程方面做出了巨大贡献,但与时俱进,掌握并运用最新的前端技术和设计理念,是我们构建高质量、高性能、高可用网页应用的关键所在。不断学习和探索新的前端解决方案,可以帮助我们更好地应对瞬息万变的互联网环境,创造出更加丰富多元的用户体验。
2023-11-16 15:49:26
344
算法侠
VUE
...ue.js官方提供的状态管理模式,它采用集中式存储管理应用的所有组件的状态,并以相应的规则保证状态以可预测的方式发生变化。在Vue商米软件中,Vuex通过创建store对象来实现全局状态的统一管理和控制,各个组件可以通过actions、mutations和getters与store进行交互,从而实现了不同组件间的数据共享和通信优化。 Element UI , Element UI是一套基于Vue.js的开源UI组件库,为开发者提供了一系列丰富且易于使用的组件,如按钮、输入框、表格、提示等,方便快速构建美观且响应式的用户界面。在Vue商米软件开发过程中,Element UI被用来搭建和定制符合商家操作习惯的门店管理系统界面,提升用户体验和交互效果。 第三方支付方式 , 第三方支付是指由非银行机构提供的、能够完成多种支付服务的独立系统。在Vue商米软件中,支持的支付宝、微信支付、银联支付等即属于第三方支付方式,商家可以借助这些支付渠道,使顾客在消费时能便捷地完成线上付款流程,同时简化了商家对交易资金的处理工作,提高了交易效率和安全性。
2024-02-11 16:26:36
120
电脑达人
MySQL
...据库管理系统,它通过表格、行和列的形式组织数据,并利用SQL(Structured Query Language)语言进行数据查询、更新等操作。在MySQL中,数据以表的形式存储,各个表之间可以建立关联,形成复杂的数据关系网络,以此实现高效、可靠的数据管理。 SQL语言 , SQL(Structured Query Language)是一种用于管理关系数据库的标准计算机编程语言,包括数据查询、数据插入、更新和删除以及数据库结构管理等功能。在MySQL环境中,用户可以使用SQL语句创建、修改或删除数据库及其中的表结构,同时也可以对数据进行复杂的检索、排序、统计与聚合操作。 mysqldump命令 , mysqldump是MySQL提供的一种用于备份数据库的重要工具,它可以将MySQL数据库中的所有数据和表结构生成为一个可移植的SQL脚本文件。通过执行mysqldump命令,用户能够完整地备份整个数据库或者部分特定的数据库表,便于在数据丢失或需要恢复时快速还原到某个时间点的状态,确保数据的安全性和完整性。例如,在MySQL中,用户可以通过命令行运行mysqldump命令,指定要备份的数据库名和其他相关参数来完成备份任务。
2023-02-05 14:43:17
74
程序媛
MySQL
...e_reports的表格,其中包含用户ID、批准日期、费用金额、费用描述和状态等信息。expense_status可以有三个可能的值:“pending”、“approved”和“rejected”。这个表格将保存所有报销申请的明细。 在微信小程序中,用户可以通过界面递交报销申请,并填写表格。这些数据将被采集并保存到MySQL数据库中。下面是一个示例: INSERT INTO expense_reports (user_id, expense_date, expense_amount, expense_description, expense_status) VALUES (1, '2021-06-01', 33.50, '午餐', 'pending'); 以上代码将在expense_reports表格中插入一条记录,其中包含ID为1的用户的报销申请。此申请包括在2021年6月1日递交、金额为33.50美元的午餐。其状态为“pending”(尚未审核)。 当维护员进入微信小程序时,他们将能够查看所有未处理的申请。他们可以查看数据、批准或驳回申请。此操作表现为“修改”表中的状态列。以下是一个示例: UPDATE expense_reports SET expense_status = 'approved' WHERE id = 1; 以上代码将ID为1的报销申请状态修改为“approved”(已核准)。这代表申请已经通过,可以支付报销金额。 总的来说,微信小程序费用报销审核是一个非常有用的工具,它可以简化报销流程、增加批准速度并提高工作效率。MySQL是实现这个功能的关键。通过建立数据库、创建表格和执行SQL命令,MySQL提供了一种可靠且强大的方式来保存和维护用户递交的申请。
2023-08-09 15:20:34
98
软件工程师
MySQL
...,其中内存管理和有效利用虚拟内存成为解决这一问题的核心策略之一。 2022年,Oracle官方发布的MySQL 8.0版本中,对内存管理机制进行了大幅优化升级,引入了一系列新特性,如改进的查询缓存策略、更精细的内存分配控制以及智能内存压缩技术等,使得MySQL能够更高效地在物理内存与虚拟内存之间进行切换,极大提升了大容量数据处理时的性能表现。 同时,业界专家建议,在系统层面合理配置交换空间大小以支持MySQL虚拟内存需求,并结合监控工具实时分析MySQL及其所在服务器的内存使用状况,以便及时发现并调整潜在的内存瓶颈。例如,通过定期审查query_cache_size等关键参数,根据实际业务负载动态调整其值,避免无谓的内存浪费或过度依赖虚拟内存导致性能下滑。 此外,对于大型分布式数据库系统而言,采用内存计算、混合存储架构以及先进的内存池技术也是提升数据库整体性能的有效手段。比如,阿里云自主研发的PolarDB-X数据库产品,就借助了智能内存管理和分布式缓存技术,实现了对大规模数据访问场景下虚拟内存使用的深度优化,从而确保了服务端的稳定高效运行。 综上所述,掌握MySQL虚拟内存查看方法仅仅是性能调优的第一步,了解并运用最新的内存管理技术、紧跟数据库发展趋势,才能更好地应对大数据时代带来的挑战,确保数据库系统的高性能、高可用与可扩展性。
2023-03-15 10:31:00
95
程序媛
HBase
... 包括列族名称、版本控制、压缩方式等信息。 3. 数据块(Data Block)元数据 包括数据块大小、校验和等信息。 三、如何使用HBase中的元数据? HBase提供了多种方法来操作和查询元数据。以下是几个常见的例子: 1. 获取表元数据 java Configuration conf = new Configuration(); Admin admin = new HBaseAdmin(conf); List tables = admin.listTables(); for (HTableDescriptor table : tables) { System.out.println("Table Name: " + table.getNameAsString()); System.out.println("Row Key Type: " + table.getRowKeySchema().toString()); System.out.println("Column Families: "); for (HColumnDescriptor family : table.getColumnFamilies()) { System.out.println("Family Name: " + family.getNameAsString()); System.out.println("Version Control: " + family.isAutoFlush()); System.out.println("Compression: " + family.getCompressionType()); } } 2. 获取列族元数据 java Configuration conf = new Configuration(); Admin admin = new HBaseAdmin(conf); TableName tableName = TableName.valueOf("my_table"); HTableDescriptor tableDesc = admin.getTableDescriptor(tableName); System.out.println("Family Name: " + tableDesc.getValue(HConstants.TABLE_NAME_STR_KEY)); System.out.println("Version Control: " + tableDesc.getValue(HConstants.VERSIONS_KEY)); System.out.println("Compression: " + tableDesc.getValue(HConstants.COMPRESSION_KEY)); 四、如何管理HBase中的元数据? 管理HBase中的元数据主要涉及到创建、修改和删除表和列族。以下是几个常见的例子: 1. 创建表 java Configuration conf = new Configuration(); Admin admin = new HBaseAdmin(conf); admin.createTable(new HTableDescriptor(TableName.valueOf("my_table")) .addFamily(new HColumnDescriptor("cf1").setVersioningEnabled(true)) .addFamily(new HColumnDescriptor("cf2").setInMemory(true))); 2. 修改表 java Configuration conf = new Configuration(); Admin admin = new HBaseAdmin(conf); admin.modifyTable(TableName.valueOf("my_table"), new HTableDescriptor(TableName.valueOf("my_table")) .removeFamily(Bytes.toBytes("cf1")) .addFamily(new HColumnDescriptor("cf3"))); 3. 删除表 java Configuration conf = new Configuration(); Admin admin = new HBaseAdmin(conf); admin.disableTable(TableName.valueOf("my_table")); admin.deleteTable(TableName.valueOf("my_table")); 五、结论 HBase中的元数据对于管理和优化数据非常重要。当你真正摸清楚怎么在HBase中运用和管理元数据这个窍门后,那就像是解锁了一个新技能,能够让你更充分地榨取HBase的精华,从而让我们的工作效率噌噌上涨,数据处理能力也如虎添翼。同时,咱也要明白一点,管理维护元数据这事儿也是要花费一定精力和资源的。所以呢,咱们得机智地设计和运用元数据,这样才能让它发挥出最大的效果,达到事半功倍的理想状态。
2023-11-14 11:58:02
434
风中飘零-t
Docker
...业界也在积极研究和发展开源工具如Fluentd、Prometheus以及Grafana等,这些工具为Docker日志提供了强大的采集、过滤、分析能力,并能与各类云存储服务无缝对接,实现日志数据长期保存和合规性要求。 与此同时,容器可观测性领域也有了新的突破。OpenTelemetry项目提供了一套跨平台的标准和工具集,可统一收集包括容器日志在内的各项指标、跟踪和日志信息,大大提升了分布式系统中问题定位的效率和准确性。 在实际应用中,为了更好地满足微服务架构下容器日志的安全性和一致性需求,越来越多的企业开始采用服务网格技术如Istio来增强日志治理能力,通过统一的日志策略管理和审计,确保了容器环境下的日志安全性与合规性。 因此,在掌握Docker日志基本操作的基础上,关注日志领域的最新技术和解决方案,对于提升云原生环境下的运维效率与保障系统稳定性具有重要意义。不断学习和了解这些先进的日志处理手段,将有助于我们在日常工作中应对复杂场景,有效利用日志信息驱动系统的持续优化和改进。
2023-09-05 21:33:01
333
代码侠
JQuery
...项,对应的class状态就会改变。 六、动态与延迟 5. 动态与延时应用 有时候,你可能希望在特定条件满足后再改变class,这时可以利用.delay()配合.queue(): javascript $("delayedChange").click(function() { $(this).next(".delayedElement").delay(2000).queue(function() { $(this).toggleClass("animated"); }); }); 这样,点击按钮后,.delayedElement将在2秒后开始动画效果,增加页面的视觉冲击力。 七、总结与实践 在实际项目中,正确使用jQuery操作class是提高代码效率和用户体验的关键。掌握并灵活运用.addClass(), .removeClass(), .toggleClass()这些小技巧,就能让你的网页瞬间灵动起来,充满互动和响应性,变得活灵活现。记住了啊,代码可不只是逻辑的代名词,更是设计思路的一种延伸和跃动。你每次切换class的操作,都可能是在对用户体验进行一次悄无声息的微调优化,就像给用户的小惊喜一样。 通过这次探索,希望你对jQuery处理class名有了更深的理解,并能在你的下一个项目中游刃有余地运用这一强大工具。记住,代码的世界充满了无限可能,尽情挥洒你的创意吧!
2024-02-29 11:24:53
340
烟雨江南-t
转载文章
...pse插件是一个用于折叠和展开内容区域的功能组件,通过添加或移除指定的CSS类,可以实现元素的高度从隐藏到显示或者从显示到隐藏的平滑过渡动画效果。 jQuery UI Accordion组件 , jQuery UI是一个基于jQuery库的用户界面交互组件集合,它提供了丰富的图形用户界面元素以及各种可定制的交互效果。Accordion组件是其中一种,常用于创建折叠菜单或手风琴效果,允许用户点击标题来展开或收起相应的面板内容,一次只能展示一个面板的内容,以节省空间并提升用户体验。 getComputedStyle() 方法 , getComputedStyle() 是JavaScript中的一个内置方法,主要用于获取元素在计算样式后的最终呈现效果,即浏览器解析CSS规则并应用所有层叠样式后的实际样式信息。在本文的上下文中,该方法被用来获取折叠菜单容器元素的实际高度,以便在无插件情况下实现平滑的动画过渡效果。 CSS transition , CSS transition属性允许开发者定义当元素的一个或多个CSS属性值发生改变时,其变化过程应该是平滑过渡还是立即改变。在文章中,transition属性与height和max-height属性结合使用,用于控制移动端导航栏折叠菜单展开和收起的动画速度和效果,使得状态切换更加流畅自然。
2023-04-03 15:59:22
139
转载
CSS
...会遇到需要对HTML表格进行样式定制的情况,例如本文要探讨的主题——如何通过CSS来去掉element table表头(thead)中的border。来吧,伙伴们,咱们一起捣鼓这个乍一看简简单单,实则内含无数惊喜的问题。我打算带着大家伙儿,手把手,通过实实在在的代码实例,一步步把这问题的庐山真面目给揭开,怎么样?够生活化了吧,可没一点AI那冷冰冰的味道了! 1. 理解问题背景 首先,我们需要理解HTML中的 元素结构以及相关CSS属性。一个典型的表格呢,通常是由几个关键部分拼接起来的,就好比是搭建积木一样,需要用到 2. 直接针对表头设置CSS样式 、 、 还有 这些小部件。其中,这个 就相当于咱们在搭积木时用来稳固框架的部分,它专门负责给表格定义那个最上方的表头部分,明白吧?就是放标题那些格子的地方哈。默认情况下,所有单元格之间都会有边框线(border),包括表头部分。然而,在实际做项目的时候,我们可能想要耍个小花招,只把表头部分的边框去掉,就是为了实现某种特别的设计效果。 示例一:html Header 1 Header 2 在这个例子中,我们直接针对thead th设置了border: none,这样可以快速有效地去掉表头的边框。 3. 细化处理,精准定位表头间的边框 但有时候,我们可能只想移除表头内部单元格之间的边框,而非整个表头的边框。这时候,我们可以利用CSS选择器以及border-spacing和border-style属性进行更为细致的控制。 示例二: html Header 1 Header 2 在此示例中,我们精细地控制了表头各单元格间的边框,从而实现了只去除表头内部边框的效果。 4. 思考与讨论 在实际开发过程中,解决这类问题的关键在于对CSS选择器和边框属性的灵活运用。有时候啊,你可能会碰上一些更棘手的需求,就像是这样:根据屏幕大小的变化,灵活决定边框到底显示还是隐藏。这就像是在给不同身材的人挑选衣服一样,要懂得灵活变通,该显瘦的地方显瘦,该隐藏的地方隐藏,你说是不是这个理儿?在这种情况下,你可以尝试耍个小聪明,利用CSS媒体查询这个神器来进一步微调你的样式规则。这样一来,甭管在什么场景下,都能妥妥地呈现出最理想的视觉效果。 总的来说,使用CSS定制element table表头的border样式不仅能够满足设计需求,更能锻炼我们对CSS技术的掌握与应用能力。每一次成功地把那些不必要的边框“踢”掉,都是我们朝着“代码之美”的理想境界欢快地蹦跶一小步。在这个过程中,不断去摸索、动手实践然后总结经验教训,这绝对能让我们的前端技术修炼得更加出神入化,就像炉火熬炼铁块一样,越烧越纯熟,越来越精进。
2023-07-24 09:38:17
533
蝶舞花间_
Struts2
...SP页面中,我们可以利用标签遍历上述的userList集合: jsp <%@ taglib prefix="s" uri="/struts-tags"%> ... ID Name Email 上述代码段中,value="userList"指定了要遍历的集合对象,而status="rowstatus"则定义了一个名为rowstatus的迭代状态变量,可以用来获取当前迭代的索引、是否为奇数行/偶数行等信息。 5. 迭代状态变量的应用 在实际应用中,迭代状态变量非常有用,例如,我们可以根据行号决定表格行的颜色: jsp oddRowevenRow"> 在这个示例中,我们通过rowstatus.odd检查当前行是否为奇数行,然后动态设置CSS样式。 6. 结语标签在处理集合数据时的灵活性和便捷性可见一斑。它不仅能让我们超级高效地跑遍所有数据,还能加上迭代状态变量这个小玩意儿,让前端展示效果噌噌噌地往上蹿,变得更带劲儿。在实际做项目开发这事儿的时候,要是能把这个特性玩得贼溜,还能灵活运用,那简直就像给咱们编写Web页面插上了一对翅膀,让代码读起来更明白易懂,维护起来也更加轻松省力。这就是编程最让人着迷的地方啦——就像一场永不停歇的探险,你得不断尝试、动手实践,让每一个细微的技术环节都化身为打造完美产品的强大力量。
2023-01-03 18:14:02
44
追梦人
MySQL
...MySQL)是一种以表格形式存储数据,并通过预定义的关系来组织和管理这些数据的软件系统。在这样的系统中,数据以行和列的形式存在,各表之间可以通过主键与外键关联形成复杂的数据关系网络,便于用户进行高效查询、更新和管理。 索引 , 在MySQL等数据库系统中,索引是一种特殊的数据结构,用于提高数据检索速度。它基于表中的一列或多列创建,为表中的数据提供了一种快速访问路径。当执行查询时,数据库系统可以利用索引来迅速定位到符合条件的数据行,从而大大提升查询效率,减少整体响应时间。 存储引擎 , MySQL支持多种存储引擎,它们是处理和存储数据的实际组件。不同存储引擎具有不同的特性,适用于不同的场景需求。例如,InnoDB存储引擎提供了事务处理、行级锁定以及外键约束等功能,适合处理并发写入较多且需要确保数据完整性的场景;而MyISAM存储引擎则更侧重于读取密集型应用,不支持事务但索引文件与数据文件分开存储,使得其在某些特定场景下有更快的查询速度。 数据库备份与恢复 , 这是MySQL数据库管理中的重要维护操作。数据库备份是指定期或按需将数据库中的所有数据复制并保存到其他位置的过程,目的是防止因硬件故障、系统崩溃、人为误操作等原因导致的数据丢失。而数据库恢复则是指在发生数据丢失或损坏后,使用之前备份的数据重新构建数据库,使其恢复到备份时刻的状态,保证业务连续性和数据完整性。
2023-09-03 11:49:35
62
键盘勇士
站内搜索
用于搜索本网站内部文章,支持栏目切换。
知识学习
实践的时候请根据实际情况谨慎操作。
随机学习一条linux命令:
sed 's/old/new/g' file.txt
- 替换文件中的文本。
推荐内容
推荐本栏目内的其它文章,看看还有哪些文章让你感兴趣。
2023-04-28
2023-08-09
2023-06-18
2023-04-14
2023-02-18
2023-04-17
2024-01-11
2023-10-03
2023-09-09
2023-06-13
2023-08-07
2023-03-11
历史内容
快速导航到对应月份的历史文章列表。
随便看看
拉到页底了吧,随便看看还有哪些文章你可能感兴趣。
时光飞逝
"流光容易把人抛,红了樱桃,绿了芭蕉。"