accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject accumulo git commit: ACCUMULO-4453 Remove constructor code duplication and spammy DEBUG log message
Date Fri, 07 Oct 2016 17:00:52 GMT
Repository: accumulo
Updated Branches:
  refs/heads/master 9dddeed88 -> e75147c13


ACCUMULO-4453 Remove constructor code duplication and spammy DEBUG log message

Closes apache/accumulo#161


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/e75147c1
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/e75147c1
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/e75147c1

Branch: refs/heads/master
Commit: e75147c136c709bb8056d2a00bacad6c5544e553
Parents: 9dddeed
Author: Josh Elser <elserj@apache.org>
Authored: Thu Oct 6 14:00:01 2016 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Fri Oct 7 13:00:32 2016 -0400

----------------------------------------------------------------------
 .../accumulo/tserver/tablet/ScanDataSource.java | 32 ++++++++------------
 1 file changed, 13 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/e75147c1/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/ScanDataSource.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/ScanDataSource.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/ScanDataSource.java
index dd8c020..327b084 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/ScanDataSource.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/ScanDataSource.java
@@ -74,32 +74,26 @@ class ScanDataSource implements DataSource {
 
   ScanDataSource(Tablet tablet, Authorizations authorizations, byte[] defaultLabels, HashSet<Column>
columnSet, List<IterInfo> ssiList,
       Map<String,Map<String,String>> ssio, AtomicBoolean interruptFlag, SamplerConfiguration
samplerConfig, long batchTimeOut, String context) {
-    this.tablet = tablet;
-    expectedDeletionCount = tablet.getDataSourceDeletions();
-    this.options = new ScanOptions(-1, authorizations, defaultLabels, columnSet, ssiList,
ssio, interruptFlag, false, samplerConfig, batchTimeOut, context);
-    this.interruptFlag = interruptFlag;
-    this.loadIters = true;
-    log.debug("new scan data source, tablet: {}, options: {}, interruptFlag: {}, loadIterators:
{}", this.tablet, this.options, this.interruptFlag,
-        this.loadIters);
+    this(tablet, tablet.getDataSourceDeletions(), new ScanOptions(-1, authorizations, defaultLabels,
columnSet, ssiList, ssio, interruptFlag, false,
+        samplerConfig, batchTimeOut, context), interruptFlag, true);
   }
 
   ScanDataSource(Tablet tablet, ScanOptions options) {
-    this.tablet = tablet;
-    expectedDeletionCount = tablet.getDataSourceDeletions();
-    this.options = options;
-    this.interruptFlag = options.getInterruptFlag();
-    this.loadIters = true;
-    log.debug("new scan data source, tablet: {}, options: {}, interruptFlag: {}, loadIterators:
{}", this.tablet, this.options, this.interruptFlag,
-        this.loadIters);
+    this(tablet, tablet.getDataSourceDeletions(), options, options.getInterruptFlag(), true);
   }
 
   ScanDataSource(Tablet tablet, Authorizations authorizations, byte[] defaultLabels, AtomicBoolean
iFlag) {
+    this(tablet, tablet.getDataSourceDeletions(), new ScanOptions(-1, authorizations, defaultLabels,
EMPTY_COLS, null, null, iFlag, false, null, -1, null),
+        iFlag, false);
+  }
+
+  ScanDataSource(Tablet tablet, long expectedDeletionCount, ScanOptions options, AtomicBoolean
interruptFlag, boolean loadIters) {
     this.tablet = tablet;
-    expectedDeletionCount = tablet.getDataSourceDeletions();
-    this.options = new ScanOptions(-1, authorizations, defaultLabels, EMPTY_COLS, null, null,
iFlag, false, null, -1, null);
-    this.interruptFlag = iFlag;
-    this.loadIters = false;
-    log.debug("new scan data source, tablet: {}, options: {}, interruptFlag: {}, loadIterators:
{}", this.tablet, this.options, this.interruptFlag,
+    this.expectedDeletionCount = expectedDeletionCount;
+    this.options = options;
+    this.interruptFlag = interruptFlag;
+    this.loadIters = loadIters;
+    log.trace("new scan data source, tablet: {}, options: {}, interruptFlag: {}, loadIterators:
{}", this.tablet, this.options, this.interruptFlag,
         this.loadIters);
   }
 


Mime
View raw message