Skip to content

Commit

Permalink
correction hdfs pour hbase
Browse files Browse the repository at this point in the history
  • Loading branch information
jetoile committed Jan 17, 2016
1 parent 21dc708 commit 6bf2e19
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ private void init() {
}

private void build() {
org.apache.hadoop.conf.Configuration hbaseConfiguration = new org.apache.hadoop.conf.Configuration();
hbaseConfiguration.setBoolean("hbase.table.sanity.checks", false);
hbaseConfiguration.set("fs.default.name", "hdfs://127.0.0.1:" + configuration.getString(ConfigVars.HDFS_NAMENODE_PORT_KEY));

hbaseLocalCluster = new HbaseLocalCluster.Builder()
.setHbaseMasterPort(port)
.setHbaseMasterInfoPort(infoPort)
Expand All @@ -55,7 +59,7 @@ private void build() {
.setZookeeperConnectionString(zookeeperConnectionString)
.setZookeeperZnodeParent(zookeeperZnodeParent)
.setHbaseWalReplicationEnabled(enableWalReplication)
.setHbaseConfiguration(new org.apache.hadoop.conf.Configuration())
.setHbaseConfiguration(hbaseConfiguration)
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class HBaseBootstrapTest {

static private Bootstrap zookeeper;
static private Bootstrap hbase;
static private Bootstrap hdfs;
static private Configuration configuration;


Expand All @@ -36,12 +37,14 @@ public static void setup() throws Exception {
}

zookeeper = ZookeeperBootstrap.INSTANCE.start();
hdfs = HdfsBootstrap.INSTANCE.start();
hbase = HBaseBootstrap.INSTANCE.start();
}

@AfterClass
public static void tearDown() throws Exception {
hbase.stop();
hdfs.stop();
zookeeper.stop();
}

Expand Down

0 comments on commit 6bf2e19

Please sign in to comment.