accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1328080 - in /accumulo/branches/1.4: ./ src/core/ src/server/ src/server/src/main/java/org/apache/accumulo/server/tabletserver/ src/server/src/main/java/org/apache/accumulo/server/util/ test/system/auto/stress/
Date Thu, 19 Apr 2012 19:05:27 GMT
Author: ecn
Date: Thu Apr 19 19:05:26 2012
New Revision: 1328080

URL: http://svn.apache.org/viewvc?rev=1328080&view=rev
Log:
ACCUMULO-542: merge to 1.4

Added:
    accumulo/branches/1.4/test/system/auto/stress/bigRootTablet.py
      - copied unchanged from r1328076, accumulo/branches/1.3/test/system/auto/stress/bigRootTablet.py
Modified:
    accumulo/branches/1.4/   (props changed)
    accumulo/branches/1.4/src/core/   (props changed)
    accumulo/branches/1.4/src/server/   (props changed)
    accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
    accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java

Propchange: accumulo/branches/1.4/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.3:r1328076

Propchange: accumulo/branches/1.4/src/core/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.3/src/core:r1328076

Propchange: accumulo/branches/1.4/src/server/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.3/src/server:r1328076

Modified: accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java?rev=1328080&r1=1328079&r2=1328080&view=diff
==============================================================================
--- accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
(original)
+++ accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
Thu Apr 19 19:05:26 2012
@@ -38,7 +38,6 @@ import java.util.Map.Entry;
 import java.util.PriorityQueue;
 import java.util.Set;
 import java.util.SortedMap;
-import java.util.SortedSet;
 import java.util.TreeMap;
 import java.util.TreeSet;
 import java.util.concurrent.atomic.AtomicBoolean;
@@ -1143,10 +1142,6 @@ public class Tablet {
     
     if (extent.equals(Constants.ROOT_TABLET_EXTENT)) {
       return null;
-    } else if (extent.getTableId().toString().equals(Constants.METADATA_TABLE_ID)) {
-      SortedSet<Column> columns = new TreeSet<Column>();
-      columns.add(Constants.METADATA_TIME_COLUMN.toColumn());
-      entries = MetadataTable.getRootMetadataDataEntries(extent, columns, SecurityConstants.getSystemCredentials());
     } else {
       entries = new TreeMap<Key,Value>();
       Text rowName = extent.getMetadataEntry();
@@ -1188,47 +1183,43 @@ public class Tablet {
       
       SortedMap<Key,Value> datafilesMetadata;
       
-      if (extent.getTableId().toString().equals(Constants.METADATA_TABLE_ID)) {
-        datafilesMetadata = MetadataTable.getRootMetadataDataFileEntries(extent, SecurityConstants.getSystemCredentials());
+      Text rowName = extent.getMetadataEntry();
+      
+      if (tabletsKeyValues != null && tabletsKeyValues.size() > 0) {
+        datafilesMetadata = new TreeMap<Key,Value>();
+        for (Entry<Key,Value> entry : tabletsKeyValues.entrySet()) {
+          if (entry.getKey().compareRow(rowName) == 0 && entry.getKey().compareColumnFamily(Constants.METADATA_DATAFILE_COLUMN_FAMILY)
== 0) {
+            datafilesMetadata.put(new Key(entry.getKey()), new Value(entry.getValue()));
+          }
+        }
       } else {
         
-        Text rowName = extent.getMetadataEntry();
+        ScannerImpl mdScanner = new ScannerImpl(HdfsZooInstance.getInstance(), SecurityConstants.getSystemCredentials(),
Constants.METADATA_TABLE_ID,
+            Constants.NO_AUTHS);
         
-        if (tabletsKeyValues != null && tabletsKeyValues.size() > 0) {
-          datafilesMetadata = new TreeMap<Key,Value>();
-          for (Entry<Key,Value> entry : tabletsKeyValues.entrySet()) {
-            if (entry.getKey().compareRow(rowName) == 0 && entry.getKey().compareColumnFamily(Constants.METADATA_DATAFILE_COLUMN_FAMILY)
== 0) {
-              datafilesMetadata.put(new Key(entry.getKey()), new Value(entry.getValue()));
-            }
-          }
-        } else {
-          
-          ScannerImpl mdScanner = new ScannerImpl(HdfsZooInstance.getInstance(), SecurityConstants.getSystemCredentials(),
Constants.METADATA_TABLE_ID,
-              Constants.NO_AUTHS);
-          
-          // Commented out because when no data file is present, each tablet will scan through
metadata table and return nothing
-          // reduced batch size to improve performance
-          // changed here after endKeys were implemented from 10 to 1000
-          mdScanner.setBatchSize(1000);
-          
-          // leave these in, again, now using endKey for safety
-          mdScanner.fetchColumnFamily(Constants.METADATA_DATAFILE_COLUMN_FAMILY);
-          
-          mdScanner.setRange(new Range(rowName));
-          
-          datafilesMetadata = new TreeMap<Key,Value>();
+        // Commented out because when no data file is present, each tablet will scan through
metadata table and return nothing
+        // reduced batch size to improve performance
+        // changed here after endKeys were implemented from 10 to 1000
+        mdScanner.setBatchSize(1000);
+        
+        // leave these in, again, now using endKey for safety
+        mdScanner.fetchColumnFamily(Constants.METADATA_DATAFILE_COLUMN_FAMILY);
+        
+        mdScanner.setRange(new Range(rowName));
+        
+        datafilesMetadata = new TreeMap<Key,Value>();
+        
+        for (Entry<Key,Value> entry : mdScanner) {
           
-          for (Entry<Key,Value> entry : mdScanner) {
-            
-            if (entry.getKey().compareRow(rowName) != 0) {
-              break;
-            }
-            
-            datafilesMetadata.put(new Key(entry.getKey()), new Value(entry.getValue()));
+          if (entry.getKey().compareRow(rowName) != 0) {
+            break;
           }
+          
+          datafilesMetadata.put(new Key(entry.getKey()), new Value(entry.getValue()));
         }
       }
       
+
       Iterator<Entry<Key,Value>> dfmdIter = datafilesMetadata.entrySet().iterator();
       
       while (dfmdIter.hasNext()) {

Modified: accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java?rev=1328080&r1=1328079&r2=1328080&view=diff
==============================================================================
--- accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java
(original)
+++ accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java
Thu Apr 19 19:05:26 2012
@@ -341,13 +341,13 @@ public class MetadataTable extends org.a
    * convenience method for reading a metadata tablet's data file entries from the root tablet
    * 
    */
-  public static SortedMap<Key,Value> getRootMetadataDataFileEntries(KeyExtent extent,
AuthInfo credentials) {
+  private static SortedMap<Key,Value> getRootMetadataDataFileEntries(KeyExtent extent,
AuthInfo credentials) {
     SortedSet<Column> columns = new TreeSet<Column>();
     columns.add(new Column(TextUtil.getBytes(Constants.METADATA_DATAFILE_COLUMN_FAMILY),
null, null));
     return getRootMetadataDataEntries(extent, columns, credentials);
   }
   
-  public static SortedMap<Key,Value> getRootMetadataDataEntries(KeyExtent extent, SortedSet<Column>
columns, AuthInfo credentials) {
+  private static SortedMap<Key,Value> getRootMetadataDataEntries(KeyExtent extent,
SortedSet<Column> columns, AuthInfo credentials) {
     
     try {
       SortedMap<Key,Value> entries = new TreeMap<Key,Value>();



Mime
View raw message