小编Lyu*_*rov的帖子

尝试在活动池中借用使用cassandra的hector

当我尝试运行hector wiki提供的SchemaManipulation示例时,当服务器第一次运行时服务器启动时,一切都运行正常,但是在第二次运行错误发生后(下面的完整堆栈跟踪)

我试图使用hector 1.0.2和Glassfish 3.1连接到cassandra 1.0.7.我正在使用Netbeans 7.1.

已导入的自定义JAR

首次运行(成功):

SEVERE: log4j:WARN No appenders could be found for logger (me.prettyprint.cassandra.connection.CassandraHostRetryService).
SEVERE: log4j:WARN Please initialize the log4j system properly.
INFO: Dropped key space
INFO: Name: WOO
INFO: RF: 1
INFO: strategy class: org.apache.cassandra.locator.SimpleStrategy
INFO:   CF Type: STANDARD
INFO:   CF Name: DynamicCf
INFO:   CF Metadata: [ThriftColumnDef[name=java.nio.HeapByteBuffer[pos=8330 lim=8339 cap=9252],validationClass=org.apache.cassandra.db.marshal.LongType,indexType=KEYS,indexName=birthdate_idx]]
INFO:   CF Type: SUPER
INFO:   CF Name: SuperCf
INFO:   CF Metadata: []
Run Code Online (Sandbox Code Playgroud)

完整堆栈跟踪错误:

SEVERE: me.prettyprint.hector.api.exceptions.HInactivePoolException: Attempt to borrow on in-active pool: <ConcurrentCassandraClientPoolByHost>:{localhost(127.0.0.1):9160} …
Run Code Online (Sandbox Code Playgroud)

jsp netbeans glassfish cassandra hector

3
推荐指数
1
解决办法
1089
查看次数

在Sublime Text中构建Python

我无法在朋友的计算机上构建Python系统,该计算机使用Sublime Text 2运行Windows XP SP3.我们重新安装了Python 2.7.3和Sublime Text 2,但仍然遇到了麻烦.我们的Python.sublime-build领域说:

{
    "cmd": ["C:\\Python27\\python.exe", "-u", "$(FULL_CURRENT_PATH)"],
    "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
    "selector": "source.python"
}
Run Code Online (Sandbox Code Playgroud)

当我们尝试构建简单的Python程序时,例如:

2 * 2
Run Code Online (Sandbox Code Playgroud)

Sublime Text不会构建系统,而是吐出来:

C:\Python27\python.exe: can't find '__main__' module in ''
[Finished in 0.1s with exit code 1]
Run Code Online (Sandbox Code Playgroud)

如果我能得到一些帮助,那就太好了.非常感谢你帮助我的人!

python build build-error sublimetext2

3
推荐指数
1
解决办法
1万
查看次数

在Cassandra中设置节点间加密

我是Cassandra的新手,希望在Cassandra 1.2.8中设置节点加密.

我已按照此处列出的步骤成功为密钥库和信任库创建了密钥对:http: //docs.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#CreateKeystore

在Cassandra.yaml文件中,我已将服务器加密选项调整为以下内容:

server_encryption_options:
    internode_encryption: all
    keystore: conf/keystore
    keystore_password: password
    truststore: conf/truststore
    truststore_password: password
Run Code Online (Sandbox Code Playgroud)

但是,当我启动Cassandra服务器时,我收到以下错误:

ERROR 18:49:20,883 Fatal configuration error
org.apache.cassandra.exceptions.ConfigurationException: Unable to create ssl socket
        at org.apache.cassandra.net.MessagingService.getServerSocket(MessagingService.java:410)
        at org.apache.cassandra.net.MessagingService.listen(MessagingService.java:390)
        at org.apache.cassandra.service.StorageService.joinTokenRing(StorageService.java:589)
        at org.apache.cassandra.service.StorageService.initServer(StorageService.java:554)
        at org.apache.cassandra.service.StorageService.initServer(StorageService.java:451)
        at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:348)
        at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:447)
        at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:490)
Caused by: java.io.IOException: Error creating the initializing the SSL Context
        at org.apache.cassandra.security.SSLFactory.createSSLContext(SSLFactory.java:124)
        at org.apache.cassandra.security.SSLFactory.getServerSocket(SSLFactory.java:53)
        at org.apache.cassandra.net.MessagingService.getServerSocket(MessagingService.java:406)
        ... 7 more
Caused by: java.io.FileNotFoundException: conf\truststore\dev (The system cannot find the path specified)
        at java.io.FileInputStream.open(Native Method)
        at …
Run Code Online (Sandbox Code Playgroud)

cassandra

3
推荐指数
1
解决办法
2191
查看次数

使用maxTimeuuid/minTimeuuid进行CQL timeuuid比较

我在Mac OS X上使用Datastax cassandra发行版(dsc-cassandra-1.2.6).我想使用timeuuid类型,并正在尝试对它们进行查询.

这是我的表:

CREATE TABLE test_t (
  canon_key text,
  t timeuuid,
  PRIMARY KEY (canon_key, t)
)
Run Code Online (Sandbox Code Playgroud)

现在让我说我得到一排.

cqlsh:pagedb> select canon_key, t, dateOf(t), unixTimestampOf(t) from test_t where canon_key = 'xxx' and t >= minTimeuuid('2013-08-08 18:43:58-0700');                 
 canon_key | t                                    | dateOf(t)                | unixTimestampOf(t)

-----------+--------------------------------------+--------------------------+--------------------

       xxx | 287d3c30-0095-11e3-9268-a7d2e09193eb | 2013-08-08 18:43:58-0700 |      1376012638067
Run Code Online (Sandbox Code Playgroud)

现在,我想删除这一行.我没有看到这样做的好方法,因为timeuuid类型没有相等运算符.

我添加的数据的性质是这样的,我(可能)甚至不介意这样做:

cqlsh:pagedb>从test_t中选择canon_key,t,dateOf(t),unixTimestampOf(t)其中canon_key ='xxx'和t> = minTimeuuid('2013-08-08 18:43:58-0700')和t < = maxTimeuuid('2013-08-08 18:43:58-0700');

但根据文档(http://cassandra.apache.org/doc/cql3/CQL.html#usingdates),这将无法正常工作.引述:"请注意,t> = maxTimeuuid('2013-01-01 00:05 + 0000')仍然不会选择在'2013-01-01 00:05 + 0000'生成的时间长度,并且基本上相当于t> maxTimeuuid('2013-01-01 00:05 + 0000')."

那么..我该如何删除这一行?

cql cassandra datastax-enterprise

0
推荐指数
1
解决办法
3931
查看次数