Heya,

Over at my place of work, we've been adopting the RpcConnectionRegistry for
specifying client connections. Currently we are looking at Replication,
which doesn't support the feature and where assumptions about ZooKeeper
abound. The details of a peer connection are fairly well encapsulated in
ReplicationPeerConfig, but (I assume because this class crosses the
jruby/hbase-shell divide) its properties are largely untyped -- everything
is a string. Thinking about how and where we might introduce configuration
points to support connecting to a remote peer via ConnectionRegistry, I got
to thinking -- is it time that we introduce a protocol specifier on our
structured connection strings and turn them into first-class URLs ?

The structure of our current connection string is defined over in ZKConfig.
If you squint and ignore the extra colon at the end, it already looks like
a URL with multiple host/port components. And over in jdbc land there's
already a precedent for multiple host/port pairs in that part of the URL.

So I was thinking that we could formalize the protocol/scheme portion,
allowing us to fold several different configuration points down into one
"connection string". It also opens the door for specifying additional
configuration overrides via the query component, which looks like it could
come in handy vs. some of the other tricks we do with replication. This
might also allow us to work with our myriad auth configuration settings in
an almost reasonable manner. Since it's all "just strings", we can roll out
changes in a (fragile, frustrating) backwards-compatible way.

We might have something like:
 - (unspecified), hbase:// -- whatever this release version's
default behavior is.
 - hbase+zk:// or hbase+zookeeper:// -- explicitly specify zookeeper
quorum + path
 - hbase+rpc:// -- connect via RpcConnectionRegistry
 - hbase+masterrpc:// - connect via (deprecated) MasterConnectionRegistry

What do y'all think? Is this a good idea? Did we try this already and
decide against it? Would you like to work together on a design doc?

Thanks,
Nick

Reply via email to