当前位置: 代码迷 >> 其他数据库 >> HBase自定义过滤器(Filter)的有关问题
  详细解决方案

HBase自定义过滤器(Filter)的有关问题

热度:11074   发布时间:2013-02-26 00:00:00.0
HBase自定义过滤器(Filter)的问题
HBase中,添加其自带的过滤器不会出错,如SingleColumnValueFilter,PageFilter,但要添加自己的过滤器(防止出现代码错误,暂时把自定义过滤器的实现跟SingleColumnValueFilter一样)却总是报错,错误及代码如下,哪位高手能帮忙分析分析
Java code
Scan s = new Scan();        Filter filter2 = new SingleColumnValueFilter("myColumFamily1".getBytes(),"myColum".getBytes(),CompareOp.NOT_EQUAL,"5".getBytes());        Filter filter3 = new SingleColumnMatchValueFilter("myColumFamily1".getBytes(),"myColum".getBytes(),CompareOp.NOT_EQUAL,"5".getBytes());        s.setFilter(filter3);        ResultScanner ss = table2.getScanner(s);        System.out.println();        for(Result r:ss){            System.out.println(new String(r.getRow())+":"+r.getCellValues().length);            for(KeyValue kv:r.raw()){               System.out.println(kv.getKeyString()+"_______"+new String(kv.getValue()));            }        }

错误
Java code
Exception in thread "main" org.apache.hadoop.hbase.client.RetriesExhaustedException: Trying to contact region server 10.10.11.112:60020 for region tabletest04,,1296182193609, row '', but failed after 10 attempts.Exceptions:java.io.IOException: Call to /10.10.11.112:60020 failed on local exception: java.io.EOFExceptionjava.io.IOException: Call to /10.10.11.112:60020 failed on local exception: java.io.EOFExceptionjava.io.IOException: Call to /10.10.11.112:60020 failed on local exception: java.io.EOFExceptionjava.io.IOException: Call to /10.10.11.112:60020 failed on local exception: java.io.EOFExceptionjava.io.IOException: Call to /10.10.11.112:60020 failed on local exception: java.io.EOFExceptionjava.io.IOException: Call to /10.10.11.112:60020 failed on local exception: java.io.EOFExceptionjava.io.IOException: Call to /10.10.11.112:60020 failed on local exception: java.io.EOFExceptionjava.io.IOException: Call to /10.10.11.112:60020 failed on local exception: java.io.EOFExceptionjava.io.IOException: Call to /10.10.11.112:60020 failed on local exception: java.io.EOFExceptionjava.io.IOException: Call to /10.10.11.112:60020 failed on local exception: java.io.EOFException    at org.apache.hadoop.hbase.client.HConnectionManager$TableServers.getRegionServerWithRetries(HConnectionManager.java:1045)    at org.apache.hadoop.hbase.client.HTable$ClientScanner.nextScanner(HTable.java:2003)    at org.apache.hadoop.hbase.client.HTable$ClientScanner.initialize(HTable.java:1923)    at org.apache.hadoop.hbase.client.HTable.getScanner(HTable.java:403)    at test.Test.main(Test.java:94)


------解决方案--------------------------------------------------------
同问,
Call to localhost/127.0.0.1:8020 failed on local exception: java.io.EOFException

------解决方案--------------------------------------------------------
hdfs没启动吧 应该是hadoop启动时候有一项没起来
------解决方案--------------------------------------------------------
你写的过滤器,要打jar包放到服务器上,重新启动hbase
  相关解决方案