accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject [accumulo] 01/01: Merge branch '1.8'
Date Fri, 09 Feb 2018 00:43:19 GMT
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 8784b0c5e23433ffcc6e810e09c0193dc0863bcc
Merge: a4ff798 3a6f0d7
Author: Keith Turner <kturner@apache.org>
AuthorDate: Thu Feb 8 19:40:32 2018 -0500

    Merge branch '1.8'

 .../core/client/impl/ThriftTransportKey.java       |  4 +-
 .../org/apache/accumulo/core/conf/Property.java    |  2 +-
 .../server/security/AuditedSecurityOperation.java  |  4 +-
 .../org/apache/accumulo/tserver/FileManager.java   | 45 ++++++++++------------
 4 files changed, 26 insertions(+), 29 deletions(-)

diff --cc server/base/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java
index 81fb76f,22bf119..0cda367
--- 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
@@@ -115,16 -113,16 +115,16 @@@ public class AuditedSecurityOperation e
    }
  
    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));
 +      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));
 +      audit
 +          .info("operation: {}; user: {}; client: {}; {}", prefix, credentials.getPrincipal(),
TServerUtils.clientAddress.get(), String.format(template, args));
      }
    }
  
diff --cc server/tserver/src/main/java/org/apache/accumulo/tserver/FileManager.java
index d311031,2aaad39..0ac899e
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/FileManager.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/FileManager.java
@@@ -317,9 -311,7 +311,8 @@@ public class FileManager 
          FileSystem ns = fs.getVolumeByPath(path).getFileSystem();
          // log.debug("Opening "+file + " path " + path);
          FileSKVIterator reader = FileOperations.getInstance().newReaderBuilder().forFile(path.toString(),
ns, ns.getConf())
 -            .withTableConfiguration(context.getServerConfigurationFactory().getTableConfiguration(tablet)).withBlockCache(dataCache,
indexCache).build();
 +            .withTableConfiguration(context.getServerConfigurationFactory().getTableConfiguration(tablet.getTableId())).withBlockCache(dataCache,
indexCache)
 +            .build();
-         reservedFiles.add(reader);
          readersReserved.put(reader, file);
        } catch (Exception e) {
  
@@@ -330,10 -322,10 +323,10 @@@
            if (!tablet.isMeta()) {
              filePermits.release(1);
            }
 -          log.warn("Failed to open file {} {}  continuing...", file, e.getMessage());
 +          log.warn("Failed to open file {} {} continuing...", file, e.getMessage(), e);
          } else {
            // close whatever files were opened
-           closeReaders(reservedFiles);
+           closeReaders(readersReserved.keySet());
  
            if (!tablet.isMeta()) {
              filePermits.release(files.size());

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

Mime
View raw message