You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by kt...@apache.org on 2018/02/15 03:29:48 UTC

[accumulo] branch master updated (afed8a9 -> 5d07cdb)

This is an automated email from the ASF dual-hosted git repository.

kturner pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo.git.


    from afed8a9  Merge branch '1.8'
     add 13de822  fixed javadoc warning and findbugs complaint
     new bf3634c  Merge branch '1.8'
     new 5d07cdb  made modernizer happy

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../accumulo/core/client/impl/ClientContext.java      | 19 ++++++++++---------
 .../apache/accumulo/fate/zookeeper/ZooCacheTest.java  |  3 +--
 .../accumulo/server/conf/TableConfiguration.java      |  3 +--
 3 files changed, 12 insertions(+), 13 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
kturner@apache.org.

[accumulo] 02/02: made modernizer happy

Posted by kt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 5d07cdb66a368ffa8f306be08dcf2d12972c4906
Author: Keith Turner <kt...@apache.org>
AuthorDate: Wed Feb 14 22:29:39 2018 -0500

    made modernizer happy
---
 .../accumulo/core/client/impl/ClientContext.java      | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/ClientContext.java b/core/src/main/java/org/apache/accumulo/core/client/impl/ClientContext.java
index 1fec4a3..49c5750 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/ClientContext.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/ClientContext.java
@@ -24,6 +24,7 @@ import java.util.Iterator;
 import java.util.Map;
 import java.util.concurrent.TimeUnit;
 import java.util.function.Predicate;
+import java.util.function.Supplier;
 
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
@@ -42,7 +43,6 @@ import org.apache.accumulo.core.security.thrift.TCredentials;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.base.Supplier;
 import com.google.common.base.Suppliers;
 
 /**
@@ -68,6 +68,11 @@ public class ClientContext {
   private Supplier<SslConnectionParams> sslSupplier;
   private TCredentials rpcCreds;
 
+  private static <T> Supplier<T> memoizeWithExpiration(Supplier<T> s) {
+    //This insanity exists to make modernizer plugin happy.  We are living in the future now.
+    return () -> Suppliers.memoizeWithExpiration(() -> s.get(), 100, TimeUnit.MILLISECONDS).get();
+  }
+
   /**
    * Instantiate a client context
    */
@@ -90,10 +95,6 @@ public class ClientContext {
     rpcConf = requireNonNull(serverConf, "serverConf is null");
     clientConf = null;
 
-    timeoutSupplier = () -> getConfiguration().getTimeInMillis(Property.GENERAL_RPC_TIMEOUT);
-
-    sslSupplier = () -> SslConnectionParams.forClient(getConfiguration());
-
     saslSupplier = new Supplier<SaslConnectionParams>() {
       @Override
       public SaslConnectionParams get() {
@@ -111,10 +112,10 @@ public class ClientContext {
         return new SaslConnectionParams(conf, getCredentials().getToken());
       }
     };
-    
-    timeoutSupplier = Suppliers.memoizeWithExpiration(timeoutSupplier, 100, TimeUnit.MILLISECONDS);
-    sslSupplier = Suppliers.memoizeWithExpiration(sslSupplier, 100, TimeUnit.MILLISECONDS);
-    saslSupplier = Suppliers.memoizeWithExpiration(saslSupplier, 100, TimeUnit.MILLISECONDS);
+
+    timeoutSupplier = memoizeWithExpiration(() -> getConfiguration().getTimeInMillis(Property.GENERAL_RPC_TIMEOUT));
+    sslSupplier = memoizeWithExpiration(() -> SslConnectionParams.forClient(getConfiguration()));
+    saslSupplier = memoizeWithExpiration(saslSupplier);
 
   }
 

-- 
To stop receiving notification emails like this one, please contact
kturner@apache.org.

[accumulo] 01/02: Merge branch '1.8'

Posted by kt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit bf3634ca4d584e66177dcea3f9763c93f0503f97
Merge: afed8a9 13de822
Author: Keith Turner <kt...@apache.org>
AuthorDate: Wed Feb 14 21:50:35 2018 -0500

    Merge branch '1.8'

 .../src/test/java/org/apache/accumulo/fate/zookeeper/ZooCacheTest.java | 3 +--
 .../main/java/org/apache/accumulo/server/conf/TableConfiguration.java  | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)


-- 
To stop receiving notification emails like this one, please contact
kturner@apache.org.