accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [09/16] git commit: Merging branch up to date
Date Mon, 22 Sep 2014 20:48:09 GMT
Merging branch up to date



git-svn-id: https://svn.apache.org/repos/asf/accumulo/branches/ACCUMULO-CURATOR@1496226 13f79535-47bb-0310-9956-ffa450edef68


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

Branch: refs/heads/ACCUMULO-CURATOR
Commit: 139c18e1e6f933a5b8be38d89865b2147fe04828
Parents: 60395c1 69218e7
Author: John Vines <vines@apache.org>
Authored: Mon Jun 24 21:34:20 2013 +0000
Committer: John Vines <vines@apache.org>
Committed: Mon Jun 24 21:34:20 2013 +0000

----------------------------------------------------------------------
 .../1GB/native-standalone/accumulo-site.xml     |  14 +-
 conf/examples/1GB/standalone/accumulo-site.xml  |  14 +-
 .../2GB/native-standalone/accumulo-site.xml     |  14 +-
 conf/examples/2GB/standalone/accumulo-site.xml  |  14 +-
 .../3GB/native-standalone/accumulo-site.xml     |  14 +-
 conf/examples/3GB/standalone/accumulo-site.xml  |  14 +-
 .../512MB/native-standalone/accumulo-site.xml   |  14 +-
 .../examples/512MB/standalone/accumulo-site.xml |  14 +-
 conf/examples/vfs-classloader/accumulo-site.xml |  14 +-
 .../org/apache/accumulo/core/Constants.java     | 136 +----
 .../apache/accumulo/core/cli/ClientOpts.java    |   7 +-
 .../accumulo/core/client/IteratorSetting.java   |  46 ++
 .../accumulo/core/client/ZooKeeperInstance.java |   3 +-
 .../client/admin/InstanceOperationsImpl.java    |  46 --
 .../core/client/admin/TableOperationsImpl.java  |  10 +-
 .../client/impl/MetadataLocationObtainer.java   |  11 +-
 .../core/client/impl/OfflineScanner.java        |  33 +-
 .../core/client/impl/RootTabletLocator.java     |  38 +-
 .../core/client/impl/TabletLocator.java         |  32 +-
 .../core/client/impl/TabletLocatorImpl.java     |  25 +-
 .../client/impl/TabletServerBatchReader.java    |   3 +-
 .../impl/TabletServerBatchReaderIterator.java   |  11 +-
 .../client/impl/TabletServerBatchWriter.java    |  16 +-
 .../core/client/impl/TimeoutTabletLocator.java  |  19 +-
 .../core/client/impl/thrift/ClientService.java  |  28 +-
 .../core/client/impl/thrift/TDiskUsage.java     |   4 +-
 .../core/client/mapred/InputFormatBase.java     |  20 +-
 .../core/client/mapreduce/InputFormatBase.java  |  20 +-
 .../mapreduce/lib/util/InputConfigurator.java   |   3 +-
 .../accumulo/core/client/mock/MockAccumulo.java |  12 +-
 .../core/client/mock/MockBatchWriter.java       |   3 +
 .../client/mock/MockInstanceOperations.java     |  45 +-
 .../accumulo/core/client/mock/MockTable.java    |   2 +
 .../core/client/mock/MockTableOperations.java   |   6 +-
 .../apache/accumulo/core/conf/Experimental.java |  30 +
 .../apache/accumulo/core/conf/Interpolated.java |  30 +
 .../org/apache/accumulo/core/conf/Property.java | 138 +++--
 .../apache/accumulo/core/conf/Sensitive.java    |  30 +
 .../apache/accumulo/core/data/KeyExtent.java    |  15 +-
 .../org/apache/accumulo/core/data/Value.java    |  18 +-
 .../core/data/thrift/MultiScanResult.java       |  12 +-
 .../accumulo/core/data/thrift/ScanResult.java   |   4 +-
 .../accumulo/core/data/thrift/TMutation.java    |   4 +-
 .../accumulo/core/data/thrift/UpdateErrors.java |   4 +-
 .../accumulo/core/file/FileOperations.java      |   5 +-
 .../core/iterators/OptionDescriber.java         |   2 +-
 .../core/master/thrift/MasterClientService.java |   4 +-
 .../core/master/thrift/MasterMonitorInfo.java   |  12 +-
 .../core/master/thrift/TabletServerStatus.java  |   4 +-
 .../core/master/thrift/TabletSplit.java         |   4 +-
 .../accumulo/core/security/Authorizations.java  |   2 +
 .../core/security/VisibilityInterpreter.java    |  34 --
 .../security/VisibilityInterpreterFactory.java  |  40 --
 .../tabletserver/thrift/ActiveCompaction.java   |   8 +-
 .../core/tabletserver/thrift/ActiveScan.java    |  12 +-
 .../thrift/ConstraintViolationException.java    |   4 +-
 .../tabletserver/thrift/IteratorConfig.java     |   4 +-
 .../thrift/TabletClientService.java             |  52 +-
 .../org/apache/accumulo/core/util/Merge.java    |  23 +-
 .../accumulo/core/util/MetadataTable.java       |  86 ++-
 .../apache/accumulo/core/util/RootTable.java    |  42 ++
 .../accumulo/core/util/TableDiskUsage.java      | 253 ---------
 .../core/util/shell/commands/DUCommand.java     |  45 +-
 .../core/util/shell/commands/FlushCommand.java  |   8 +-
 .../util/shell/commands/GetSplitsCommand.java   |  11 +-
 .../util/shell/commands/OfflineCommand.java     |   6 +-
 .../core/util/shell/commands/OnlineCommand.java |   6 +-
 .../core/util/shell/commands/ScanCommand.java   |  22 +-
 .../accumulo/core/cli/TestClientOpts.java       |   3 +-
 .../core/client/IteratorSettingTest.java        |  92 ++++
 .../accumulo/core/client/admin/FindMaxTest.java |  22 +-
 .../core/client/impl/TabletLocatorImplTest.java |  46 +-
 .../core/client/mock/MockConnectorTest.java     |  60 +-
 .../client/mock/MockTableOperationsTest.java    |   5 +-
 .../core/client/mock/TestBatchScanner821.java   |   6 +-
 .../apache/accumulo/core/conf/PropertyTest.java |  53 +-
 .../accumulo/core/file/FileOperationsTest.java  |  67 +++
 .../user/IntersectingIteratorTest.java          |   4 +-
 .../core/iterators/user/RowFilterTest.java      |  14 +-
 .../accumulo/core/util/MetadataTableTest.java   |  16 +-
 .../shell/command/FormatterCommandTest.java     |  85 +--
 .../accumulo_user_manual.tex                    |   1 +
 .../chapters/multivolume.tex                    |  59 ++
 .../examples/simple/client/RowOperations.java   |  16 +-
 .../minicluster/MiniAccumuloCluster.java        |  19 +-
 .../minicluster/MiniAccumuloConfig.java         |   8 +
 pom.xml                                         |   4 +-
 .../accumulo/proxy/thrift/AccumuloProxy.java    |  92 ++--
 .../accumulo/proxy/thrift/ActiveCompaction.java |   8 +-
 .../accumulo/proxy/thrift/ActiveScan.java       |  12 +-
 .../accumulo/proxy/thrift/BatchScanOptions.java |  16 +-
 .../apache/accumulo/proxy/thrift/DiskUsage.java |   4 +-
 .../accumulo/proxy/thrift/ScanOptions.java      |  12 +-
 .../accumulo/proxy/thrift/ScanResult.java       |   4 +-
 .../org/apache/accumulo/proxy/SimpleTest.java   |   6 +-
 .../org/apache/accumulo/server/Accumulo.java    |  80 +--
 .../apache/accumulo/server/ServerConstants.java |  70 ++-
 .../accumulo/server/client/BulkImporter.java    |   4 +-
 .../server/client/ClientServiceHandler.java     |  18 +-
 .../accumulo/server/client/HdfsZooInstance.java |   3 +-
 .../server/conf/TableConfiguration.java         |   2 +-
 .../server/constraints/MetadataConstraints.java |  41 +-
 .../org/apache/accumulo/server/fs/FileRef.java  |  79 +++
 .../accumulo/server/fs/RandomVolumeChooser.java |  29 +
 .../accumulo/server/fs/VolumeChooser.java       |  22 +
 .../accumulo/server/fs/VolumeManager.java       | 122 ++++
 .../accumulo/server/fs/VolumeManagerImpl.java   | 459 +++++++++++++++
 .../server/gc/GarbageCollectWriteAheadLogs.java | 170 +++---
 .../server/gc/SimpleGarbageCollector.java       | 168 +++---
 .../iterators/MetadataBulkLoadFilter.java       |   3 +-
 .../accumulo/server/logger/LogReader.java       |  30 +-
 .../apache/accumulo/server/master/Master.java   |  93 ++--
 .../server/master/RoundRobinPartitioner.java    |  34 --
 .../server/master/TabletGroupWatcher.java       | 131 ++---
 .../master/balancer/ChaoticLoadBalancer.java    |   9 +-
 .../server/master/recovery/HadoopLogCloser.java |  13 +-
 .../server/master/recovery/LogCloser.java       |   4 +-
 .../server/master/recovery/MapRLogCloser.java   |   6 +-
 .../server/master/recovery/RecoveryManager.java | 101 ++--
 .../accumulo/server/master/state/MergeInfo.java |  32 +-
 .../server/master/state/MergeStats.java         |  54 +-
 .../server/master/state/MetaDataStateStore.java |  33 +-
 .../master/state/MetaDataTableScanner.java      |  44 +-
 .../master/state/RootTabletStateStore.java      |  10 +-
 .../server/master/state/SetGoalState.java       |   8 +-
 .../server/master/state/TServerInstance.java    |  10 +-
 .../master/state/TabletStateChangeIterator.java |   6 +-
 .../server/master/state/TabletStateStore.java   |   5 +
 .../master/state/ZooTabletStateStore.java       |  32 +-
 .../server/master/tableOps/BulkImport.java      |  71 ++-
 .../server/master/tableOps/CompactRange.java    |  40 +-
 .../server/master/tableOps/CreateTable.java     |  23 +-
 .../server/master/tableOps/DeleteTable.java     |  21 +-
 .../server/master/tableOps/ExportTable.java     |  67 +--
 .../server/master/tableOps/ImportTable.java     |  39 +-
 .../server/master/tableOps/TableRangeOp.java    |  36 --
 .../server/master/tableOps/TraceRepo.java       |  32 +-
 .../accumulo/server/metanalysis/FilterMeta.java |   4 +-
 .../accumulo/server/metanalysis/IndexMeta.java  |   6 +-
 .../server/metanalysis/PrintEvents.java         |   4 +-
 .../apache/accumulo/server/monitor/Monitor.java |   9 +-
 .../server/monitor/servlets/TablesServlet.java  |  32 +-
 .../server/problems/ProblemReports.java         |  16 +-
 .../security/AuditedSecurityOperation.java      |  65 ++-
 .../server/security/SecurityConstants.java      |   5 +-
 .../server/security/SecurityOperation.java      |  15 +-
 .../security/handler/InsecurePermHandler.java   |  47 +-
 .../server/security/handler/ZKAuthorizor.java   |   8 +-
 .../server/security/handler/ZKPermHandler.java  |  10 +-
 .../accumulo/server/tabletserver/Compactor.java |  52 +-
 .../server/tabletserver/FileManager.java        |  34 +-
 .../tabletserver/LargestFirstMemoryManager.java |   5 +-
 .../server/tabletserver/MinorCompactor.java     |  16 +-
 .../accumulo/server/tabletserver/Tablet.java    | 546 ++++++++----------
 .../tabletserver/TabletIteratorEnvironment.java |   9 +-
 .../server/tabletserver/TabletServer.java       | 216 +++-----
 .../TabletServerResourceManager.java            |  29 +-
 .../server/tabletserver/log/DfsLogger.java      |  89 +--
 .../server/tabletserver/log/LogSorter.java      |  29 +-
 .../server/tabletserver/log/MultiReader.java    |   9 +-
 .../tabletserver/log/SortedLogRecovery.java     |  27 +-
 .../tabletserver/log/TabletServerLogger.java    |   6 +-
 .../accumulo/server/trace/TraceServer.java      |  12 +-
 .../server/util/AddFilesWithMissingEntries.java |  48 +-
 .../org/apache/accumulo/server/util/Admin.java  |   4 +-
 .../server/util/CheckForMetadataProblems.java   |  31 +-
 .../accumulo/server/util/CountRowKeys.java      |  86 ---
 .../apache/accumulo/server/util/FileUtil.java   | 551 +++++++++++++++++++
 .../server/util/FindOfflineTablets.java         |   9 +-
 .../apache/accumulo/server/util/Initialize.java | 242 ++++----
 .../accumulo/server/util/LocalityCheck.java     |  42 +-
 .../accumulo/server/util/MetadataTable.java     | 512 ++++++++---------
 .../server/util/OfflineMetadataScanner.java     |  31 +-
 .../util/RemoveEntriesForMissingFiles.java      |  26 +-
 .../accumulo/server/util/TableDiskUsage.java    | 243 +++++++-
 .../accumulo/server/util/TabletIterator.java    |  16 +-
 .../accumulo/server/util/TabletOperations.java  |  20 +-
 .../server/util/VerifyTabletAssignments.java    |  13 +-
 .../accumulo/server/util/ZooKeeperMain.java     |   9 +-
 .../constraints/MetadataConstraintsTest.java    |  70 +--
 .../accumulo/server/gc/TestConfirmDeletes.java  |  15 +-
 .../iterators/MetadataBulkLoadFilterTest.java   |  30 +-
 .../accumulo/server/master/TestMergeState.java  |  23 +-
 .../server/master/state/MergeInfoTest.java      |   2 +-
 .../master/state/RootTabletStateStoreTest.java  |   4 +-
 .../tabletserver/CheckTabletMetadataTest.java   |  28 +-
 .../tabletserver/log/MultiReaderTest.java       |  35 +-
 .../tabletserver/log/SortedLogRecoveryTest.java |  33 +-
 .../apache/accumulo/server/util/CloneTest.java  |  82 +--
 .../server/util/TabletIteratorTest.java         |  15 +-
 .../start/classloader/AccumuloClassLoader.java  |  31 ++
 .../accumulo/test/GCLotsOfCandidatesTest.java   |  10 +-
 .../accumulo/test/QueryMetadataTable.java       |  18 +-
 .../continuous/ContinuousStatsCollector.java    |  35 +-
 .../test/continuous/ContinuousWalk.java         |  15 +-
 .../accumulo/test/functional/AddSplitTest.java  |   4 +-
 .../test/functional/BadIteratorMincTest.java    |   6 +-
 .../test/functional/BatchScanSplitTest.java     |   4 +-
 .../test/functional/BatchWriterFlushTest.java   |   6 +-
 .../test/functional/BloomFilterTest.java        |   8 +-
 .../accumulo/test/functional/BulkFileTest.java  |   4 +-
 .../test/functional/ConcurrencyTest.java        |   4 +-
 .../test/functional/ConstraintTest.java         |   5 +-
 .../test/functional/CreateAndUseTest.java       |   8 +-
 .../test/functional/CreateManyScannersTest.java |   4 +-
 .../test/functional/DeleteEverythingTest.java   |   4 +-
 .../test/functional/DeleteRowsSplitTest.java    |  27 +-
 .../test/functional/DeleteRowsTest.java         |   4 +-
 .../test/functional/FunctionalTest.java         |  11 +-
 .../accumulo/test/functional/LargeRowTest.java  |   6 +-
 .../test/functional/LogicalTimeTest.java        |   7 +-
 .../accumulo/test/functional/MergeTest.java     |  11 +-
 .../test/functional/PermissionsTest.java        |  10 +-
 .../accumulo/test/functional/RowDeleteTest.java |   8 +-
 .../accumulo/test/functional/ScanRangeTest.java |   4 +-
 .../test/functional/ServerSideErrorTest.java    |   8 +-
 .../test/functional/SparseColumnFamilyTest.java |   8 +-
 .../test/functional/SplitRecoveryTest.java      |  75 +--
 .../accumulo/test/functional/TimeoutTest.java   |  10 +-
 .../metadata/MetadataBatchScanTest.java         |  27 +-
 .../performance/scan/CollectTabletStats.java    |  54 +-
 .../test/performance/thrift/NullTserver.java    |  22 +-
 .../test/randomwalk/concurrent/AddSplits.java   |   4 +-
 .../test/randomwalk/concurrent/BatchScan.java   |   4 +-
 .../randomwalk/concurrent/CheckBalance.java     |  12 +-
 .../randomwalk/concurrent/IsolatedScan.java     |   4 +-
 .../test/randomwalk/concurrent/Merge.java       |   4 +-
 .../test/randomwalk/concurrent/ScanTable.java   |   4 +-
 .../test/randomwalk/image/ScanMeta.java         |   3 +-
 .../test/randomwalk/multitable/CopyTool.java    |   4 +-
 .../randomwalk/sequential/MapRedVerify.java     |   4 +-
 .../test/randomwalk/shard/DeleteSomeDocs.java   |   6 +-
 .../test/randomwalk/shard/DeleteWord.java       |   6 +-
 .../accumulo/test/randomwalk/shard/Grep.java    |   6 +-
 .../accumulo/test/randomwalk/shard/Reindex.java |   4 +-
 .../accumulo/test/randomwalk/shard/Search.java  |   6 +-
 .../test/randomwalk/shard/VerifyIndex.java      |   6 +-
 .../apache/accumulo/test/AuditMessageTest.java  |  30 +-
 .../org/apache/accumulo/test/MetaSplitTest.java |  24 +-
 .../apache/accumulo/test/ShellServerTest.java   |  31 +-
 .../test/TestAccumuloSplitRecovery.java         |  27 +-
 .../org/apache/accumulo/test/VolumeTest.java    | 118 ++++
 .../accumulo/test/iterator/RegExTest.java       |   6 +-
 test/system/auto/TestUtils.py                   |   2 +
 test/system/auto/run.py                         |   9 +-
 test/system/auto/simple/examples.py             |   6 +-
 test/system/auto/simple/readwrite.py            |   2 +-
 .../instrument/receivers/ZooSpanClient.java     |  12 +-
 248 files changed, 5177 insertions(+), 3812 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/139c18e1/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
index d1f7239,087fc88..5fff3a2
--- a/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
@@@ -36,11 -36,10 +36,12 @@@ import org.apache.accumulo.core.util.Ar
  import org.apache.accumulo.core.util.ByteBufferUtil;
  import org.apache.accumulo.core.util.CachedConfiguration;
  import org.apache.accumulo.core.util.OpTimer;
+ import org.apache.accumulo.core.util.RootTable;
  import org.apache.accumulo.core.util.TextUtil;
  import org.apache.accumulo.core.zookeeper.ZooUtil;
 +import org.apache.accumulo.fate.curator.CuratorUtil;
  import org.apache.accumulo.fate.zookeeper.ZooCache;
 +import org.apache.curator.framework.recipes.cache.ChildData;
  import org.apache.hadoop.fs.FileStatus;
  import org.apache.hadoop.fs.FileSystem;
  import org.apache.hadoop.fs.Path;
@@@ -176,11 -175,11 +177,11 @@@ public class ZooKeeperInstance implemen
    
    @Override
    public String getRootTabletLocation() {
-     String zRootLocPath = ZooUtil.getRoot(this) + Constants.ZROOT_TABLET_LOCATION;
+     String zRootLocPath = ZooUtil.getRoot(this) + RootTable.ZROOT_TABLET_LOCATION;
      
      OpTimer opTimer = new OpTimer(log, Level.TRACE).start("Looking up root tablet location
in zookeeper.");
 -    byte[] loc = zooCache.get(zRootLocPath);
 -    opTimer.stop("Found root tablet at " + (loc == null ? null : new String(loc)) + " in
%DURATION%");
 +    ChildData loc = zooCache.get(zRootLocPath);
 +    opTimer.stop("Found root tablet at " + (loc == null ? null : new String(loc.getData()))
+ " in %DURATION%");
      
      if (loc == null) {
        return null;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/139c18e1/core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperationsImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/139c18e1/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/139c18e1/proxy/src/test/java/org/apache/accumulo/proxy/SimpleTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/139c18e1/server/src/main/java/org/apache/accumulo/server/client/HdfsZooInstance.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/139c18e1/server/src/main/java/org/apache/accumulo/server/conf/TableConfiguration.java
----------------------------------------------------------------------
diff --cc server/src/main/java/org/apache/accumulo/server/conf/TableConfiguration.java
index 456cf34,4c58153..70b8676
--- a/server/src/main/java/org/apache/accumulo/server/conf/TableConfiguration.java
+++ b/server/src/main/java/org/apache/accumulo/server/conf/TableConfiguration.java
@@@ -52,7 -51,10 +52,6 @@@ public class TableConfiguration extend
      this.parent = parent;
      
      this.observers = Collections.synchronizedSet(new HashSet<ConfigurationObserver>());
-     
 -  }
 -  
 -  private static ZooCache getTablePropCache() {
 -    Instance inst = HdfsZooInstance.getInstance();
      if (tablePropCache == null)
        synchronized (TableConfiguration.class) {
          if (tablePropCache == null)

http://git-wip-us.apache.org/repos/asf/accumulo/blob/139c18e1/server/src/main/java/org/apache/accumulo/server/master/Master.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/139c18e1/server/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/139c18e1/server/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/139c18e1/server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthorizor.java
----------------------------------------------------------------------
diff --cc server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthorizor.java
index 554aaf1,848dd80..79e1fe7
--- a/server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthorizor.java
+++ b/server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthorizor.java
@@@ -61,10 -61,10 +61,10 @@@ public class ZKAuthorizor implements Au
    }
    
    public Authorizations getCachedUserAuthorizations(String user) {
 -    byte[] authsBytes = zooCache.get(ZKUserPath + "/" + user + ZKUserAuths);
 +    byte[] authsBytes = zooCache.get(ZKUserPath + "/" + user + ZKUserAuths).getData();
      if (authsBytes != null)
        return ZKSecurityTool.convertAuthorizations(authsBytes);
-     return Constants.NO_AUTHS;
+     return Authorizations.EMPTY;
    }
    
    @Override

http://git-wip-us.apache.org/repos/asf/accumulo/blob/139c18e1/server/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/139c18e1/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java
----------------------------------------------------------------------
diff --cc server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java
index 1dba361,4531fed..ec2d17e
--- a/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java
+++ b/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java
@@@ -90,12 -89,13 +89,11 @@@ import org.apache.zookeeper.KeeperExcep
  public class MetadataTable extends org.apache.accumulo.core.util.MetadataTable {
    
    private static final Text EMPTY_TEXT = new Text();
+   private static Map<TCredentials,Writer> root_tables = new HashMap<TCredentials,Writer>();
    private static Map<TCredentials,Writer> metadata_tables = new HashMap<TCredentials,Writer>();
    private static final Logger log = Logger.getLogger(MetadataTable.class);
 -  
 -  private static final int SAVE_ROOT_TABLET_RETRIES = 3;
 -  
 +    
-   private MetadataTable() {
-     
-   }
+   private MetadataTable() {}
    
    public synchronized static Writer getMetadataTable(TCredentials credentials) {
      Writer metadataTable = metadata_tables.get(credentials);
@@@ -317,14 -322,31 +320,15 @@@
      return results;
    }
    
-   public static SortedMap<String,DataFileValue> getDataFileSizes(KeyExtent extent,
TCredentials credentials) {
-     TreeMap<String,DataFileValue> sizes = new TreeMap<String,DataFileValue>();
 -  public static boolean recordRootTabletLocation(String address) {
 -    IZooReaderWriter zoo = ZooReaderWriter.getInstance();
 -    for (int i = 0; i < SAVE_ROOT_TABLET_RETRIES; i++) {
 -      try {
 -        log.info("trying to write root tablet location to ZooKeeper as " + address);
 -        String zRootLocPath = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + RootTable.ZROOT_TABLET_LOCATION;
 -        zoo.putPersistentData(zRootLocPath, address.getBytes(), NodeExistsPolicy.OVERWRITE);
 -        return true;
 -      } catch (Exception e) {
 -        log.error("Master: unable to save root tablet location in zookeeper. exception:
" + e, e);
 -      }
 -    }
 -    log.error("Giving up after " + SAVE_ROOT_TABLET_RETRIES + " retries");
 -    return false;
 -  }
 -  
+   public static SortedMap<FileRef,DataFileValue> getDataFileSizes(KeyExtent extent,
TCredentials credentials) throws IOException {
+     TreeMap<FileRef,DataFileValue> sizes = new TreeMap<FileRef,DataFileValue>();
      
-     Scanner mdScanner = new ScannerImpl(HdfsZooInstance.getInstance(), credentials, Constants.METADATA_TABLE_ID,
Constants.NO_AUTHS);
-     mdScanner.fetchColumnFamily(Constants.METADATA_DATAFILE_COLUMN_FAMILY);
+     Scanner mdScanner = new ScannerImpl(HdfsZooInstance.getInstance(), credentials, ID,
Authorizations.EMPTY);
+     mdScanner.fetchColumnFamily(DATAFILE_COLUMN_FAMILY);
      Text row = extent.getMetadataEntry();
+     VolumeManager fs = VolumeManagerImpl.get();
      
-     Key endKey = new Key(row, Constants.METADATA_DATAFILE_COLUMN_FAMILY, new Text(""));
+     Key endKey = new Key(row, DATAFILE_COLUMN_FAMILY, new Text(""));
      endKey = endKey.followingKey(PartialKey.ROW_COLFAM);
      
      mdScanner.setRange(new Range(new Key(row), endKey));


Mime
View raw message