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/02/26 21:31:38 UTC
svn commit: r1450393 -
/accumulo/branches/1.5/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java
Author: ecn
Date: Tue Feb 26 20:31:38 2013
New Revision: 1450393
URL: http://svn.apache.org/r1450393
Log:
ACCUMULO-1115 double check for table existence and use the proper keys to pull state
Modified:
accumulo/branches/1.5/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java
Modified: accumulo/branches/1.5/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java?rev=1450393&r1=1450392&r2=1450393&view=diff
==============================================================================
--- accumulo/branches/1.5/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java (original)
+++ accumulo/branches/1.5/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java Tue Feb 26 20:31:38 2013
@@ -110,8 +110,10 @@ public class Config extends Test {
String table = parts[0];
int choice = Integer.parseInt(parts[1]);
Property property = tableSettings[choice].property;
- log.debug("Setting " + property.getKey() + " on " + table + " back to " + property.getDefaultValue());
- state.getConnector().tableOperations().setProperty(table, property.getKey(), property.getDefaultValue());
+ if (state.getConnector().tableOperations().exists(table)) {
+ log.debug("Setting " + property.getKey() + " on " + table + " back to " + property.getDefaultValue());
+ state.getConnector().tableOperations().setProperty(table, property.getKey(), property.getDefaultValue());
+ }
}
state.getMap().remove(LAST_SETTING);
state.getMap().remove(LAST_TABLE_SETTING);
@@ -136,9 +138,9 @@ public class Config extends Test {
// generate a random value
long newValue = random.nextLong(setting.min, setting.max);
- state.getMap().put(LAST_TABLE_SETTING, "" + choice);
+ state.getMap().put(LAST_TABLE_SETTING, table + "," + choice);
log.debug("Setting " + setting.property.getKey() + " on table " + table + " to " + newValue);
- state.getConnector().instanceOperations().setProperty(setting.property.getKey(), table + "," + newValue);
+ state.getConnector().tableOperations().setProperty(table, setting.property.getKey(), "" + newValue);
}
private void changeSetting(RandomData random, State state, Properties props) throws Exception {