日期:2014-05-17 浏览次数:21009 次
hadoop fs -mkdir hbase
hadoop fs -ls /
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://namenode.blackwing.com:8020/hbase/</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2181</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>namenode.blackwing.com</value>
</property>
</configuration>hdfs://namenode.blackwing.com:8020/
public InsertData(String tableName)
{
rowList = new ArrayList<Row>();
this.conf = HBaseConfiguration.create();
this.conf.set("hbase.zookeeper.quorum","192.168.128.140");
System.out.println("hbase.master = "+conf.get("hbase.master"));
System.out.println("hbase.zookeeper.quorum = "+conf.get("hbase.zookeeper.quorum"));
try {
this.table=new HTable(this.conf,tableName.getBytes());
} catch (IOException e) {
e.printStackTrace();
logger.info("errors occur while creating table : "+tableName);
}
}hdfs://namenode.blackwing.com:8020/hbase/
hdfs://namenode.blackwing.com:8020/
C:\WINDOWS\system32\drivers\etc\hosts
192.168.128.140 namenode.blackwing.com 192.168.128.136 jobtracker.blackwing.com 192.168.128.141 datanode.blackwing.com
hadoop fs -ls /hbase