最新评论
Re:利用遗传算法求解旅行商问题 leizisdu 2011-12-26 21:41
@简单代码
[b]当测试58个城市的时候,您的结果比博主的差太多,是因为您仅将迭代次数设为了10,太小了:)[/b]
Re:利用遗传算法求解旅行商问题 leizisdu 2011-12-26 16:16
[b]博主的代码(最后一行的链接,不要用前面的)只要按网友@简单代码所讲得添加两个括号修改一下就可以了:)[/b]
Re:利用遗传算法求解旅行商问题 leizisdu 2011-12-26 16:10
@简单代码
[b]你牛!谢谢您的讲解与分享:D[/b]
效率
BSON是为效率而设计的,它只需要使用很少的空间。即使在最坏的情况下,BSON格式也比JSON格式再最好的情况下存储效率高。
这个地方与《mongodb权威指南》有出入:最差的情况下,BSON比JSON效率略差,最好的情况下(存放二进制或大数据),BSON要高效的多。
期待博主深入文章..
Re:使用YCSB对HBase进行测试 逖靖寒 2011-12-16 13:29
@dr_filter
如果你scan表没有数据,说明你的测试程序写入数据失败了。可以查看一下日志,看看是什么地方出问题了。
Re:使用YCSB对HBase进行测试 dr_filter 2011-12-16 13:21
请问测试的时候数据是否真正写入了hbase中,为什么我scan usertable没有发现任何数据?
Re:使用YCSB对HBase进行测试 MISS张_Allen 2011-12-16 10:39
@逖靖寒
嗯,版本换过来了,但是我在执行您这篇文章的最后一段代码的时候出现如下图片的情况,总是连接失败,不晓得学长能看出是啥问题来么?好像是java环境和他没连上,但我不晓得到底哪里去改这个问题~~
http://photo.blog.sina.com.cn/photo/90d1505c4b42c671b9afe
Re:使用YCSB对HBase进行测试 逖靖寒 2011-12-15 21:35
@MISS张_Allen
建议你用0.90.4版本的hbase。测试数据你可以自己造,比如用随机数。
Re:使用YCSB对HBase进行测试 MISS张_Allen 2011-12-15 16:30
您好,不晓得咋称呼您合适,暂且喊您为学长吧,我是hbase的初学者,最近老师让我弄个压力测试,主要是测试下hbase的性能,一直没多大头绪,看了您这篇文章感觉收益蛮大的(虽然英文的东东好多都看不明白,嘿嘿),对于这款工具不知学长您有没有一些关于他的详细使用资料?还有我按照您上面说的代码把HBaseClient.java给替换了,最后BUILD FALSE ,不替换反而成功了,是不是我用的版本的事?我用Hbase是0.20.6的,还有您的最后那段导入测试数据的,这是从哪来的数据啊?我回到hbase shell里查看usertable里的数据,发现显示如下:11/12/15 16:23:09 INFO ipc.HbaseRPC: Server at /127.0.1.1:40641 could not be reached after 1 tries, giving up.(呵呵,学长别笑话俺问的问题幼稚啊,)是不是我哪里做的不对头呢?我在整个过程中也没看到对于测试结果的监控呃……嗯,对这款工具的介绍我还处于一知半解的地步~~~(虚心请学长指教)
楼主,我对你这句话不算理解耶。
本程序示例2个简单的运算:
1 AND运算: 就是咱们常用的求和运算,如:1 AND 0 = 1
2 OR运算: 就是咱们常用的求并运算,如:1 OR 0 = 1
1 AND 0 的结果不应该是 0 吗?
希望解释一下,谢谢。
楼主写得很通俗,我最近研究神经网络,发现书里面的太理论了,不知道怎么应用到程序之中。看了楼主的文章,觉得非常容易懂。希望多写写这方面的文章。
Re:浅析HTTP协议 leather0906 2011-09-27 23:28
讲的的浅显易懂,适合我这初学者。
@逖靖寒
(正确值-实际计算的值) 这其中的 '正确值'和实际计算的值,这两个不知是什么,能否详细讲解一下?
Re:如何停止java线程 glaivelee 2011-08-05 17:13
这里还需要注意一点,当线程处于写文件的状态时,调用interrupt()不会中断线程。
为啥不能中断线程? 这究竟是为什么???
其实,国际上以后有这样的比赛了,而且平台都有的,大学的时候参加过。叫什么来着,忘记了。
Re:07年全国数学建模感想+解题软件+源代码 yuzusk 2011-07-06 09:59
当年数模我做的就是这道题,后来还拿个二等奖,当时还不怎么会编程,全用集合的思想,利用数据库语句实现了
Re:关于HFile的思考 逖靖寒 2011-07-05 19:50
@真见
呵呵,谢谢你
Re:关于HFile的思考 真见 2011-07-05 15:03
友情帮顶!
@laigood
0.8的版本相对0.6.x和0.7.x来说还是有变化的。你可以先用0.6.x或0.7.x来测试。
你好,我用cassandra8.0,运行CassSeller程序时出现下面的错误
InvalidRequestException(why:Column timestamp is required)
at org.apache.cassandra.thrift.Cassandra$batch_mutate_result.read(Cassandra.java:19045)
at org.apache.cassandra.thrift.Cassandra$Client.recv_batch_mutate(Cassandra.java:1035)
at org.apache.cassandra.thrift.Cassandra$Client.batch_mutate(Cassandra.java:1009)
at cassSeller.dao.impl.SellerDaoImpl.insertSeller(SellerDaoImpl.java:137)
at cassSeller.app.App.main(App.java:114)
但是timestamp都设置了呀,源码我没改。请问是什么原因?
Re:基于Cassandra搭建简单Blog程序后台 brockhong 2011-06-08 10:12
和上面的同学一样 不过我在windows 下成功的
INFO 10:04:20,235 JNA not found. Native methods will be disabled.
ERROR 10:04:20,291 Exception encountered during startup.
java.lang.ExceptionInInitializerError
at org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:74)
at org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:226)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: XPathFactory#newInstance() failed to create an XPathFactory for the default object model: http://java.sun.com/jaxp/xpath/dom with the XPathFactoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException: No XPathFctory implementation found for the object model: http://java.sun.com/jaxp/xpath/dom
at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:604)
... 2 more
Caused by: java.lang.RuntimeException: XPathFactory#newInstance() failed to create an XPathFactory for the default object model: http://java.sun.com/jaxp/xpath/dom with the XPathFactoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException: No XPathFctory implementation found for the object model: http://java.sun.com/jaxp/xpath/dom
at javax.xml.xpath.XPathFactory.newInstance(Unknown Source)
at org.apache.cassandra.utils.XMLUtils.<init>(XMLUtils.java:60)
at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:210)
... 2 more
Exception encountered during startup.
java.lang.ExceptionInInitializerError
at org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:74)
at org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:226)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: XPathFactory#newInstance() failed to create an XPathFactory for the default object model: http://java.sun.com/jaxp/xpath/dom with the XPathFactoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException: No XPathFctory implementation found for the object model: http://java.sun.com/jaxp/xpath/dom
at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:604)
... 2 more
Caused by: java.lang.RuntimeException: XPathFactory#newInstance() failed to create an XPathFactory for the default object model: http://java.sun.com/jaxp/xpath/dom with the XPathFactoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException: No XPathFctory implementation found for the object model: http://java.sun.com/jaxp/xpath/dom
at javax.xml.xpath.XPathFactory.newInstance(Unknown Source)
at org.apache.cassandra.utils.XMLUtils.<init>(XMLUtils.java:60)
at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:210)
... 2 more
Re:如何停止java线程 为爱一诺千年 2011-06-02 17:22
0.0 大致看清白了
Re:Java分布式内存开源实现:Hazelcast luckytutu 2011-05-09 04:03
学习了。。。
@逖靖寒
我一直用的是0.0.0.0程序在不同的机器上测试过,不同的系统下也测试过暂时没发现问题,0.0.0.0只针对tcpip连接监听服务用
Re:分布式实时统计系统--Rainbird take it and go 2011-04-28 15:59
这个设计很好啊,吸取不同组件的优点
Re:释放你的编程技能与激情--博客园仿真足球竞赛平台预览 take it and go 2011-04-28 15:56
好游戏
不错,曾经遇到一个非常SB的问题,改动代码后始终不更新,最后才发现是HOST文件里的本地测试机和服务器测试机指向有误,细心很重要,支持一下
final InetAddress addr = address.getAddress();
if (addr != null) {
return addr.getHostAddress();
} else {
LogFactory. getLog(HServerAddress.class).error( "Could not resolve the"
+ " DNS name of " + stringValue );
return null;
}
为什么是通过地址搜索去查找本机ip,如果只是开启本机ip地址监控为什么不试试
public String getBindAddress() {
return "0.0.0.0";
}
这样做,不管你是双线服务器还是,双网卡,内外网并用还是127.0.0.1都可以实现监听,
Re:关于ACM的一些资料 take it and go 2011-04-23 12:20
您推荐的这些题库我当时基本都接触过,我觉得大部分国内的题库的特点就是水题太多。
在这里我还是有为推荐一下SGU和SPOJ,里面的题目难度比较大。
@conglin02
你运行的例子应该是少了一个JAR包。你把这个commons-logging-1.0.4.jar,commons-logging-api-1.0.4.jar,slf4j-log4j12-1.4.3.jar放到你的路径再试试。
Re:在Hadoop中使用MRUnit进行单元测试 conglin02 2011-03-19 19:43
Call for help:
啊,运行MRUnit的例子结果怎么着都通不过,求帮助啊……
Eclipse 3.* + hadoop-0.20.2 + hadoop-mrunit-0.20.2-737.jar
package gpcuster.cnblogs.com;
import junit.framework.TestCase;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapred.Mapper;
import org.apache.hadoop.mapred.lib.IdentityMapper;
import org.junit.Before;
import org.junit.Test;
import org.apache.hadoop.mrunit.MapDriver;
@SuppressWarnings("deprecation")
public class TestExample extends TestCase{
private Mapper mapper;
private MapDriver driver;
@Before
public void setUp(){
mapper = new IdentityMapper();
driver = new MapDriver(mapper);
}
@Test
public void testIdentityMapper(){
driver.withInput(new Text("foo"), new Text("bar"))
.withOutput(new Text("foo"), new Text("bar"))
.runTest();
}
}
ERROR:
[b]java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at[/b]org.apache.hadoop.mrunit.TestDriver.<clinit>(TestDriver.java:33)
at gpcuster.cnblogs.com.TestExample.setUp(TestExample.java:18)
at junit.framework.TestCase.runBare(TestCase.java:132)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
... 16 more
Re:详解Cassandra0.7配置文件 higkoo 2011-03-08 12:38
好文!
Re:ZooKeeper解惑 逖靖寒 2011-02-25 10:11
@herrygoon
如果是客户端重启的话,那你的应用程序也要重新执行把。那就会自动找一个可以的Server的。
Re:ZooKeeper解惑 herrygoon 2011-02-25 08:46
大致明白。
具体的再问一下,若是IP的话,如果客户端重启的话,是没法自动找到一个可用的Server的吧?
Re:ZooKeeper解惑 逖靖寒 2011-02-24 09:09
@herrygoon
--这里的address是IP还是域名?
address可以是IP或者主机名
--如何实现客户端自动切换Server,当初始的Server发生故障之后?
客户端与Server之间会有一个心跳机制,如果发现Server不可用,则自动切换到另一台。
Re:ZooKeeper解惑 herrygoon 2011-02-23 12:35
请问:
初始化客户端的代码:
zk = new ZooKeeper(address, 3000, this);
这里的address是IP还是域名?如何实现客户端自动切换Server,当初始的Server发生故障之后?
@杨福川
呵呵,我的工作就是基于Hadoop来开展的啊;)
Re:Cassandra就要迎来1.0版本啦 tengteng2007 2011-02-14 13:49
发现pycassa实现了……
Re:Cassandra就要迎来1.0版本啦 tengteng2007 2011-02-14 10:25
可以给些详细的内容吗?
1.我grep了hector源码,没有发现authen、author之类的代码;
2.我在hector-users的Google group上找到如下内容:
http://groups.google.com/group/hector-users/browse_thread/thread/4650d9298e813200/4dd7e602d06e4586?lnk=gst&q=authentication#4dd7e602d06e4586
以及
http://groups.google.com/group/hector-users/msg/709b6069bd1dc6c0?
发现hector作者在去年11月之前还没有实现对authentication的支持……
麻烦楼主给些详细的说明,谢谢!
@tengteng2007
你可以参考hector的API接口,有对应的方法可以调用的。