hector

Availability of Cassandra

假如想象 提交于 2019-12-22 04:37:18
问题 I am running into an issue "me.prettyprint.hector.api.exceptions.HUnavailableException: : May not be enough replicas present to handle consistency level." when I have RF=1, Read Consistency Level = 1 and one of the nodes in 6 node ring/ cluster is down. All of my reads are failing with this exception. Any idea? Ideally only reads that are looking for data in the node which is down should fail and all other reads should be successful? 回答1: There could be a few possibilities: You're running a

Querying CompositeType columns in Cassandra using Hector

﹥>﹥吖頭↗ 提交于 2019-12-18 10:29:14
问题 Here's a sample of the scenario I'm facing. Say I have this column family: create column family CompositeTypeCF with comparator = 'CompositeType(IntegerType,UTF8Type)' and key_validation_class = 'UTF8Type' and default_validation_class = 'UTF8Type' Here's some sample Java code using Hector as to how I'd go about inserting some data into this column family: Cluster cluster = HFactory.getOrCreateCluster("Test Cluster", "192.168.1.6:9160"); Keyspace keyspaceOperator = HFactory.createKeyspace(

Cassandra Client Java API's [closed]

旧巷老猫 提交于 2019-12-17 15:22:58
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I have recently started working with Cassandra Database. Now I am in the process of evaluating which Cassandra client we should go forward with. I have seen various post on stackoverflow about which client to use for Cassandra but none has very definitive answer. My team has asked me to do some research on this

PermGen Space error on hot deploys on Tomcat

橙三吉。 提交于 2019-12-14 02:36:05
问题 I am seeing the following messages in the logs after each redeploys. INFO: Reloading Context with name [/x1Application] has started SEVERE: The web application [/x1Application] appears to have started a thread named [Mojarra-WebResourceMonitor-1-thread-1] but has failed to stop it. This is very likely to create a memory leak. SEVERE: The web application [/x1Application] appears to have started a thread named [Hector.me.prettyprint.cassandra.connection.CassandraHostRetryService-1] but has

Hash value from keys on Cassandra

╄→гoц情女王★ 提交于 2019-12-13 04:33:59
问题 I'm developing a mechanism for Cassandra using Hector. What I need at this moment is to know which are the hash values of the keys to look at which node is stored (looking at the tokens of each one), and ask directly this node for the value. What I understood is that depending on the partitioner Cassandra uses, the values are stored independently from one partitioner to other. So, are the hash values of all keys stored in any table? In case not, how could I implement a generic class that once

MaximumRetryException when reading data off Cassandra using multiget

大兔子大兔子 提交于 2019-12-11 19:36:38
问题 I am inserting time series data with time stamp (T) as the column name in a wide column that stores 24 hours worth of data in a single row. Streaming data is written from data generator (4 instances, each with 256 threads) inserting data into multiple rows in parallel. CF2 (Wide column family): RowKey1 (T1, V1) (T2, V3) (T4, V4) ...... RowKey2 (T1, V1) (T3, V3) ..... : : I am now attempting to read this data off Cassandra using multiget. The client is written in python and uses pycassa. When

Counting columns, very slow CountQuery vs SliceQuery operations

僤鯓⒐⒋嵵緔 提交于 2019-12-11 10:56:35
问题 I've written a "census" program to iterate through all the rows in a Column Family and within each row count the columns, recording the max value and row key. I've been spending more time with the Hector client but have written a Pelops client as well to test. The basic flow is to use use a RangeSlicesQuery to iterate through the rows, and then at each row, use a SliceQuery to iterate through and collect the stats. Works similar in Pelops, just different APIs. Downside is having to do the

Adding Secondary index on Cassandra indexes historical data?

坚强是说给别人听的谎言 提交于 2019-12-11 08:48:46
问题 if on a particular column family i add a index on a column later on will it index the historical data too or data which comes now after adding the index. Here in this When does Cassandra DB index data after updating a column as secondary index The accepted answer says it will index only data which is inserted after creating the index. I tried creating a CF with index on a column.(i am using Cassandra 1.0.7) create column family users with comparator=UTF8Type and column_metadata=[{column_name:

Reading columns with different valuetypes

点点圈 提交于 2019-12-11 04:16:38
问题 A SliceQuery< Long, String, String > says the keytype is long, column name is string and column value is string. When I execute the slice query using QueryResult < ColumnSlice< String, String > > I can get all the columns, but the key is long so there must be a column whose value is long type. It's a bit confusing for me to see how type safety works here(since query result will get a column type ). Also, if there is a column with value type other than string, then problem must arise. How to

Hector: how to query parts of a Composite Type

橙三吉。 提交于 2019-12-10 22:16:13
问题 I have data stored using CompositeType that looks like the following: RowKey: 101390 => (column=1320987600000:P:350.0:symbol, value=AAPL/F6LbE.O, timestamp=1320771711561000) => (column=1320987600000:P:355.0:symbol, value=AAPL/F6LfE.O, timestamp=1320771711569000) => (column=1320987600000:P:360.0:symbol, value=AAPL/F6LjE.O, timestamp=1320771711576000) => (column=1320987600000:P:365.0:symbol, value=AAPL/F6LnE.O, timestamp=1320771711586000) => (column=1320987600000:P:370.0:symbol, value=AAPL