卡塔执行错误
嗨我试过了 bin/katta search IndexName "Query"
上面的效果很好,
bin/katta search IndexName "Query" 100 这也很好用,
我写了一个程序 ILuceneClient 客户端 = new LuceneClient(); client.count(....) //工作正常
,但下面的抛出异常
Hits attempts = client.search(query,new String[] { _kattaIndexName });
===== =================================================== =========================== 11/03/22 07:43:36 警告 client.NodeInteraction:159 - 无法与节点 hadoop5:20000 交互。尝试使用其他节点 [hadoop4:20000, hadoop1:20000] (id=6) java.lang.reflect.InitationTargetException 在 sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法) 在 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 在 java.lang.reflect.Method.invoke(Method.java:597) 在net.sf.katta.client.NodeInteraction.run(NodeInteraction.java:135) 在 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) 在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) 在 java.lang.Thread.run(Thread.java:619) 引起原因:org.apache.hadoop.ipc.RemoteException:java.io.IOException:无法执行多线程分片搜索: 在net.sf.katta.lib.lucene.LuceneServer.search(LuceneServer.java:416) 在net.sf.katta.lib.lucene.LuceneServer.search(LuceneServer.java:261) 在net.sf.katta.lib.lucene.LuceneServer.search(LuceneServer.java:235) 在 sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法) 在 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 在 java.lang.reflect.Method.invoke(Method.java:597) 在 org.apache.hadoop.ipc.RPC$Server.call(RPC.java:508) 在 org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:959) 在 org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:955) 在 java.security.AccessController.doPrivileged(本机方法) 在 javax.security.auth.Subject.doAs(Subject.java:396)
在 org.apache.hadoop.ipc.Server$Handler.run(Server.java:953)
Hi I tried
bin/katta search IndexName "Query"
the above one is works fine and
bin/katta search IndexName "Query" 100
which is also works fine,
I write a program
ILuceneClient client = new LuceneClient();
client.count(....) //works fine
But the below one is throwing exception
Hits hits = client.search(query,new String[] { _kattaIndexName });
==================================================================================
11/03/22 07:43:36 WARN client.NodeInteraction:159 - Failed to interact with node hadoop5:20000. Trying with other node(s) [hadoop4:20000, hadoop1:20000] (id=6)
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at net.sf.katta.client.NodeInteraction.run(NodeInteraction.java:135)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.hadoop.ipc.RemoteException: java.io.IOException: Multithread shard search could not be executed:
at net.sf.katta.lib.lucene.LuceneServer.search(LuceneServer.java:416)
at net.sf.katta.lib.lucene.LuceneServer.search(LuceneServer.java:261)
at net.sf.katta.lib.lucene.LuceneServer.search(LuceneServer.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:508)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:959)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:955)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:953)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在windows中使用eclipse作为客户端时遇到了类似的问题。我发现我使用了与 katta 集群的 lib 上不同版本的 lucence core。看来Hadoop IPC对版本控制非常敏感。所以你应该确保你的 eclipse 使用了与你的 katta lib 包含的相同版本的 lucene 核心。
I met with a similar problem when using eclipse in windows as a client. I found out that I have used a different version of lucence core as that on the katta cluster's lib. It seems that Hadoop IPC is very sensitive to versioning. So you should make sure that your eclipse has used the same version of lucene core as that your katta lib contains.