crontab定时任务维护
根据关键词注释掉crontab中定时任务,取消任务的自动触发执行 crontab -l >/home/t.txt && sed -i '/Cassandra.sh/{s/^/#/g}' /home/t.txt && crontab /home/t.txt 避免以#开头的注释行累加,清除注释行 crontab -l >/home/t.txt && sed -i -e '/Cassandra.sh/d' -e '/^#/d' /home/t.txt && crontab /home/t.txt[@more@]
关于Cassandra Schema
Schema changes should not be seen as something that can be done regularly. It should not be done programmatically. There should always be some operator looking at the cluster verifying that all nodes are reachable and ring is ok. And then issue schema changes one at a time using the cli. [@more@]
Zack Arias One light workshop(单灯摄影艺术)
http://v.youku.com/v_show/id_XMTU4MzMzNDYw.htmlhttp://v.youku.com/v_show/id_XMTU4MjYzMjY4.html [@more@]
在脚本中调用cassandra客户端命令
不仅可以在-f指定的文件中创建keyspaces、CF,还可以直接封装一些客户端命令,便于系统维护和结构的检查。/cassandra/bin/cassandra-cli -h 192.168.86.31 -p 9160 -u username -pw 'password' -f showchema.txt-- showchema.txtshow keyspaces;[@more@]
商业计划书书写规范
1.计划摘要2.产品(服务)介绍(1).顾客希望企业的产品能够解决什么问题,顾客从企业的产品中获得什么好处?(2).企业的产品与竞争对手的产品相比有哪些优缺点,顾客为什么会选择本企业的产品?(3).企业为自己的产品采取了何种保护措施,企业拥有哪些专利、许可证,或与申请专利的厂家达成了哪些协议?(4).为什么企业的产品定价可以使企业产生足够的利润,为什么用户会大批量的购买企业的产品?(5).企业采用何种方式去改进产品的质量、性能,企业对发展新产品有哪些计划等等。3.人员及组织结构4.市场预测5.营销策略营销营销的主要因素:(1).消
好书推荐
《写给大家的西方美术史》[@more@]
注意后台看似不相关脚本的干扰
注意后台看似不相关脚本的干扰: 在做数据库备份恢复演练时,发现每次使用备份的数据文件进行恢复后系统无法查询数据, 恢复脚本的逻辑是: 首先,检查当前数据库进程是否存在,若存在,先停,在继续。 其次,将备份的数据文件恢复到目标路径 第三,启动数据库,加载数据 整个过程完后,发现无法读取数据,偶然的想法把最后一步的启动改为重启,区别是重启会检查数据库进程,存在则杀掉进程再启动。 居然这种情况恢复后一切正常,能够正常的对数据进行操作。 仔细比较数据库启动和重启的差别,确认唯一的不同就是上面的启动前干掉已有的
最近正在阅读和打算阅读的几本书
中国史纲 中国简史 一生要读的帝王史 世界通史 追逐日光 乔布斯传 摄影圣经 纽约摄影教材 python基础教程 心理学著名现象全纪录 经典管理学定理100 [@more@]
python笔记3--进阶资源
Python标准库是一个丰富的库,在大多数时候,你可以在这个库中找到你所需的东西。这被称为Python的“功能齐全”理念。我强烈建议你在开始开发大型Python程序之前浏览一下Python标准文档。Python.org——Python编程语言的官方主页。你可以在上面找到Python语言和解释器的最新版本。另外还有各种邮件列表活跃地讨论Python的各方面内容。comp.lang.python是讨论Python语言的世界性新闻组。你可以把你的疑惑和询问贴在这个新闻组上。可以使用Google群在线访问这个新闻组,或加入作为新闻组镜像的邮件列表。《Python实用大全》是一个极有价值的
python笔记2
三、python脚本示例---------------------------------------------------DEMO ONE:创建一个备份重要文件的程序:1.python 如何调用系统命令,并分析输出zip_command = "zip -qr '%s' %s" % (target, ' '.join(source))os.system(zip_command) 示例:import ossource_dir = ['/home/tk']target_dir= '/home/wangmin'if not os.path.exists(target_dir): os.mkdir(target_dir) print 'create dir succefully!'gzip_command = "zip -qr '%s' %s" % (target_dir, ' '.join(source_dir))if os.system(gzip_comman
python笔记1
一、帮助系统:help(command|module) eg. help(list)二、python基础python数据结构:列表 list=['itemA','itemB','itemC']元组 array=('itemA','itemB',list)字典 dict={'itemA':'valueA','itemB':'valueB','itemC':'valueC'}list的使用:---------------------------------------------------arraylist = ['panda','dog','cat','monkey','mouse']print "the array's length is",len(arraylist)print "n"print "the first item is ",arraylist[0]arraylist.append('snake')print "nafter add an item
simpleDB特点
个人感觉simpleDB是关系型数据库与NOSQL折中的一个产品,对其具有的一些特点罗列如下:无模式: 结构扩展灵活,后期开发维护简单多值属性: 一个键,多个属性值对,属性可重复最终一致性: 读写总是向用户返回成功,后台做多数据中心、多节点的一致性保证; 主从结构,由从节点获取的数据可能是已经过期的数据。多数据中心扩展: 可将多个域(类似于关系表)分布到不同的数据中心,提升数据的可靠性及用户体验统一使用UTF8编码: 对于非字符串数据类型存储前需要在应用中进行编码转换不支持事务: 需要在应用中实现对数据的约束不支持连接(j
declare in shell
declare peset选项 -r 只读 1 declare -r var1 (declare -r var1与readonly var1是完全一样的) 这和C语言中的const关键字一样, 都用来指定变量为只读. 如果你尝试修改一个只读变量的值, 那么会产生错误信息. -i 整型 1 declare -i number 2 # 脚本将会把变量"number"按照整型进行处理. 3 4 number=3 5 echo "Number = $number" # Number = 3 6 7 number=three 8 echo "Number = $number" # Number = 0 9 #
深入理解Cassandra内部结构
深入理解Cassandra内部结构[@more@]
Cache coherence
Cache coherenceFrom Wikipedia, the free encyclopediaIn computing, cache coherence (also cache coherency) refers to the consistency of data stored in local caches of a shared resource.Multiple Caches of Shared ResourceWhen clients in a system maintain caches of a common memory resource, problems may arise with inconsistent data. This is particularly true of CPUs in a multiprocessing system. Referring to the "Multiple Caches of Shared Resource" figure, if the top client has a copy of a m
Shell
shell脚本调试技术shell脚本报错:"[: =: unary operator expected"shell 判断文件或路径是否存在 shell中调用shell的三种方式&并行shell shell文汇[@more@]
shell中调用shell的三种方式&并行shell
一、shell中调用shell的三种方式:方法一:使用source#!/bin/bashsource invoked.sh方法二:使用.#!/bin/bash. invoked.sh 方法三:使用sh#!/bin/bashsh invoked.sh二、使用pssh等并行shell进行分布式系统维护:# ./pssh -h <host_list> -l <user> <commond|shell_script|..>eg: ./pssh -h ../multi_dc_1_12.host -l root /home/icefeish/stop_cassandra.sh #cat multi_dc_1_12.host--192.168.1.1192.168.1.2192.168.1.3192.168.1.4[@more@]
shell脚本报错:"[: =: unary operator expected"
shell脚本报错:"[: =: unary operator expected"if [ $RETURN == "OK" ]; then echo "OK"fi此种情况若RETURN为空,则判定为 [ = "OK"],[与"OK"匹配缺少'['。[@more@]
shell 判断文件或路径是否存在
#!/bin/sh filePath="/Users/wade/" fileName="/Users/wade/Desktop/test.pdf" #这里的-x 参数判断$myPath是否存在并且是否具有可执行权限 if [ ! -x "$filePath"]; then mkdir "$filePath" fi #这里的-d 参数判断$myPath是否存在 if [ ! -d "$filePath"]; then mkdir "$filePath" fi #这里的-f参数判断$myFile是否存在 if [ ! -f "$fileName" ]; then touch "$fileName" fi #其他参数还有-n,-n是判断一个变量
高写入负载情况cassandra宕机故障解决
cassandra问题:下面程序并发300线程向cassandra中灌数据:python cassandra_stress.py -p 300 -n 1000000数据估算:三个节点,每个节点上期一个进程,每个进程300个并发线程向cassandra中写数据,每个key的大小为1.916KB,Write Latency: 0.014 ms.单个节点的数据写入速率:-->300*(1*1000/0.014)*1.916KB=39.16GB/s结果数据搜集,验证:当前的commitlog文件大小:/cassandra/data # du -sh *34G commitlog53G data20K saved_caches统计commitlog文件数:>cassandra/data/commitlog # ls -al |grep .log |grep -v .h