You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ec...@apache.org on 2013/06/19 17:57:14 UTC
svn commit: r1494671 [6/6] - in /accumulo/branches/ACCUMULO-118: ./
assemble/ core/ core/src/main/java/org/apache/accumulo/core/
core/src/main/java/org/apache/accumulo/core/client/
core/src/main/java/org/apache/accumulo/core/client/admin/ core/src/main...
Modified: accumulo/branches/ACCUMULO-118/test/src/test/java/org/apache/accumulo/test/TestAccumuloSplitRecovery.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-118/test/src/test/java/org/apache/accumulo/test/TestAccumuloSplitRecovery.java?rev=1494671&r1=1494670&r2=1494671&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-118/test/src/test/java/org/apache/accumulo/test/TestAccumuloSplitRecovery.java (original)
+++ accumulo/branches/ACCUMULO-118/test/src/test/java/org/apache/accumulo/test/TestAccumuloSplitRecovery.java Wed Jun 19 15:57:11 2013
@@ -20,7 +20,6 @@ import static org.junit.Assert.assertEqu
import java.util.Map.Entry;
-import org.apache.accumulo.core.Constants;
import org.apache.accumulo.core.client.BatchWriter;
import org.apache.accumulo.core.client.BatchWriterConfig;
import org.apache.accumulo.core.client.Connector;
@@ -35,6 +34,7 @@ import org.apache.accumulo.core.data.Ran
import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.security.Authorizations;
import org.apache.accumulo.core.security.TablePermission;
+import org.apache.accumulo.core.util.MetadataTable;
import org.apache.accumulo.core.util.UtilWaitThread;
import org.apache.accumulo.minicluster.MiniAccumuloCluster;
import org.apache.hadoop.io.Text;
@@ -71,9 +71,9 @@ public class TestAccumuloSplitRecovery {
boolean isOffline(String tablename, Connector connector) throws TableNotFoundException {
String tableId = connector.tableOperations().tableIdMap().get(tablename);
- Scanner scanner = connector.createScanner(Constants.METADATA_TABLE_NAME, Authorizations.EMPTY);
+ Scanner scanner = connector.createScanner(MetadataTable.NAME, Authorizations.EMPTY);
scanner.setRange(new Range(new Text(tableId + ";"), new Text(tableId + "<")));
- scanner.fetchColumnFamily(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY);
+ scanner.fetchColumnFamily(MetadataTable.CURRENT_LOCATION_COLUMN_FAMILY);
for (@SuppressWarnings("unused")
Entry<Key,Value> entry : scanner) {
return false;
@@ -101,32 +101,32 @@ public class TestAccumuloSplitRecovery {
UtilWaitThread.sleep(200);
// poke a partial split into the !METADATA table
- connector.securityOperations().grantTablePermission("root", Constants.METADATA_TABLE_NAME, TablePermission.WRITE);
+ connector.securityOperations().grantTablePermission("root", MetadataTable.NAME, TablePermission.WRITE);
String tableId = connector.tableOperations().tableIdMap().get(TABLE);
KeyExtent extent = new KeyExtent(new Text(tableId), null, new Text("b"));
Mutation m = extent.getPrevRowUpdateMutation();
- Constants.METADATA_SPLIT_RATIO_COLUMN.put(m, new Value(Double.toString(0.5).getBytes()));
- Constants.METADATA_OLD_PREV_ROW_COLUMN.put(m, KeyExtent.encodePrevEndRow(null));
- bw = connector.createBatchWriter(Constants.METADATA_TABLE_NAME, new BatchWriterConfig());
+ MetadataTable.SPLIT_RATIO_COLUMN.put(m, new Value(Double.toString(0.5).getBytes()));
+ MetadataTable.OLD_PREV_ROW_COLUMN.put(m, KeyExtent.encodePrevEndRow(null));
+ bw = connector.createBatchWriter(MetadataTable.NAME, new BatchWriterConfig());
bw.addMutation(m);
if (tn == 1) {
bw.flush();
- Scanner scanner = connector.createScanner(Constants.METADATA_TABLE_NAME, Authorizations.EMPTY);
+ Scanner scanner = connector.createScanner(MetadataTable.NAME, Authorizations.EMPTY);
scanner.setRange(extent.toMetadataRange());
- scanner.fetchColumnFamily(Constants.METADATA_DATAFILE_COLUMN_FAMILY);
+ scanner.fetchColumnFamily(MetadataTable.DATAFILE_COLUMN_FAMILY);
KeyExtent extent2 = new KeyExtent(new Text(tableId), new Text("b"), null);
m = extent2.getPrevRowUpdateMutation();
- Constants.METADATA_DIRECTORY_COLUMN.put(m, new Value("/t2".getBytes()));
- Constants.METADATA_TIME_COLUMN.put(m, new Value("M0".getBytes()));
+ MetadataTable.DIRECTORY_COLUMN.put(m, new Value("/t2".getBytes()));
+ MetadataTable.TIME_COLUMN.put(m, new Value("M0".getBytes()));
for (Entry<Key,Value> entry : scanner) {
- m.put(Constants.METADATA_DATAFILE_COLUMN_FAMILY, entry.getKey().getColumnQualifier(), entry.getValue());
+ m.put(MetadataTable.DATAFILE_COLUMN_FAMILY, entry.getKey().getColumnQualifier(), entry.getValue());
}
bw.addMutation(m);
Modified: accumulo/branches/ACCUMULO-118/test/system/auto/TestUtils.py
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-118/test/system/auto/TestUtils.py?rev=1494671&r1=1494670&r2=1494671&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-118/test/system/auto/TestUtils.py (original)
+++ accumulo/branches/ACCUMULO-118/test/system/auto/TestUtils.py Wed Jun 19 15:57:11 2013
@@ -457,6 +457,8 @@ class TestUtilsMixin:
out,err = handle.communicate()
self.assert_(handle.returncode==0)
for line in out.split('\n') :
+ if line.find("=>") < 0:
+ continue
left, right = line.split("=>")
left = left.strip()
right = right.strip()
Modified: accumulo/branches/ACCUMULO-118/test/system/auto/simple/examples.py
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-118/test/system/auto/simple/examples.py?rev=1494671&r1=1494670&r2=1494671&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-118/test/system/auto/simple/examples.py (original)
+++ accumulo/branches/ACCUMULO-118/test/system/auto/simple/examples.py Wed Jun 19 15:57:11 2013
@@ -78,14 +78,14 @@ class Examples(TestUtilsMixin, unittest.
'--dataTable', 'dataTable',
'--vis', visibility,
'--chunkSize', 100000,
- ACCUMULO_HOME+"/fate")
+ ACCUMULO_HOME+"/test")
self.comment(" searching for a file")
handle = self.runOn('localhost', [self.accumulo_sh(), 'org.apache.accumulo.examples.simple.dirlist.QueryUtil',
'-i', INSTANCE_NAME, '-z', ZOOKEEPERS, '-u', ROOT, '-p', ROOT_PASSWORD,
- '-t', 'indexTable', '--auths', auths, '--search', '--path', 'Fate.java'])
+ '-t', 'indexTable', '--auths', auths, '--search', '--path', 'examples.py'])
out, err = handle.communicate()
self.assert_(handle.returncode == 0)
- self.assert_(out.find('accumulo/fate/Fate.java') >= 0)
+ self.assert_(out.find('test/system/auto/simple/examples.py') >= 0)
self.comment(" found file at " + out)