Return-Path: X-Original-To: apmail-accumulo-notifications-archive@minotaur.apache.org Delivered-To: apmail-accumulo-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DEABC19953 for ; Thu, 21 Apr 2016 14:17:25 +0000 (UTC) Received: (qmail 70129 invoked by uid 500); 21 Apr 2016 14:17:25 -0000 Delivered-To: apmail-accumulo-notifications-archive@accumulo.apache.org Received: (qmail 70079 invoked by uid 500); 21 Apr 2016 14:17:25 -0000 Mailing-List: contact notifications-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jira@apache.org Delivered-To: mailing list notifications@accumulo.apache.org Received: (qmail 69887 invoked by uid 99); 21 Apr 2016 14:17:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Apr 2016 14:17:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 7F8EA2C1F5D for ; Thu, 21 Apr 2016 14:17:25 +0000 (UTC) Date: Thu, 21 Apr 2016 14:17:25 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: notifications@accumulo.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ACCUMULO-4195) Generalized configuration object for Accumulo rfile interaction MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/ACCUMULO-4195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15251953#comment-15251953 ] ASF GitHub Bot commented on ACCUMULO-4195: ------------------------------------------ Github user keith-turner commented on a diff in the pull request: https://github.com/apache/accumulo/pull/95#discussion_r60587760 --- Diff: core/src/main/java/org/apache/accumulo/core/file/DispatchingFileFactory.java --- @@ -60,78 +54,54 @@ private FileOperations findFileFactory(String file) { } } - @Override - public FileSKVIterator openIndex(String file, FileSystem fs, Configuration conf, AccumuloConfiguration acuconf) throws IOException { - return findFileFactory(file).openIndex(file, fs, conf, acuconf, null, null); - } - - @Override - public FileSKVIterator openReader(String file, boolean seekToBeginning, FileSystem fs, Configuration conf, RateLimiter readLimiter, - AccumuloConfiguration acuconf) throws IOException { - FileSKVIterator iter = findFileFactory(file).openReader(file, seekToBeginning, fs, conf, readLimiter, acuconf, null, null); - if (acuconf.getBoolean(Property.TABLE_BLOOM_ENABLED)) { - return new BloomFilterLayer.Reader(iter, acuconf); + /** If the table configuration disallows caching, rewrite the options object to not pass the caches. */ + private static > T filterCaches(T input) { + BlockCache indexCache = input.getIndexCache(); + BlockCache dataCache = input.getDataCache(); + if (!input.getTableConfiguration().getBoolean(Property.TABLE_INDEXCACHE_ENABLED)) { + indexCache = null; --- End diff -- Nevemind. I thought this had no impact, but I was looking at the subtracted lines of the diff. Now I see that it does have an impact. > Generalized configuration object for Accumulo rfile interaction > --------------------------------------------------------------- > > Key: ACCUMULO-4195 > URL: https://issues.apache.org/jira/browse/ACCUMULO-4195 > Project: Accumulo > Issue Type: Improvement > Reporter: Josh Elser > Assignee: Shawn Walker > Fix For: 1.8.0 > > > Taken from https://github.com/apache/accumulo/pull/90/files#r59489073 > On [~ShawnWalker]'s PR for ACCUMULO-4187 which adds rate-limiting on major compactions, we noted that many of the changes were related to passing an extra argument (RateLimiter) around through all of the code which is related to file interaction. > It would be nice to move to a centralized configuration object instead of having to add a new argument every time some new feature is added to the file-path. -- This message was sent by Atlassian JIRA (v6.3.4#6332)