accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [accumulo] branch main updated: Add new public API to get manager locations (#1704)
Date Mon, 14 Sep 2020 21:50:50 GMT
This is an automated email from the ASF dual-hosted git repository.

ctubbsii pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/main by this push:
     new 74145ea  Add new public API to get manager locations (#1704)
74145ea is described below

commit 74145eaab0aae21f2b2525ec607e6caf6e54e2e8
Author: Christopher Tubbs <ctubbsii@apache.org>
AuthorDate: Mon Sep 14 17:36:12 2020 -0400

    Add new public API to get manager locations (#1704)
    
    * Partially revert bc6fa04283d1dda3bfcde5ef193027d171adb37b to prevent
      addition of new API methods in already-deprecated API classes (#1703)
    * Add a new getManagerLocations() API to InstanceOperations
---
 .../java/org/apache/accumulo/core/client/Instance.java    | 15 +--------------
 .../apache/accumulo/core/client/ZooKeeperInstance.java    |  2 +-
 .../accumulo/core/client/admin/InstanceOperations.java    | 15 ++++++++++-----
 .../apache/accumulo/core/clientImpl/ClientContext.java    |  2 +-
 .../accumulo/core/clientImpl/InstanceOperationsImpl.java  |  5 +++++
 5 files changed, 18 insertions(+), 21 deletions(-)

diff --git a/core/src/main/java/org/apache/accumulo/core/client/Instance.java b/core/src/main/java/org/apache/accumulo/core/client/Instance.java
index 3a4bd45..fe8c0df 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/Instance.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/Instance.java
@@ -44,21 +44,8 @@ public interface Instance {
    * Returns the location(s) of the accumulo master and any redundant servers.
    *
    * @return a list of locations in "hostname:port" form
-   *
-   * @deprecated Use {@link #getManagerLocations()} instead
-   */
-  @Deprecated(since = "2.1.0", forRemoval = true)
-  default List<String> getMasterLocations() {
-    return getManagerLocations();
-  }
-
-  /**
-   * Returns the location(s) of the accumulo manager and any redundant servers.
-   *
-   * @return a list of locations in "hostname:port" form
-   *
    */
-  List<String> getManagerLocations();
+  List<String> getMasterLocations();
 
   /**
    * Returns a unique string that identifies this instance of accumulo.
diff --git a/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java b/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
index 0fe98c1..f671767 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
@@ -134,7 +134,7 @@ public class ZooKeeperInstance implements Instance {
   }
 
   @Override
-  public List<String> getManagerLocations() {
+  public List<String> getMasterLocations() {
     return ClientContext.getMasterLocations(zooCache, getInstanceID());
   }
 
diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperations.java
b/core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperations.java
index 35c43d1..45e7ae4 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperations.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperations.java
@@ -60,28 +60,35 @@ public interface InstanceOperations {
   void removeProperty(final String property) throws AccumuloException, AccumuloSecurityException;
 
   /**
+   * Retrieve the system-wide configuration.
    *
    * @return A map of system properties set in zookeeper. If a property is not set in zookeeper,
    *         then it will return the value set in accumulo.properties on some server. If
nothing is
    *         set in an accumulo.properties file it will return the default value for each
property.
    */
-
   Map<String,String> getSystemConfiguration() throws AccumuloException, AccumuloSecurityException;
 
   /**
+   * Retrieve the site configuration (that set in the server configuration file).
    *
    * @return A map of system properties set in accumulo.properties on some server. If nothing
is set
    *         in an accumulo.properties file it will return the default value for each property.
    */
-
   Map<String,String> getSiteConfiguration() throws AccumuloException, AccumuloSecurityException;
 
   /**
+   * Returns the location(s) of the accumulo manager and any redundant servers.
+   *
+   * @return a list of locations in <code>hostname:port</code> form.
+   * @since 2.1.0
+   */
+  List<String> getManagerLocations();
+
+  /**
    * List the currently active tablet servers participating in the accumulo instance
    *
    * @return A list of currently active tablet servers.
    */
-
   List<String> getTabletServers();
 
   /**
@@ -91,7 +98,6 @@ public interface InstanceOperations {
    *          The tablet server address should be of the form {@code <ip address>:<port>}
    * @return A list of active scans on tablet server.
    */
-
   List<ActiveScan> getActiveScans(String tserver)
       throws AccumuloException, AccumuloSecurityException;
 
@@ -103,7 +109,6 @@ public interface InstanceOperations {
    * @return the list of active compactions
    * @since 1.5.0
    */
-
   List<ActiveCompaction> getActiveCompactions(String tserver)
       throws AccumuloException, AccumuloSecurityException;
 
diff --git a/core/src/main/java/org/apache/accumulo/core/clientImpl/ClientContext.java b/core/src/main/java/org/apache/accumulo/core/clientImpl/ClientContext.java
index bacb4ad..2c8ab60 100644
--- a/core/src/main/java/org/apache/accumulo/core/clientImpl/ClientContext.java
+++ b/core/src/main/java/org/apache/accumulo/core/clientImpl/ClientContext.java
@@ -166,7 +166,7 @@ public class ClientContext implements AccumuloClient {
       }
 
       @Override
-      public List<String> getManagerLocations() {
+      public List<String> getMasterLocations() {
         return context.getMasterLocations();
       }
 
diff --git a/core/src/main/java/org/apache/accumulo/core/clientImpl/InstanceOperationsImpl.java
b/core/src/main/java/org/apache/accumulo/core/clientImpl/InstanceOperationsImpl.java
index 65be9b5..6dd3e08 100644
--- a/core/src/main/java/org/apache/accumulo/core/clientImpl/InstanceOperationsImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/clientImpl/InstanceOperationsImpl.java
@@ -110,6 +110,11 @@ public class InstanceOperationsImpl implements InstanceOperations {
   }
 
   @Override
+  public List<String> getManagerLocations() {
+    return context.getMasterLocations();
+  }
+
+  @Override
   public List<String> getTabletServers() {
     ZooCache cache = context.getZooCache();
     String path = context.getZooKeeperRoot() + Constants.ZTSERVERS;


Mime
View raw message