hector-v2-client-doc.pdf read notes
hector-v2-client-doc.pdf 讀書筆記
LoadBalancingPolicy
Hector uses the slf4j logging API with the Log4J bridge to provide runtime logging.
Hector測試相關的類:
EmbeddedServerHelper
BaseEmbeddedServerTest
建立Keyspace:
Cluster cluster = HFactory.getCreateCluster("TestCluster",
new CassandraHostConfigurator("localhost:9160"));
Keyspace keyspace = HFactory.createKeyspace("Keyspace1",cluster);
StringSerializer
OrderPreservingPartitioner
IndexedSlicesQuery
HFactory.createIndexedSlicesQuery(keyspace, se, se,, LongSerializer.get());
indexedSlicesQuery.addEqualsExpression("birthyear", 1975L);
indexedSlicesQuery.setColumnNames("birthdate","firstname");
indexedSlicesQuery.setColumnFamily("Users");
indexedSlicesQuery.setStartKey("");
QueryResult
indexedSlicesQuery.execute();
IndexedSlicesQuery can also have expressions applied on other columns in conjunction with
the addEqualsExpression. There are two important points to note in using additional index
expressions:
● At least one equals expression against an indexed column must always be present via
addEqualsExpression
● The columns for additional clauses do not have have to be configured as indexed for the
ColumnFamily
Maven Repository for Dependencies
hector to store supercolumn:
Mutator
HFactory.createMutator(keyspace, stringSerializer);
mutator.insert("billing", "Super1", HFactory.createSuperColumn("jsmith",
Arrays.asList(HFactory.createStringColumn("first", "John")),
stringSerializer, stringSerializer, stringSerializer));
SuperColumnQuery
HFactory.createSuperColumnQuery(keyspace, stringSerializer,
stringSerializer, stringSerializer, stringSerializer);
superColumnQuery.setColumnFamily("Super1")
.setKey("billing").setSuperName("jsmith");
Result
To create your own approach to fail-over, for example to try the next three hosts pausing 200
milliseconds between each, you would construct the following FailoverPolicy:
FailoverPolicy failoverPolicy = new FailoverPolicy(3,200);
attributes exposed via JMX:
status and counters on the connections and pools
aggreate performance statics
If you do not want the overhead of having Pef4j running, it is possible to disable the statistics
gathering entirely by setting the system property com.prettyprint.cassandra.load_hector_log4j
to false at system startup and setting the level in your logging configuretion to WARN for the
appender named: me.prettyprint.hector.TimingLogger
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23937368/viewspace-1050524/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Mongodb NotesMongoDB
- Typora Notes
- ACM notesACM
- WireGuard Use Notes
- c++stl notesC++
- Linux配置notesLinux
- BlockRecover Restrictions and Usage NotesBloCREST
- Make notes for disaster recoveryAST
- Thinking in java notesThinkingJava
- direct path read/read temp等待事件事件
- Index of system requirements for Notes, Domino, Domino Administrator, Domino Designer & Notes TravelIndexUIREM
- Notes與Office的介面
- Oracle Training NotesOracleAI
- Recommendation Systems Basic Notes
- Reinforcement Learning Basic Notes
- Redis Reading NotesRedis
- Based UE_Project NotesProject
- read repeatable&read committed 區別MIT
- READ ME
- 等待事件db file sequential read、db file scattered read和direct read的區別事件
- R language notes | pipes: chainingAI
- D3 JS study notesJS
- Notes about Vue Style GuideVueGUIIDE
- Android Weekly Notes Issue #255Android
- Notes for building gimp-printUI
- Notes與Office的介面 (轉)
- Notes of Oracle 11.2 Dataguard setupOracle
- Execl匯入notes JAVA代理Java
- read name 和 read 在 Bash 中的區別
- HDFS read and write
- read committed 和 repeatable read 上鎖的區別MIT
- Leetcode-Read N Characters Given Read4LeetCode
- 解決db file sequential read與db file scattered read
- 當從READ ONLY到READ WRITE都做什麼了
- SAP SD Reference Guide: SAP NotesGUIIDE
- some notes about distributed workflows in GitGit
- Overview of Parameter Reference Notes (Doc ID 68462.1)View
- Lotus notes問題與處理