A few things:

1. You can ask to run more than one regionserver, even when in local mode
where all servers run in the same instance of a JVM.  Because of this, we
choose random ports for regionserver when in local more (Maybe we should be
smarter and if only one regionserver use the default 60020 port).
2. Custom filters need to be on both client and server CLASSPATH.  I'm
guessing that your anonymous filter class below is somehow not present in
both places (This'd explain why when you use one of the packaged filters all
works fine).

St.Ack


On Wed, Apr 8, 2009 at 7:32 AM, check_writer <[email protected]>wrote:

>
> Hi all, I trying to run a simple application (running Hbase in local-mode)
> that scans a simple very small table, scan using a custom filter.   And for
> some reason things work fine if I use a simple scanner, however when i do
> the following:
>
> Scanner scanner = table.getScanner(new String[] { colfam1 + "nodeid" },
> "999-1", 2280278, new PageRowFilter(1)
>                {
>                        public boolean filterColumn(byte[] rowKey, byte[]
> colKey, byte[] data)
>                        {
>                                return true;
>                        }
>                });
>
> HBase waits a little and I then get the error <below>.  BUT why I do see
> the
> region server @ port 49847 (a random port) instead of port 60020???   I've
> checked my hbase-default file and the port is set to 60020.   the info is
> on
> 60030, and I'm running HBase in local mode.    Also other simpler-nonfilter
> based scanners work just fine. Could this be because I'm running in
> local-mode?
>
> Please help.
> check_writer.
>
> --------------------------
> Exception in thread "main"
> org.apache.hadoop.hbase.client.RetriesExhaustedException: Trying to contact
> region server 127.0.0.1:49847 for region mytable,,1239130171356, row
> '999-1', but failed after 10 attempts.
> Exceptions:
> java.io.IOException: Call to /127.0.0.1:49847 failed on local exception:
> java.io.EOFException
> java.io.IOException: Call to /127.0.0.1:49847 failed on local exception:
> java.io.EOFException
> java.io.IOException: Call to /127.0.0.1:49847 failed on local exception:
> java.io.EOFException
> java.io.IOException: Call to /127.0.0.1:49847 failed on local exception:
> java.io.EOFException
> java.io.IOException: Call to /127.0.0.1:49847 failed on local exception:
> java.io.EOFException
> java.io.IOException: Call to /127.0.0.1:49847 failed on local exception:
> java.io.EOFException
> .........
>        at
>
> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.getRegionServerWithRetries(HConnectionManager.java:858)
>        at
>
> org.apache.hadoop.hbase.client.HTable$ClientScanner.nextScanner(HTable.java:1594)
>        at
>
> org.apache.hadoop.hbase.client.HTable$ClientScanner.initialize(HTable.java:1539)
>        at org.apache.hadoop.hbase.client.HTable.getScanner(HTable.java:862)
>        at org.apache.hadoop.hbase.client.HTable.getScanner(HTable.java:838)
>        at mytest.HbastTester.main(HbastTester.java:98)
> -----------------------------------
>
>
>
> --
> View this message in context:
> http://www.nabble.com/Why-do-I-see-random-ports-for-region-server-when-I-scan--tp22943470p22943470.html
> Sent from the HBase User mailing list archive at Nabble.com.
>
>

Reply via email to