another thing to check is that HBase is listening on a proper IP. By default it binds to 127.0.0.1 ... netstat -an | grep 60000 you'll see what ip/interface it's listening on and be able to make the configuration changes necessary.
On Mon, May 18, 2009 at 7:51 AM, monty123 <[email protected]> wrote: > > Thanks Sasha, > I have changed my code and added following two lines as suggested by you. > > HBaseConfiguration config = new HBaseConfiguration(); > config.set("hbase.master", "impetus-805:60000"); > > Now client class throws "09/05/18 12:09:49 INFO ipc.HBaseClass: Retrying > connect to server: impetus-805/192.168.102.38:60000. Already tried 0 > time(s)......" exception. > > I have also attached my hbase-default.xml and hbase-site.xml. > Please help. http://www.nabble.com/file/p23592018/hbase-default.xml > hbase-default.xml http://www.nabble.com/file/p23592018/hbase-site.xml > hbase-site.xml > > > > > > > > > > > Sasha Dolgy-2 wrote: >> >> HBaseConfiguration config = new HBaseConfiguration(); >> config.set("hbase.master", "foo.bar.com:60000"); >> >> >> On Thu, May 14, 2009 at 8:32 AM, monty123 <[email protected]> wrote: >> >>> >>> Hi All, >>> >>> I am a newbie to hbase. >>> I am able to setup hbase in pseudo-distributed mode and I have also done >>> with its integration from Java. ( java client class and hbase were on >>> same >>> system ) >>> >>> Now, I have no idea how to change configuration to access hbase from a >>> remote client ( like mysql jdbc conn. where se can change ip of server >>> from >>> localhost to other ) >>> >>> Please help. >>> >>> Thanks in advance. >>> >>> Following is my java client code : >>> >>> import org.apache.hadoop.hbase.client.HTable; >>> import org.apache.hadoop.hbase.HBaseConfiguration; >>> import org.apache.hadoop.hbase.io.RowResult; >>> >>> import java.util.HashMap; >>> import java.util.Map; >>> import java.io.IOException; >>> >>> public class HBaseConnector { >>> >>> public static Map retrievePost(String postId) throws IOException { >>> HTable table = new HTable(new HBaseConfiguration(), "blogposts"); >>> Map post = new HashMap(); >>> >>> RowResult result = table.getRow(postId); >>> >>> for (byte[] column : result.keySet()) { >>> post.put(new String(column), new String(result.get(column).getValue())); >>> } >>> return post; >>> } >>> >>> public static void main(String[] args) throws IOException { >>> Map blogpost = HBaseConnector.retrievePost("post1"); >>> System.out.println(blogpost.get("post:title")); >>> System.out.println(blogpost.get("post:author")); >>> } >>> } >>> >>> >>> >>> -- >>> View this message in context: >>> http://www.nabble.com/Set-hbase-configuration-when-client-is-on-different-machine-tp23535721p23535721.html >>> Sent from the HBase User mailing list archive at Nabble.com. >>> >>> >> >> >> -- >> Sasha Dolgy >> [email protected] >> >> > > -- > View this message in context: > http://www.nabble.com/Set-hbase-configuration-when-client-is-on-different-machine-tp23535721p23592018.html > Sent from the HBase User mailing list archive at Nabble.com. > > -- Sasha Dolgy [email protected]
