svn commit: r1442987 - in /accumulo/trunk/proxy/examples: python/TestClient.py ruby/test_client.rb

2013-02-06 Thread ecn
Author: ecn
Date: Wed Feb  6 14:31:47 2013
New Revision: 1442987

URL: http://svn.apache.org/viewvc?rev=1442987view=rev
Log:
ACCUMULO-1046 fix the examples

Modified:
accumulo/trunk/proxy/examples/python/TestClient.py
accumulo/trunk/proxy/examples/ruby/test_client.rb

Modified: accumulo/trunk/proxy/examples/python/TestClient.py
URL: 
http://svn.apache.org/viewvc/accumulo/trunk/proxy/examples/python/TestClient.py?rev=1442987r1=1442986r2=1442987view=diff
==
--- accumulo/trunk/proxy/examples/python/TestClient.py (original)
+++ accumulo/trunk/proxy/examples/python/TestClient.py Wed Feb  6 14:31:47 2013
@@ -30,7 +30,7 @@ protocol = TCompactProtocol.TCompactProt
 client = AccumuloProxy.Client(protocol)
 transport.open()
 
-login = PrincipalToken(root,secret)
+login = client.login(UserPass('root', 'secret'))
 
 print client.listTables(login)
 

Modified: accumulo/trunk/proxy/examples/ruby/test_client.rb
URL: 
http://svn.apache.org/viewvc/accumulo/trunk/proxy/examples/ruby/test_client.rb?rev=1442987r1=1442986r2=1442987view=diff
==
--- accumulo/trunk/proxy/examples/ruby/test_client.rb (original)
+++ accumulo/trunk/proxy/examples/ruby/test_client.rb Wed Feb  6 14:31:47 2013
@@ -24,13 +24,12 @@ socket = Thrift::Socket.new(server, 4242
 transport = Thrift::FramedTransport.new(socket)
 proto = Thrift::CompactProtocol.new(transport)
 proxy = AccumuloProxy::Client.new(proto)
-login = PrincipalToken.new({'principal' = 'root', 'token' = 'secret'})
 
 # open up the connect
 transport.open()
 
 # Test if the server is up
-proxy.ping(login)
+login = proxy.login(UserPass.new('username' = 'root', 'password' = 'secret'))
 
 # print out a table list
 puts List of tables: #{proxy.listTables(login).inspect}




svn commit: r1442989 - in /accumulo/trunk/test/system/continuous: agitator.pl continuous-env.sh.example

2013-02-06 Thread ecn
Author: ecn
Date: Wed Feb  6 14:35:48 2013
New Revision: 1442989

URL: http://svn.apache.org/viewvc?rev=1442989view=rev
Log:
ACCUMULO-636 randomly kill datanodes

Modified:
accumulo/trunk/test/system/continuous/agitator.pl
accumulo/trunk/test/system/continuous/continuous-env.sh.example

Modified: accumulo/trunk/test/system/continuous/agitator.pl
URL: 
http://svn.apache.org/viewvc/accumulo/trunk/test/system/continuous/agitator.pl?rev=1442989r1=1442988r2=1442989view=diff
==
--- accumulo/trunk/test/system/continuous/agitator.pl (original)
+++ accumulo/trunk/test/system/continuous/agitator.pl Wed Feb  6 14:35:48 2013
@@ -77,16 +77,37 @@ while(1){
$killed{$server} = 1;
 
$t = strftime %Y%m%d %H:%M:%S, localtime;
-   
+
$rn = rand(1);
-   print STDERR $t Killing $server\n;
-   system($ACCUMULO_HOME/bin/stop-server.sh $server 
\accumulo-start.*.jar\ tserver KILL);
+   $kill_tserver = 0;
+   $kill_datanode = 0;
+   if($rn .33){
+   $kill_tserver = 1;
+   $kill_datanode = 1;
+   }elsif($rn  .66){
+   $kill_tserver = 1;
+   $kill_datanode = 0;
+   }else{
+   $kill_tserver = 0;
+   $kill_datanode = 1;
+   }
+   
+   print STDERR $t Killing $server $kill_tserver 
$kill_datanode\n;
+   if($kill_tserver) {
+   system($ACCUMULO_HOME/bin/stop-server.sh $server 
\accumulo-start.*.jar\ tserver KILL);
+   }
+
+   if($kill_datanode) {
+   system(ssh $server pkill -9 -f [p]roc_datanode);
+   }
}
 
sleep($sleep2 * 60);
$t = strftime %Y%m%d %H:%M:%S, localtime;
print STDERR $t Running tup\n;
system($ACCUMULO_HOME/bin/tup.sh);
+   print STDERR $t Running start-dfs\n;
+   system($HADOOP_PREFIX/bin/start-dfs.sh);
 
sleep($sleep1 * 60);
 }

Modified: accumulo/trunk/test/system/continuous/continuous-env.sh.example
URL: 
http://svn.apache.org/viewvc/accumulo/trunk/test/system/continuous/continuous-env.sh.example?rev=1442989r1=1442988r2=1442989view=diff
==
--- accumulo/trunk/test/system/continuous/continuous-env.sh.example (original)
+++ accumulo/trunk/test/system/continuous/continuous-env.sh.example Wed Feb  6 
14:35:48 2013
@@ -14,7 +14,7 @@
 # limitations under the License.
 
 #set this to an absolute path that exist on every machine
-HADOOP_HOME=/opt/hadoop
+HADOOP_PREFIX=/opt/hadoop
 ACCUMULO_HOME=/opt/accumulo
 JAVA_HOME=/opt/java
 ZOOKEEPER_HOME=/opt/zookeeper




svn commit: r1443085 - in /accumulo/trunk/test/src/test/java/org/apache/accumulo: fate/zookeeper/ZooLockTest.java test/MiniAccumuloClusterTest.java

2013-02-06 Thread kturner
Author: kturner
Date: Wed Feb  6 17:38:45 2013
New Revision: 1443085

URL: http://svn.apache.org/viewvc?rev=1443085view=rev
Log:
ACCUMULO-954 suppressed warnings from zookeeper during unit test

Modified:

accumulo/trunk/test/src/test/java/org/apache/accumulo/fate/zookeeper/ZooLockTest.java

accumulo/trunk/test/src/test/java/org/apache/accumulo/test/MiniAccumuloClusterTest.java

Modified: 
accumulo/trunk/test/src/test/java/org/apache/accumulo/fate/zookeeper/ZooLockTest.java
URL: 
http://svn.apache.org/viewvc/accumulo/trunk/test/src/test/java/org/apache/accumulo/fate/zookeeper/ZooLockTest.java?rev=1443085r1=1443084r2=1443085view=diff
==
--- 
accumulo/trunk/test/src/test/java/org/apache/accumulo/fate/zookeeper/ZooLockTest.java
 (original)
+++ 
accumulo/trunk/test/src/test/java/org/apache/accumulo/fate/zookeeper/ZooLockTest.java
 Wed Feb  6 17:38:45 2013
@@ -83,7 +83,7 @@ public class ZooLockTest {
 
 folder.create();
 
-Logger.getLogger(org.apache.zookeeper).setLevel(Level.WARN);
+Logger.getLogger(org.apache.zookeeper).setLevel(Level.ERROR);
 
 accumulo = new MiniAccumuloCluster(folder.getRoot(), superSecret);
 

Modified: 
accumulo/trunk/test/src/test/java/org/apache/accumulo/test/MiniAccumuloClusterTest.java
URL: 
http://svn.apache.org/viewvc/accumulo/trunk/test/src/test/java/org/apache/accumulo/test/MiniAccumuloClusterTest.java?rev=1443085r1=1443084r2=1443085view=diff
==
--- 
accumulo/trunk/test/src/test/java/org/apache/accumulo/test/MiniAccumuloClusterTest.java
 (original)
+++ 
accumulo/trunk/test/src/test/java/org/apache/accumulo/test/MiniAccumuloClusterTest.java
 Wed Feb  6 17:38:45 2013
@@ -57,7 +57,7 @@ public class MiniAccumuloClusterTest {
 
 folder.create();
 
-Logger.getLogger(org.apache.zookeeper).setLevel(Level.WARN);
+Logger.getLogger(org.apache.zookeeper).setLevel(Level.ERROR);
 
 accumulo = new MiniAccumuloCluster(folder.getRoot(), superSecret);
 




svn commit: r1443105 - /accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java

2013-02-06 Thread ecn
Author: ecn
Date: Wed Feb  6 18:18:23 2013
New Revision: 1443105

URL: http://svn.apache.org/viewvc?rev=1443105view=rev
Log:
ACCUMULO-382 add per-table configurations

Modified:

accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java

Modified: 
accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java
URL: 
http://svn.apache.org/viewvc/accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java?rev=1443105r1=1443104r2=1443105view=diff
==
--- 
accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java
 (original)
+++ 
accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java
 Wed Feb  6 18:18:23 2013
@@ -1,6 +1,7 @@
 package org.apache.accumulo.test.randomwalk.concurrent;
 
 import java.util.Properties;
+import java.util.SortedSet;
 
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.test.randomwalk.State;
@@ -12,6 +13,7 @@ public class Config extends Test {
   
   private static final String LAST_SETTING = lastSetting;
 
+  private static final String LAST_TABLE_SETTING = lastTableSetting;
 
   static class Setting {
 public Property property;
@@ -23,44 +25,58 @@ public class Config extends Test {
   this.max = max;
 }
   }
+  static Setting s(Property property, long min, long max) {
+return new Setting(property, min, max);
+  }
   Setting[] settings = {
-  new Setting(Property.TSERV_BLOOM_LOAD_MAXCONCURRENT, 1, 10),
-  new Setting(Property.TSERV_BULK_PROCESS_THREADS, 1, 10),
-  new Setting(Property.TSERV_BULK_RETRY, 1, 10),
-  new Setting(Property.TSERV_BULK_TIMEOUT, 10, 600),
-  new Setting(Property.TSERV_BULK_ASSIGNMENT_THREADS, 1, 10),
-  new Setting(Property.TSERV_DATACACHE_SIZE, 0, 10L),
-  new Setting(Property.TSERV_INDEXCACHE_SIZE, 0, 10L),
-  new Setting(Property.TSERV_CLIENT_TIMEOUT, 100, 1),
-  new Setting(Property.TSERV_MAJC_MAXCONCURRENT, 1, 10),
-  new Setting(Property.TSERV_MAJC_DELAY, 100, 1),
-  new Setting(Property.TSERV_MAJC_THREAD_MAXOPEN, 3, 100),
-  new Setting(Property.TSERV_MINC_MAXCONCURRENT, 1, 10),
-  new Setting(Property.TSERV_DEFAULT_BLOCKSIZE, 10, 1000L),
-  new Setting(Property.TSERV_MAX_IDLE, 1, 500*1000),
-  new Setting(Property.TSERV_MAXMEM, 100, 3*1024*1024*1024L),
-  new Setting(Property.TSERV_READ_AHEAD_MAXCONCURRENT, 1, 25),
-  new Setting(Property.TSERV_MIGRATE_MAXCONCURRENT, 1, 10),
-  new Setting(Property.TSERV_MUTATION_QUEUE_MAX, 1, 1024*1024),
-  new Setting(Property.TSERV_RECOVERY_MAX_CONCURRENT, 1, 100),
-  new Setting(Property.TSERV_SCAN_MAX_OPENFILES, 10, 1000),
-  new Setting(Property.TSERV_THREADCHECK, 100, 1),
-  new Setting(Property.TSERV_MINTHREADS, 1, 100),
-  new Setting(Property.TSERV_SESSION_MAXIDLE, 100, 5*60*1000),
-  new Setting(Property.TSERV_SORT_BUFFER_SIZE, 1024*1024, 1024*1024*1024L),
-  new Setting(Property.TSERV_TABLET_SPLIT_FINDMIDPOINT_MAXOPEN, 5, 100),
-  new Setting(Property.TSERV_WAL_BLOCKSIZE, 100*1024, 1024*1024*1024*10L),
-  new Setting(Property.TSERV_WORKQ_THREADS, 1, 10),
-  new Setting(Property.MASTER_BULK_THREADPOOL_SIZE, 1, 10),
-  new Setting(Property.MASTER_BULK_RETRIES, 1, 10),
-  new Setting(Property.MASTER_BULK_TIMEOUT, 10, 600),
-  new Setting(Property.MASTER_FATE_THREADPOOL_SIZE, 1, 100),
-  new Setting(Property.MASTER_RECOVERY_DELAY, 0, 1),
-  new Setting(Property.MASTER_RECOVERY_MAXTIME, 1, 100),
-  new Setting(Property.MASTER_THREADCHECK, 100, 1),
-  new Setting(Property.MASTER_MINTHREADS, 1, 200),
+  s(Property.TSERV_BLOOM_LOAD_MAXCONCURRENT, 1, 10),
+  s(Property.TSERV_BULK_PROCESS_THREADS, 1, 10),
+  s(Property.TSERV_BULK_RETRY, 1, 10),
+  s(Property.TSERV_BULK_TIMEOUT, 10, 600),
+  s(Property.TSERV_BULK_ASSIGNMENT_THREADS, 1, 10),
+  s(Property.TSERV_DATACACHE_SIZE, 0, 10L),
+  s(Property.TSERV_INDEXCACHE_SIZE, 0, 10L),
+  s(Property.TSERV_CLIENT_TIMEOUT, 100, 1),
+  s(Property.TSERV_MAJC_MAXCONCURRENT, 1, 10),
+  s(Property.TSERV_MAJC_DELAY, 100, 1),
+  s(Property.TSERV_MAJC_THREAD_MAXOPEN, 3, 100),
+  s(Property.TSERV_MINC_MAXCONCURRENT, 1, 10),
+  s(Property.TSERV_DEFAULT_BLOCKSIZE, 10, 1000L),
+  s(Property.TSERV_MAX_IDLE, 1, 500*1000),
+  s(Property.TSERV_MAXMEM, 100, 3*1024*1024*1024L),
+  s(Property.TSERV_READ_AHEAD_MAXCONCURRENT, 1, 25),
+  s(Property.TSERV_MIGRATE_MAXCONCURRENT, 1, 10),
+  s(Property.TSERV_MUTATION_QUEUE_MAX, 1, 1024*1024),
+  s(Property.TSERV_RECOVERY_MAX_CONCURRENT, 1, 100),
+  s(Property.TSERV_SCAN_MAX_OPENFILES, 10, 1000),
+  s(Property.TSERV_THREADCHECK, 100, 1),

svn commit: r1443145 - in /accumulo/trunk: fate/src/main/java/org/apache/accumulo/fate/zookeeper/ proxy/ test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/ test/system/randomwalk/conf/

2013-02-06 Thread ecn
Author: ecn
Date: Wed Feb  6 19:17:58 2013
New Revision: 1443145

URL: http://svn.apache.org/viewvc?rev=1443145view=rev
Log:
ACCUMULO-636 randomly shutdown every now and then; license headers

Added:

accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Shutdown.java
   (with props)
Modified:

accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooLock.java
accumulo/trunk/proxy/proxy.properties

accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java

accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/StartAll.java
accumulo/trunk/test/system/randomwalk/conf/modules/Concurrent.xml

Modified: 
accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooLock.java
URL: 
http://svn.apache.org/viewvc/accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooLock.java?rev=1443145r1=1443144r2=1443145view=diff
==
--- 
accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooLock.java
 (original)
+++ 
accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooLock.java
 Wed Feb  6 19:17:58 2013
@@ -223,7 +223,7 @@ public class ZooLock implements Watcher 
 } else if (asyncLock != null  event.getType() == 
EventType.NodeDeleted  event.getPath().equals(path + / + asyncLock)) {
   failedToAcquireLock();
 } else if(event.getState() != KeeperState.Expired) {
-  log.warn(Unexpected event wathcing lock node +event+ 
+asyncLockPath);
+  log.warn(Unexpected event watching lock node +event+ 
+asyncLockPath);
   try {
 Stat stat2 = zooKeeper.getStatus(asyncLockPath, this);
 if(stat2 == null){

Modified: accumulo/trunk/proxy/proxy.properties
URL: 
http://svn.apache.org/viewvc/accumulo/trunk/proxy/proxy.properties?rev=1443145r1=1443144r2=1443145view=diff
==
--- accumulo/trunk/proxy/proxy.properties (original)
+++ accumulo/trunk/proxy/proxy.properties Wed Feb  6 19:17:58 2013
@@ -1,5 +1,5 @@
 org.apache.accumulo.proxy.ProxyServer.useMockInstance=false
-org.apache.accumulo.proxy.ProxyServer.useMiniAccumulo=false
+org.apache.accumulo.proxy.ProxyServer.useMiniAccumulo=true
 
org.apache.accumulo.proxy.ProxyServer.protocolFactory=org.apache.thrift.protocol.TCompactProtocol$Factory
 org.apache.accumulo.proxy.ProxyServer.port=42424
 

Modified: 
accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java
URL: 
http://svn.apache.org/viewvc/accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java?rev=1443145r1=1443144r2=1443145view=diff
==
--- 
accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java
 (original)
+++ 
accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java
 Wed Feb  6 19:17:58 2013
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.accumulo.test.randomwalk.concurrent;
 
 import java.util.Properties;

Added: 
accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Shutdown.java
URL: 
http://svn.apache.org/viewvc/accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Shutdown.java?rev=1443145view=auto
==
--- 
accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Shutdown.java
 (added)
+++ 
accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Shutdown.java
 Wed Feb  6 19:17:58 2013
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you 

svn commit: r1443159 - /accumulo/trunk/test/system/continuous/agitator.pl

2013-02-06 Thread ecn
Author: ecn
Date: Wed Feb  6 19:38:58 2013
New Revision: 1443159

URL: http://svn.apache.org/viewvc?rev=1443159view=rev
Log:
ACCUMULO-636 need to get HADOOP_PREFIX from env

Modified:
accumulo/trunk/test/system/continuous/agitator.pl

Modified: accumulo/trunk/test/system/continuous/agitator.pl
URL: 
http://svn.apache.org/viewvc/accumulo/trunk/test/system/continuous/agitator.pl?rev=1443159r1=1443158r2=1443159view=diff
==
--- accumulo/trunk/test/system/continuous/agitator.pl (original)
+++ accumulo/trunk/test/system/continuous/agitator.pl Wed Feb  6 19:38:58 2013
@@ -24,6 +24,7 @@ if(scalar(@ARGV) != 4  scalar(@ARGV) !
 }
 
 $ACCUMULO_HOME=../../..;
+$HADOOP_PREFIX=$ENV{'HADOOP_PREFIX'};
 
 $sleep1 = $ARGV[0];
 $sleep2 = $ARGV[1];