keith-turner closed pull request #379: misc performance improvements URL: https://github.com/apache/accumulo/pull/379
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportKey.java b/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportKey.java index 0b24b90951..f1ab501b0a 100644 --- a/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportKey.java +++ b/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportKey.java @@ -18,6 +18,8 @@ import static java.util.Objects.requireNonNull; +import java.util.Objects; + import org.apache.accumulo.core.rpc.SaslConnectionParams; import org.apache.accumulo.core.rpc.SslConnectionParams; import org.apache.accumulo.core.util.HostAndPort; @@ -87,7 +89,7 @@ public boolean equals(Object o) { @Override public int hashCode() { if (hash == -1) - hash = toString().hashCode(); + hash = Objects.hash(server, timeout, sslParams, saslParams); return hash; } diff --git a/core/src/main/java/org/apache/accumulo/core/conf/Property.java b/core/src/main/java/org/apache/accumulo/core/conf/Property.java index f64b9e2312..a72e60e177 100644 --- a/core/src/main/java/org/apache/accumulo/core/conf/Property.java +++ b/core/src/main/java/org/apache/accumulo/core/conf/Property.java @@ -840,7 +840,7 @@ public static boolean isValidTablePropertyKey(String key) { public static final EnumSet<Property> HOT_PATH_PROPERTIES = EnumSet.of(Property.TSERV_CLIENT_TIMEOUT, Property.TSERV_TOTAL_MUTATION_QUEUE_MAX, Property.TSERV_ARCHIVE_WALOGS, Property.GC_TRASH_IGNORE, Property.TSERV_MAJC_DELAY, Property.TABLE_MINC_LOGS_MAX, Property.TSERV_MAJC_MAXCONCURRENT, Property.REPLICATION_WORKER_THREADS, Property.TABLE_DURABILITY, Property.INSTANCE_ZK_TIMEOUT, Property.TABLE_CLASSPATH, - Property.MASTER_METADATA_SUSPENDABLE); + Property.MASTER_METADATA_SUSPENDABLE, Property.TABLE_FAILURES_IGNORE, Property.TABLE_SCAN_MAXMEM); private static final EnumSet<Property> fixedProperties = EnumSet.of(Property.TSERV_CLIENTPORT, Property.TSERV_NATIVEMAP_ENABLED, Property.TSERV_SCAN_MAX_OPENFILES, Property.MASTER_CLIENTPORT, Property.GC_PORT); diff --git a/server/base/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java b/server/base/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java index e5ca006c9a..22bf119e97 100644 --- a/server/base/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java +++ b/server/base/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java @@ -113,13 +113,13 @@ private void audit(TCredentials credentials, ThriftSecurityException ex, String } private void audit(TCredentials credentials, String template, Object... args) { - if (shouldAudit(credentials)) { + if (audit.isInfoEnabled() && shouldAudit(credentials)) { audit.info("operation: success; user: " + credentials.getPrincipal() + ": " + String.format(template, args)); } } private void audit(TCredentials credentials, boolean permitted, String template, Object... args) { - if (shouldAudit(credentials)) { + if (audit.isInfoEnabled() && shouldAudit(credentials)) { String prefix = permitted ? "permitted" : "denied"; audit.info("operation: " + prefix + "; user: " + credentials.getPrincipal() + "; client: " + TServerUtils.clientAddress.get() + "; " + String.format(template, args)); ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services