hbase-site.xml overrides hbase-default.xml if there is a duplication
of properties defined.  as i understand, all customizations should not
be put in the hbase-default.xml and should be put in the
hbase-site.xml or other related xml files.

-sd

On Mon, May 18, 2009 at 2:41 PM, monty123 <[email protected]> wrote:
>
> Thanks for the quick response.
>
> I still have a confusion,
> entry for hbase.master property is in my hbase-default.xml not
> hbase-site.xml
> whether I need to put a new entry for hbase.master in hbase-site.xml or I
> can change hbase-default.xml 's entry to
> "foo.bar.com:60000"
>
> I had also attached these two files in my previous post message.
>
> Thanks for the help.
>
>
> Sasha Dolgy-2 wrote:
>>
>> right, this is because your hbase is listening to the localhost and
>> not to the public interface of the network card.
>>
>> in your $HBASE_HOME/conf/hbase-site.xml validate the following
>> configuration parameter ( i think the default is local):
>>
>>   <property>
>>     <name>hbase.master</name>
>>     <value>foo.bar.com:60000</value>
>>     <description>The host and port that the HBase master runs at.
>>     A value of 'local' runs the master and a regionserver in
>>     a single process.
>>     </description>
>>   </property>
>>
>> This will mean that the service will bind to the reverse lookup of
>> foo.bar.com on port 6000
>> -sasha
>>
>> On Mon, May 18, 2009 at 12:33 PM, monty123 <[email protected]> wrote:
>>>
>>> my netstat output is :
>>>
>>> netstat -an | grep 60000
>>> tcp6       0      0 127.0.0.1:60000         :::*
>>>  LISTEN
>>> tcp6       0      0 127.0.0.1:47423         127.0.0.1:60000
>>> ESTABLISHED
>>> tcp6       0      0 127.0.0.1:60000         127.0.0.1:47423
>>> ESTABLISHED
>>>
>>> Also, when I telnet <machine-ip/192.168...> 60000 from second machine its
>>> output is :
>>> telnet : unable to connect to remote host : conncetion refused (only at
>>> port
>>> 60000, not on default port)
>>>
>>> I am confused please help.
>>>
>>>
>>>
>>>
>>> Sasha Dolgy-2 wrote:
>>>>
>>>> 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]
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Set-hbase-configuration-when-client-is-on-different-machine-tp23535721p23595650.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-tp23535721p23595890.html
> Sent from the HBase User mailing list archive at Nabble.com.
>
>



-- 
Sasha Dolgy
[email protected]

Reply via email to