Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-16576

Shell add_peer doesn't allow setting cluster_key for custom endpoints

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.1.5, 0.98.22, 2.0.0
    • 1.4.0, 0.98.23, 1.3.3, 2.0.0
    • shell
    • None
    • Reviewed

    Description

      The HBase shell allows a user to create a replication peer using the add_peer method, which can take a peer id and a Ruby hash. It creates a ReplicationPeerConfig and passes it through to the Java ReplicationAdmin#addPeer.

      The Ruby code makes an assumption that the Java API doesn't: that CLUSTER_KEY and ENDPOINT_CLASSNAME are mutually exclusive. If both are specified, it throws an error. If only ENDPOINT_CLASSNAME is set, the add_peer logic derives a local dummy cluster key based on the local cluster's configuration.

      CLUSTER_KEY shouldn't be required when an ENDPOINT_CLASSNAME is specified, because a custom endpoint might not need it. The dummy default logic is fine.

      But if an endpoint does require a remote cluster key, it shouldn't be forbidden to provide one, especially since the Java API permits it, and even the custom replication endpoint Java tests rely on this. (See TestReplicationEndpoint#testCustomReplicationEndpoint)

      Attachments

        1. HBASE-16576.patch
          5 kB
          Geoffrey Jacoby
        2. HBASE-16576.v1.patch
          5 kB
          Geoffrey Jacoby
        3. HBASE-16576-0.98.patch
          5 kB
          Geoffrey Jacoby

        Activity

          People

            gjacoby Geoffrey Jacoby
            gjacoby Geoffrey Jacoby
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: