cassandra

How to use properties in spark scala maven project

一笑奈何 提交于 2020-01-25 11:25:28
问题 i want to include properties file explicitly and include it in spark code , instead of hardcoding directly in spark code with all credentials. i am trying following approach but not able to do, AppContext is not able to be resolved. please guide me how to achieve this. Spark_env.properties (under src/main/resourcses in maven project for spark with scala) CASSANDRA_HOST1=127.0.0.133 CASSANDRA_PORT1=9042 CASSANDRA_USER1=usr1 CASSANDRA_PASS1=pas2 DataMigration.cassandra.keyspace1=demo2

Infinispan 7.1 Cassandra cache-store

戏子无情 提交于 2020-01-25 11:03:06
问题 I have a very simple cache of type String, Long in Infinispan. I would like to persist this cache to cassandra. I have installed Infinispan 7.1 Server and I have a cassandra instance running. I've looked at http://infinispan.org/docs/cachestores/cassandra/ which lists two xml excerpts. Since I am completely new to Infinispan, I have no idea where to add the listed xml. Is there an example Infinispan 7.1 server installation somewhere where this is setup and working? EDIT 1: I am able to use

How do I disable autocompaction in `cassandra.yaml`?

给你一囗甜甜゛ 提交于 2020-01-25 09:41:08
问题 https://stackoverflow.com/a/47837940/260805 hints that it should be possible. I would like to disable it for a longer period of times (~2 days) when enabling incremental repairs. 回答1: (Disclaimer: I'm a ScyllaDB employee) As far as I know you can disable autocompaction in the following ways: For a column family (Table), by setting its strategy to NullCompactionStrategy. (I think this one is supported only in Scylla, but not in Cassandra) Using nodetool: $ nodetool <options>

Retrieve multiple columns value from Cassandra using Hector client

对着背影说爱祢 提交于 2020-01-25 08:57:25
问题 I am working with Cassandra and I am using Hector client to read and upsert the data in Cassandra database. I am trying to retrieve the data from Cassandra database using hector client and I am able to do that if I am trying to retrieve only one column. Now I am trying to retrieve the data for rowKey as 1011 but with columnNames as collection of string. Below is my API that will retrieve the data from Cassandra database using Hector client- public Map<String, String> getAttributes(String

Secondary index update issue

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-25 06:45:12
问题 I have created KS & CF using cassandra-0.7.8 and inserted some rows and column values(around 1000 rows). Later, I wanted to index 2 column values. So, I issued 'update column family..' command. After, when I query based on indexed value it says "Row does not found". After indexing 1. Issued nodetool flush 2.restarted Cassandra once. Though it is same. But, I could see some XXX-Index.db file on cassandra data directory. What am I missing? Here are CF details, create column family ipinfo with

Apache nutch fetching but not saving file content

自作多情 提交于 2020-01-24 22:42:39
问题 I asked nutch to crawl a local file: http://localhost:8080/a.txt. I am running the HTTP server and I can see nutch trying to access the file (and before it, /robots.txt). I am using cassandra as backend. However, I cannot see any data from the crawl. When I do ./bin/nutch readdb -dump data ..., I get the following output. Can someone help me with a sane answer to this question? Where is the webpage data? $ cat data/part-r-00000 http://localhost:8000/a.html key: localhost:http:8000/a.html

Heap Memory default allocation in Cassandra

孤人 提交于 2020-01-24 20:10:35
问题 As per cassandra-env.sh the default heap memory allocation for a 440G Total RAM should be 32765M (Maximum CAP before JVM Swithches to 64 bit reference). So, why is it showing 32210157568 bytes(30718M) when I query "java -XX:+PrintCommandLineFlags -version" or "java -XX:+PrintFlagsFinal -version | grep -iE 'MaxHeapSize'" Why is there difference, of around 2G. FYI: jvm.options files was default & using DSE 5.1.3. 回答1: java -XX:+PrintFlagsFinal has nothing to do with Cassandra, and I don't know

Apache Cassandra schema design

烈酒焚心 提交于 2020-01-24 19:41:21
问题 I have following setup: Have CF items and CF keywords. Each item have zero, one or more keywords, stored in columns. Each keyword have one or more items, stored in columns. It looks like this: items { dl { name => DELL6400, keyword:1 => computer, keyword:2 => DELL, keyword:3 => topseller } hp { name => HP12345, keyword:1 => computer, keyword:2 => HP } no { name => Nokia8210, keyword:1 => phone, keyword:2 => NOKIA } } // here I store keys of the items only, // in reality I have denormalized

Add missing monthly rows

倖福魔咒の 提交于 2020-01-24 19:31:10
问题 I would like to list the missing date between two dates in a request for example My data : YEAR_MONTH | AMOUNT 202001 | 500 202001 | 600 201912 | 100 201910 | 200 201910 | 100 201909 | 400 201601 | 5000 I want the request to return 201912 | 100 201911 | 0 201910 | 300 201909 | 400 201908 | 0 201907 | 0 201906 | 0 .... | 0 201712 | 0 i want the last 24 months from the date of execution I did something similar with the dates but not YEAR MONTH yyyyMM select date_sub(s.date_order ,nvl(d.i,0)) as

cassandra: ~.cqlshrc does not work for float_precision

北城以北 提交于 2020-01-24 19:19:56
问题 I created file in .cassandra directory and changed the cqlshrc file. [ui] float_precision = 10 But that did not work. I am using ccm with Cassandra in Ubuntu. 回答1: Inside your cqlshrc file, you need to designate your [ui] section and define your float_precision on separate lines. In your example, it shows that you are defining them on the same line. Here you can see that I have my cqlshrc file defined as you do. When querying a float in cqlsh, it defaults to a precision of 5. aploetz