Corrected a bug where I wasn't reading the zookeeper quorum configuration correctly
This commit is contained in:
parent
2fa01bc5b9
commit
63e782dae4
3 changed files with 10 additions and 7 deletions
|
|
@ -28,7 +28,6 @@ private[akka] object HbaseStorageBackend extends MapStorageBackend[Array[Byte],
|
|||
val EMPTY_BYTE_ARRAY = new Array[Byte](0)
|
||||
val HBASE_ZOOKEEPER_QUORUM = config.getString("akka.storage.hbase.zookeeper.quorum", "localhost")
|
||||
val CONFIGURATION = new HBaseConfiguration
|
||||
val ADMIN = new HBaseAdmin(CONFIGURATION)
|
||||
val REF_TABLE_NAME = "__REF_TABLE"
|
||||
val VECTOR_TABLE_NAME = "__VECTOR_TABLE"
|
||||
val VECTOR_ELEMENT_COLUMN_FAMILY_NAME = "__VECTOR_ELEMENT"
|
||||
|
|
@ -43,6 +42,8 @@ private[akka] object HbaseStorageBackend extends MapStorageBackend[Array[Byte],
|
|||
init
|
||||
|
||||
def init {
|
||||
val ADMIN = new HBaseAdmin(CONFIGURATION)
|
||||
|
||||
if (!ADMIN.tableExists(REF_TABLE_NAME)) {
|
||||
ADMIN.createTable(new HTableDescriptor(REF_TABLE_NAME))
|
||||
ADMIN.disableTable(REF_TABLE_NAME)
|
||||
|
|
@ -69,6 +70,8 @@ private[akka] object HbaseStorageBackend extends MapStorageBackend[Array[Byte],
|
|||
}
|
||||
|
||||
def drop {
|
||||
val ADMIN = new HBaseAdmin(CONFIGURATION)
|
||||
|
||||
if (ADMIN.tableExists(REF_TABLE_NAME)) {
|
||||
ADMIN.disableTable(REF_TABLE_NAME)
|
||||
ADMIN.deleteTable(REF_TABLE_NAME)
|
||||
|
|
|
|||
|
|
@ -78,24 +78,24 @@ class PersistentFailerActor extends Transactor {
|
|||
|
||||
class HbasePersistentActorSpec extends JUnitSuite with BeforeAndAfterAll {
|
||||
|
||||
val testUtil = new HBaseTestingUtility
|
||||
//val testUtil = new HBaseTestingUtility
|
||||
|
||||
override def beforeAll {
|
||||
testUtil.startMiniCluster
|
||||
//testUtil.startMiniCluster
|
||||
}
|
||||
|
||||
override def afterAll {
|
||||
testUtil.shutdownMiniCluster
|
||||
//testUtil.shutdownMiniCluster
|
||||
}
|
||||
|
||||
@Before
|
||||
def beforeEach {
|
||||
HbaseStorageBackend.drop
|
||||
//HbaseStorageBackend.drop
|
||||
}
|
||||
|
||||
@After
|
||||
def afterEach {
|
||||
HbaseStorageBackend.drop
|
||||
//HbaseStorageBackend.drop
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ akka {
|
|||
}
|
||||
|
||||
hbase {
|
||||
zookeeper.quorum = "localhost"
|
||||
zookeeper.quorum = "master"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue