cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Cassandra Wiki] Update of "FAQ_JP" by terurou
Date Mon, 30 Aug 2010 05:53:52 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Cassandra Wiki" for change notification.

The "FAQ_JP" page has been changed by terurou.
The comment on this change is: 追加された未翻訳テキストを転載.


   * [[#range_ghosts|レンジスキャンで削除したはずのキーが残っているのは何でですか?]]
   * [[#change_replication|動いているCassandra上でReplicationFactorを変更することは出来ますか?]]
   * [[#large_file_and_blob_storage|Cassandraで巨大なファイルやBLOBを保存できますか?]]
+  * [[#jmx_localhost_refused|Nodetool says "Connection refused to host:" for any
remote host. What gives?]]
+  * [[#iter_world|How can I iterate over all the rows in a ColumnFamily?]]
+  * [[#no_keyspaces|Why were none of the keyspaces described in storage-conf.xml loaded?]]
+  * [[#gui|Is there a GUI admin tool for Cassandra?]]
+  * [[#a_long_is_exactly_8_bytes|Insert operation throws InvalidRequestException with message
"A long is exactly 8 bytes"]]
+  * [[#clustername_mismatch|Cassandra says "ClusterName mismatch: oldClusterName != newClusterName"
and refuses to start]]
+  * [[#batch_mutate_atomic|Are batch_mutate operations atomic?]]
+  * [[#hadoop_support|Is Hadoop (i.e. Map/Reduce, Pig, Hive) supported?]]
+  * [[#multi_tenant|Can a Cassandra cluster be multi-tenant?]]
+  * [[#using_cassandra|Who is using Cassandra and for what?]]
@@ -253, +263 @@

   *  [[CassandraLimitations|Cassandraの制限]]で詳細を確認してください.
+ <<Anchor(jmx_localhost_refused)>>
+ == Nodetool says "Connection refused to host:" for any remote host. What gives?
+ Nodetool relies on JMX, which in turn relies on RMI, which in turn sets up it's own listeners
and connectors as needed on each end of the exchange. Normally all of this happens behind
the scenes transparently, but incorrect name resolution for either the host connecting, or
the one being connected to, can result in crossed wires and confusing exceptions.
+ If you are not using DNS, then make sure that your `/etc/hosts` files are accurate on both
ends. If that fails try passing the `-Djava.rmi.server.hostname=$IP` option to the JVM at
startup (where `$IP` is the address of the interface you can reach from the remote machine).
+ <<Anchor(iter_world)>>
+ == How can I iterate over all the rows in a ColumnFamily? ==
+ Simple but slow: Use get_range_slices, start with the empty string, and after each call
use the last key read as the start key in the next iteration.
+ Better: use HadoopSupport.
+ <<Anchor(no_keyspaces)>>
+ == Why were none of the keyspaces described in storage-conf.xml loaded? ==
+ Prior to 0.7, cassandra loaded a set of static keyspaces defined in a storage-conf.xml file.
 [[|CASSANDRA-44]] added the ability to
modify schema dynamically on a live cluster.  Part of this change required that we ignore
the schema defined in storage-conf.xml.  Additionally, 0.7 converts to YAML based configuration.
+ If you have an existing storage-conf.xml file, you will first need to convert it to YAML
using the `bin/config-converter` tool, which can generate a cassandra.yaml file from a storage-conf.xml
file.  Once you have a cassandra.yaml, it is possible to do a one-time load of the schema
it defines.  0.7 adds a `loadSchemaFromYAML` method to `StorageServiceMBean` (triggered via
JMX: see ) which will load the schema
defined in cassandra.yaml, but this is a one-time operation.  A node that has had its schema
defined via `loadSchemaFromYAML` will load its schema from the system table on subsequent
restarts, which means that any further changes to the schema need to be made using the `system_*`
thrift operations (see [[API]]).
+ It is recommended that you only perform schema updates on one node and let cassandra propagate
changes to the rest of the cluster.  If you try to perform the same updates simultaneously
on multiple nodes, you run the risk of introducing inconsistent migrations, which will lead
to a confused cluster.
+ See LiveSchemaUpdates for more information.
+ <<Anchor(gui)>>
+ == Is there a GUI admin tool for Cassandra? ==
+ The closest is [[|chiton]], a GTK data browser.
+ <<Anchor(a_long_is_exactly_8_bytes)>>
+ == Insert operation throws InvalidRequestException with message "A long is exactly 8 bytes"
+ You are propably using !LongType column sorter in your column family. !LongType assumes
that the numbers stored into column names are exactly 64bit (8 bytes) long and in big endian
format. Example code how to pack and unpack an integer for storing into cassandra and unpacking
it for php:
+ {{{
+         /**
+          * Takes php integer and packs it to 64bit (8 bytes) long big endian binary representation.
+          * @param  $x integer
+          * @return string eight bytes long binary repersentation of the integer in big endian
+          */
+         public static function pack_longtype($x) {
+                 return pack('C8', ($x >> 56) & 0xff, ($x >> 48) & 0xff,
($x >> 40) & 0xff, ($x >> 32) & 0xff,
+                                 ($x >> 24) & 0xff, ($x >> 16) & 0xff,
($x >> 8) & 0xff, $x & 0xff);
+         }
+         /**
+          * Takes eight bytes long big endian binary representation of an integer and unpacks
it to a php integer.
+          * @param  $x
+          * @return php integer
+          */
+         public static function unpack_longtype($x) {
+                 $a = unpack('C8', $x);
+                 return ($a[1] << 56) + ($a[2] << 48) + ($a[3] << 40) +
($a[4] << 32) + ($a[5] << 24) + ($a[6] << 16) + ($a[7] << 8) + $a[8];
+         }
+ }}}
+ <<Anchor(clustername_mismatch)>>
+ == Cassandra says "ClusterName mismatch: oldClusterName != newClusterName" and refuses to
start ==
+ To prevent operator errors, Cassandra stores the name of the cluster in its system table.
 If you need to rename a cluster for some reason, it is safe to remove system/LocationInfo*
after forcing a compaction on all ColumnFamilies (with the old cluster name) if you've specified
the node's token in the config file, or if you don't care about preserving the node's token
(for instance in single node clusters.)
+ <<Anchor(batch_mutate_atomic)>>
+ == Are batch_mutate operations atomic? ==
+ As a special case, mutations against a single key are atomic, but more generally no. [[API#batch_mutate|batch_mutate]]
allows grouping operations on many keys into a single call in order to save on the cost of
network round-trips. If `batch_mutate` fails in the middle of its list of mutations, no rollback
occurs and the mutations that have already been applied stay applied. The client should typically
retry the `batch_mutate` operation.
+ <<Anchor(hadoop_support)>>
+ == Is Hadoop (i.e. Map/Reduce, Pig, Hive) supported? ==
+ For the latest on Hadoop-Cassandra integration, see HadoopSupport.
+ <<Anchor(multi_tenant)>>
+ == Can a Cassandra cluster be multi-tenant? ==
+ There is work being done to support more multi-tenant capabilities such as scheduling and
auth.  For more information, see MultiTenant.
+ <<Anchor(using_cassandra)>>
+ == Who is using Cassandra and for what? ==
+ For information on who is using Cassandra and what they are using it for, see CassandraUsers.

View raw message