07 2016 档案
摘要:public static void main(String[] args) { byte test = -128; System.out.println(test==(byte)0x80); }
阅读全文
摘要:byte[] b = {1,2,20,108}; String stmp = java.lang.Integer.toHexString(b[n] & 0XFF) 在32位的电脑中数字都是以32格式存放的,如果是一个byte(8位)类型的数字,他的高24位里面都是随机数字,低8位 才是实际的数据。j
阅读全文
摘要:http://redis.readthedocs.io/en/2.4/set.html
阅读全文
摘要:1. 背景介绍 Cassandra 使用分布式哈希表(DHT)来确定存储某一个数据对象的节点。在 DHT 里面,负责存储的节点以及数据对象都被分配一个 token。token 只能在一定的范围内取值,比如说如果用 MD5 作为 token 的话,那么取值范围就是 [0, 2^128-1]。存储节点以
阅读全文
摘要:数据包格式 起始位 包长度 协议号 信息内容 信息序列号 错误校验 停止位 7878 22 22 100708110a15c6034180e00ce546500a146a01cc0058210066cb000501 0009 8196 0D0A 长度=协议号+信息内容+信息序列号+错误校验, 共(5
阅读全文
摘要:Date date =new Date(); date.getYear();方法已过期 从 JDK 1.1 开始,由 Calendar.get(Calendar.YEAR) - 1900 取代。 Calendar c = Calendar.getInstance();c.get(Calendar.Y
阅读全文
摘要:这种错误是由于查询Redis时采用的查询方法与对应的Key的数据类型不匹配引起的 Redis的五种数据类型: 字符串(Strings) 列表(Lists) 集合(Sets) 哈希(Hashes) 有序集合(Sorted Sets)
阅读全文
摘要:config.setMaxWait(MAX_WAIT); jedisPool = new JedisPool(config, ADDR, PORT, TIMEOUT, AUTH); 这俩行报错:The type org.apache.commons.pool.impl.GenericObjectPo
阅读全文
摘要:#tar -xf Python-2.7.9.tar.xz #cd Python-2.7.9 #mkdir /usr/local/python27 #./configure --prefix=/usr/local/python27 #make #make install 如果此时出现找不到所依赖的模块
阅读全文
摘要:#cd /mnt/downloads/ #wget --no-cookie --header "Cookie: s_cc=true; oraclelicense=accept-securebackup-cookie; s_nr=1407131063040; gpw_e24=http://www.or
阅读全文
摘要:linux 的 scp 命令 可以 在 linux 之间复制 文件 和 目录; scp 命令 scp 可以在 2个 linux 主机间复制文件; 命令基本格式: scp [可选参数] file_source file_target 从 本地 复制到 远程 * 复制文件: * 命令格式: scp lo
阅读全文
摘要:nohup java -jar xx.jar >/dev/null &
阅读全文
摘要:edit your cassandra.properties file and add this:cassandra.limit-for-partition-key-select=NUMBER Where NUMBER is the max result that you want! Not ele
阅读全文
摘要:Take it easy, update the cassandra.yaml batch_size_warn_threshold_in_kb: 50 it will be OK! https://github.com/pyr/cyanite/issues/122
阅读全文
摘要:package csdn; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; /** * @author nineday */ public class Test { public
阅读全文
摘要:清空表里的所有数据 Truncate falcon_gps; TRUNCATE accepts a single argument for the column family name, and permanently removes all data from said column family
阅读全文
摘要:确实是打断睡眠状态了,在使用线程池中,等线程启动完毕,开始运行,却执行了exe.shutdown()方法,该方法使得主线程强行打断子线程的sleep状态,因此抛出此异常,根据实际情况,去掉了shutdown()这个不合理的方法,解决该异常。
阅读全文
摘要:Use the nodetool tool that under the cassandra/bin directory nodetool status There are two nodes have been off line. nodetool removenode 199553f1-f310
阅读全文
摘要:1.Configure the file cassandra.yaml set authenticator: PasswordAuthenticator the default value of authenticator is AllowAllAuthenticator 2.Loggin by t
阅读全文
摘要:在配置JMX远程访问的时候,设置jmxremote.password文件权限,修改该文件时添加写权限,chmod +w jmxremote.password ,放开角色信息那俩行的注释,保存,再使用chmod 0400 jmxremote.password 这样就是它正确的权限设置 jmxremot
阅读全文
摘要:错误: 代理抛出异常 : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: 你的主机名: 你的主机名 在linux部署下不能启动了: 解决办法: vi /etc/syscon
阅读全文
摘要:http://cassandra.apache.org/doc/cql/CQL.html
阅读全文
摘要:Gossip算法又被称为反熵(Anti-Entropy),熵是物理学上的一个概念,代表杂乱无章,而反熵就是在杂乱无章中寻求一致,这充分说明了Gossip的特点: 在一个有界网络中,每个节点都随机地与其他节点通信,经过一番杂乱无章的通信,最终所有节点的状态都会达成一致。 每个节点可能知道所有其他节点,
阅读全文
摘要:Cassandra通过写一条“tombstone”来标记一个数据被删除了。被标记的数据默认要10天(配置文件中的gc_grace_seconds)后且被compaction或cleanup执行到对应的SSTable时才会被真正从磁盘删除,因为如果当时这个delete操作只在3个节点中的2个执行成功,
阅读全文
摘要:1、逆熵 Cassandra数据库在分布式的架构上借鉴了Amazon的Dynamo,而在数据的存储模型上参考了Google的Bigtable,因而在数据一致性方面与Dynamo和Bigtable有着很深的联系,逆熵机制就是这种联系的一种体现。 逆熵与gossip协议一样也是基于传染病理论的算法,它主
阅读全文
摘要:类似于如下情况: Traceback (most recent call last): File "python_del_cassandra.py", line 21, in <module> d_time = K_devdata.execute(" select dtime from device
阅读全文
摘要:ERROR 04:18:00 Configuration exception merging remote schemaorg.apache.cassandra.exceptions.ConfigurationException: Column family ID mismatch (found 2
阅读全文
摘要:io.netty.handler.codec.ByteToMessageDecoder ChannelInboundHandlerAdapter which decodes bytes in a stream-like fashion from one ByteBuf to an other Mes
阅读全文
摘要:1Byte = 8Bit 一字节等于8位 1KB=1024Byte= 2^10 Byte;
阅读全文
摘要:Executors private ExecutorService proThreadPool = Executors.newFixedThreadPool(50); 线程池,就是在调用线程的时候初使化一定数量的线程,有线程过来的时候,先检测初使化的线程还有空的没有,没有就再看当前运行中的线程数是不
阅读全文
摘要:一:newCachedThreadPool (1)缓存型池子,先查看池中有没有以前建立的线程,如果有,就reuse,如果没有,就建立一个新的线程加入池中; (2)缓存型池子,通常用于执行一些生存周期很短的异步型任务;因此一些面向连接的daemon型server中用得不多; (3)能reuse的线程,
阅读全文
摘要:java.util.concurrent.Executors Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory, and Callable classe
阅读全文
摘要:void java.util.concurrent.Executor.execute(Runnable command) execute void execute(Runnable command) Executes the given command at some time in the fut
阅读全文
摘要:java.util.concurrent.ExecutorService An Executor that provides methods to manage termination and methods that can produce a Future for tracking progre
阅读全文
摘要:io.netty.channel.group.ChannelGroup A thread-safe Set that contains open Channels and provides various bulk operations on them. Using ChannelGroup, yo
阅读全文
摘要:netstat -an |find /c ":6970"
阅读全文