accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [01/50] [abbrv] ACCUMULO-1537 converted many more functional tests to integration tests
Date Wed, 17 Jul 2013 02:33:03 GMT
Updated Branches:
  refs/heads/ACCUMULO-1496 5750b9020 -> f5324a227


http://git-wip-us.apache.org/repos/asf/accumulo/blob/aea43136/test/system/auto/simple/mapreduce.py
----------------------------------------------------------------------
diff --git a/test/system/auto/simple/mapreduce.py b/test/system/auto/simple/mapreduce.py
deleted file mode 100755
index a63df9a..0000000
--- a/test/system/auto/simple/mapreduce.py
+++ /dev/null
@@ -1,142 +0,0 @@
-# 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.
-
-import os
-
-import logging
-import unittest
-import time
-import sys
-import subprocess
-import hashlib
-import base64
-import re
-import glob
-import TestUtils
-import socket
-from TestUtils import TestUtilsMixin
-
-log = logging.getLogger('test.auto')
-
-def globbase(root, name):
-    return glob.glob(os.path.join(root, name))[0]
-
-def globa(name):
-    return globbase(TestUtils.ACCUMULO_HOME, name)
-
-class MapReduceTest(TestUtilsMixin,unittest.TestCase):
-    """The test is used to test the functionality of a map reduce job on accumulo
-       Here are the steps of this test
-       1.Create a file called mapred_ftest_input with x number of lines with 1 value per
line
-       2.Put file on Hadoop
-       3.Run Map Reduce Test that hashes the lines in the input (MD5) and puts each hash
on its own row
-       4.Generate Hashes on the same input in test
-       5.Read table and compare hashes. Fail if they do not match
-       6.Delete mapred_ftset_input from hadoop 
-    """
-    order = 21
-
-    tablename = "mapredf"
-    input_cfcq = "cf-HASHTYPE:cq-NOTHASHED"
-    output_cfcq = "cf-HASHTYPE:cq-MD5BASE64"
-    example_class_to_run ="org.apache.accumulo.examples.simple.mapreduce.RowHash"
-    
-    def setUp(self):
-        if not os.getenv("ZOOKEEPER_HOME"):
-            self.fail("ZOOKEEPER_HOME environment variable is not set please set the location
of ZOOKEEPER home in this environment variable")
-            return
-        TestUtilsMixin.setUp(self)
-        
-    def tearDown(self):
-        TestUtilsMixin.tearDown(self)
-    
-    def runTest(self):
-        #These Environment variables are need to run this test it will fail if they are not
in the environment
-        thriftjar = globa(os.path.join('lib','libthrift.jar'))
-        examples = globa(os.path.join('lib','accumulo-examples-simple.jar'))
-        core = globa(os.path.join('lib','accumulo-core.jar'))
-        fate = globa(os.path.join('lib','accumulo-fate.jar'))
-        start = globa(os.path.join('lib','accumulo-start.jar'))
-        jcommander = globa(os.path.join('lib','jcommander.jar'))
-        trace = globa(os.path.join('lib','accumulo-trace.jar'))
-        zkjar = globbase(os.getenv("ZOOKEEPER_HOME"),"zookeeper*[!javadoc|src|bin].jar")
-        self.createInputTableInAccumulo();
-        #Arguments for the Example Class
-        arg_list = ['-i', TestUtils.INSTANCE_NAME,
-                    '-z', TestUtils.ZOOKEEPERS,
-                    '-u', TestUtils.ROOT,
-                    '-p', TestUtils.ROOT_PASSWORD,
-                    '-t', self.tablename,
-                    '--column', self.input_cfcq]
-        #MapReduce class to run
-        mapred_class= [self.accumulo_sh(),self.example_class_to_run]
-        #classes needed to run the mapreduce
-        libjars = ["-libjars",",".join([zkjar,thriftjar,examples,core,fate,trace,jcommander])]
-        cmd = mapred_class+libjars+arg_list
-        if(self.isAccumuloRunning()):
-            log.debug("COMMAND:"+str(cmd))
-            handle = self.runOn(self.masterHost(), cmd)
-            out, err = handle.communicate()
-
-            log.debug(out)
-            log.debug(err)
-            log.debug("Return code: "+str(handle.returncode))
-
-            log.debug("\n\n!!!FINISHED!!!\n\n")
-            if(handle.returncode==0):
-                self.checkResults()
-            else:
-                self.fail("Test did not finish")
-
-    def isAccumuloRunning(self):
-        output = subprocess.Popen(["jps","-m"],stderr=subprocess.PIPE, stdout=subprocess.PIPE).communicate()[0]
-        if(output.find("tserver")!=-1 and output.find("master")!=-1):
-            return True
-        return False
-    
-    def retrieveValues(self,tablename,cfcq):
-        input = "table %s\nscan\n" % tablename
-        out,err,code = self.rootShell(self.masterHost(),input)
-        #print out
-        restr1 = "[0-9].*\[\]    (.*)"
-        restr2 = "[0-9] %s \[\]    (.*)"%(cfcq)
-        val_list = re.findall(restr2,out)
-        return val_list
-    
-    def checkResults(self):
-        control_values = [base64.b64encode(hashlib.md5("row%s"%(i)).digest()) for i in range(10)]
-        experiment_values = self.retrieveValues(self.tablename, self.output_cfcq)
-        self.failIf(len(control_values) != len(experiment_values), "List aren't the same
length")
-        diff=[ev for ev in experiment_values if ev not in control_values]
-        self.failIf(len(diff)>0, "Start and MapReduced Values aren't not the same")
-    
-    def fakeMRResults(self):
-        vals = self.retrieveValues(self.tablename, self.input_cfcq)
-        values = ["insert %s %s %s\n" % (i,self.output_cfcq.replace(":"," "),base64.b64encode(hashlib.md5("row%s"
% i).digest())) for i in range(10,20)]
-        input = "table %s\n" % (self.tablename,)+"".join(values)
-        out,err,code = self.rootShell(self.masterHost(),input)
-        #print "FAKE",out
-    
-    def createInputTableInAccumulo(self):
-        #my leet python list comprehensions skills in action
-        values = ["insert %s %s row%s\n" % (i,self.input_cfcq.replace(":"," "),i) for i in
range(10)]
-        input = "createtable %s\ntable %s\n" % (self.tablename,self.tablename) + \
-                "".join(values)
-        out,err,code = self.rootShell(self.masterHost(),input)
-        #print "CREATE",out
-def suite():
-    result = unittest.TestSuite()
-    result.addTest(MapReduceTest())
-    return result

http://git-wip-us.apache.org/repos/asf/accumulo/blob/aea43136/test/system/auto/simple/maxOpen.py
----------------------------------------------------------------------
diff --git a/test/system/auto/simple/maxOpen.py b/test/system/auto/simple/maxOpen.py
deleted file mode 100755
index 6341d76..0000000
--- a/test/system/auto/simple/maxOpen.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# 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.
-
-from JavaTest import JavaTest
-
-import unittest
-
-class MaxOpenTest(JavaTest):
-    "Test doing lookups that exceed max files open"
-
-    order = 21
-    testClass="org.apache.accumulo.test.functional.MaxOpenTest"
-
-
-def suite():
-    result = unittest.TestSuite()
-    result.addTest(MaxOpenTest())
-    return result

http://git-wip-us.apache.org/repos/asf/accumulo/blob/aea43136/test/system/auto/simple/merge.py
----------------------------------------------------------------------
diff --git a/test/system/auto/simple/merge.py b/test/system/auto/simple/merge.py
deleted file mode 100755
index a69e11a..0000000
--- a/test/system/auto/simple/merge.py
+++ /dev/null
@@ -1,107 +0,0 @@
-# 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.
-
-import logging
-
-import unittest
-
-from TestUtils import TestUtilsMixin
-from JavaTest import JavaTest
-
-log = logging.getLogger('test.auto')
-
-class Merge(unittest.TestCase, TestUtilsMixin):
-    "Start a clean accumulo, split a table and merge part of it"
-    order = 80
-
-    def setUp(self):
-        TestUtilsMixin.setUp(self);
-
-    def runTest(self):
-        out, err, code = self.shell(self.masterHost(), '''
-createtable test
-addsplits a b c d e f g h i j k
-insert a cf cq value
-insert b cf cq value
-insert c cf cq value
-insert d cf cq value
-insert e cf cq value
-insert f cf cq value
-insert g cf cq value
-insert h cf cq value
-insert i cf cq value
-insert j cf cq value
-insert k cf cq value
-flush -w
-merge -b c1 -e f1
-getsplits
-quit
-''')
-        self.assert_(code == 0)
-        out = out[out.find('getsplits'):out.find('quit')]
-        self.assert_(len(out.split('\n')) == 10)
-        out, err, code = self.shell(self.masterHost(), '''
-scan -t test
-quit
-''')
-        out = out[out.find('test\n'):out.find('quit')]
-        self.assert_(len(out.split('\n')) == 13)
-
-
-class MergeSize(unittest.TestCase, TestUtilsMixin):
-    "Start a clean accumulo, split a table and merge based on size"
-    order = 80
-
-    def setUp(self):
-        TestUtilsMixin.setUp(self);
-
-    def runTest(self):
-        out, err, code = self.shell(self.masterHost(), '''
-createtable merge
-addsplits a b c d e f g h i j k l m n o p q r s t u v w x y z
-insert c cf cq mersydotesanddozeydotesanlittolamsiedives
-insert e cf cq mersydotesanddozeydotesanlittolamsiedives
-insert f cf cq mersydotesanddozeydotesanlittolamsiedives
-insert y cf cq mersydotesanddozeydotesanlittolamsiedives
-flush -w
-merge -s 100 -v
-getsplits
-merge -s 100 -f -v
-getsplits
-quit
-''')
-        self.assert_(code == 0)
-        out = out.split("getsplits")
-        firstMerge = out[-2]
-        firstMerge = firstMerge.strip().split('\n')[:-5]
-        self.assert_(firstMerge == ['b','c','d','e','f','x','y'])
-        secondMerge = out[-1]
-        secondMerge = secondMerge.strip().split('\n')[:-1]
-        self.assert_(secondMerge == ['c','e','f','y'])
-
-class MergeTest(JavaTest):
-    "Test Merge"
-
-    order = 92
-    testClass="org.apache.accumulo.test.functional.MergeTest"
-    maxRuntime = 200
-
-
-def suite():
-    result = unittest.TestSuite()
-    result.addTest(Merge())
-    result.addTest(MergeSize())
-    result.addTest(MergeTest())
-    return result

http://git-wip-us.apache.org/repos/asf/accumulo/blob/aea43136/test/system/auto/simple/mergeMetadata.py
----------------------------------------------------------------------
diff --git a/test/system/auto/simple/mergeMetadata.py b/test/system/auto/simple/mergeMetadata.py
deleted file mode 100755
index cc34fb5..0000000
--- a/test/system/auto/simple/mergeMetadata.py
+++ /dev/null
@@ -1,73 +0,0 @@
-# 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.
-
-import os
-
-import logging
-import unittest
-
-from TestUtils import TestUtilsMixin
-
-log = logging.getLogger('test.auto')
-
-class MergeMeta(unittest.TestCase, TestUtilsMixin):
-    """Split and merge the !METADATA table"""
-
-    order = 30
-
-    settings = TestUtilsMixin.settings.copy()
-
-    def setUp(self):
-        TestUtilsMixin.setUp(self);
-    
-    def runTest(self):
-        out, err, code = self.shell(self.masterHost(), '''
-addsplits -t !METADATA 1 2 3 4 5
-createtable a1
-createtable a2
-createtable a3
-createtable a4
-createtable a5
-merge -t !METADATA
-yes
-sleep 2
-scan -np -t !METADATA
-''')
-        assert code == 0
-        # look for delete entries for the abandoned directories
-        assert out.find('~del') >= 0
-
-class MergeMetaFail(unittest.TestCase, TestUtilsMixin):
-    """test a failed merge of the !METADATA table"""
-
-    order = 30
-
-    settings = TestUtilsMixin.settings.copy()
-
-    def setUp(self):
-        TestUtilsMixin.setUp(self);
-
-    def runTest(self):
-        out, err, code = self.shell(self.masterHost(), '''
-merge -t !METADATA -b ! -e !!
-''')
-        assert code != 0
-
-
-def suite():
-    result = unittest.TestSuite()
-    result.addTest(MergeMeta())
-    result.addTest(MergeMetaFail())
-    return result

http://git-wip-us.apache.org/repos/asf/accumulo/blob/aea43136/test/system/auto/simple/range.py
----------------------------------------------------------------------
diff --git a/test/system/auto/simple/range.py b/test/system/auto/simple/range.py
deleted file mode 100755
index 130940a..0000000
--- a/test/system/auto/simple/range.py
+++ /dev/null
@@ -1,29 +0,0 @@
-# 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.
-
-from JavaTest import JavaTest
-
-import unittest
-
-class RangeTest(JavaTest):
-    "Test scanning different ranges in accumulo"
-
-    order = 21
-    testClass = "org.apache.accumulo.test.functional.ScanRangeTest"
-
-def suite():
-    result = unittest.TestSuite()
-    result.addTest(RangeTest())
-    return result

http://git-wip-us.apache.org/repos/asf/accumulo/blob/aea43136/test/system/auto/simple/rowDelete.py
----------------------------------------------------------------------
diff --git a/test/system/auto/simple/rowDelete.py b/test/system/auto/simple/rowDelete.py
deleted file mode 100755
index 5de97bd..0000000
--- a/test/system/auto/simple/rowDelete.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# 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.
-
-from JavaTest import JavaTest
-
-import unittest
-
-class RowDeleteTest(JavaTest):
-    "Row Deletion Test"
-
-    order = 22
-    testClass="org.apache.accumulo.test.functional.RowDeleteTest"
-
-
-def suite():
-    result = unittest.TestSuite()
-    result.addTest(RowDeleteTest())
-    return result

http://git-wip-us.apache.org/repos/asf/accumulo/blob/aea43136/test/system/auto/simple/scanIter.py
----------------------------------------------------------------------
diff --git a/test/system/auto/simple/scanIter.py b/test/system/auto/simple/scanIter.py
deleted file mode 100755
index 5fd048a..0000000
--- a/test/system/auto/simple/scanIter.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# 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.
-
-from JavaTest import JavaTest
-
-import unittest
-
-class ScanIteratorTest(JavaTest):
-    "Test setting iterators at scan time"
-
-    order = 21
-    testClass="org.apache.accumulo.test.functional.ScanIteratorTest"
-
-
-def suite():
-    result = unittest.TestSuite()
-    result.addTest(ScanIteratorTest())
-    return result

http://git-wip-us.apache.org/repos/asf/accumulo/blob/aea43136/test/system/auto/simple/scanSessionTimeout.py
----------------------------------------------------------------------
diff --git a/test/system/auto/simple/scanSessionTimeout.py b/test/system/auto/simple/scanSessionTimeout.py
deleted file mode 100755
index a379c48..0000000
--- a/test/system/auto/simple/scanSessionTimeout.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# 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.
-
-from JavaTest import JavaTest
-
-import unittest
-
-class ScanSessionTimeOutTest(JavaTest):
-    "Test a scan session that times out midway through"
-
-    order = 20
-    testClass="org.apache.accumulo.test.functional.ScanSessionTimeOutTest"
-
-
-def suite():
-    result = unittest.TestSuite()
-    result.addTest(ScanSessionTimeOutTest())
-    return result

http://git-wip-us.apache.org/repos/asf/accumulo/blob/aea43136/test/system/auto/simple/security.py
----------------------------------------------------------------------
diff --git a/test/system/auto/simple/security.py b/test/system/auto/simple/security.py
deleted file mode 100755
index 971dc11..0000000
--- a/test/system/auto/simple/security.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# 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.
-
-from JavaTest import JavaTest
-
-import unittest
-
-class SystemPermissionsTest(JavaTest):
-    "Tests accumulo system permissions"
-
-    order = 21
-    testClass="org.apache.accumulo.test.functional.PermissionsTest$SystemPermissionsTest"
-
-
-class TablePermissionsTest(JavaTest):
-    "Test accumulo table permissions"
-
-    order = 21
-    testClass="org.apache.accumulo.test.functional.PermissionsTest$TablePermissionsTest"
-
-
-def suite():
-    result = unittest.TestSuite()
-    result.addTest(SystemPermissionsTest())
-    result.addTest(TablePermissionsTest())
-    return result
-

http://git-wip-us.apache.org/repos/asf/accumulo/blob/aea43136/test/system/auto/simple/serverSideError.py
----------------------------------------------------------------------
diff --git a/test/system/auto/simple/serverSideError.py b/test/system/auto/simple/serverSideError.py
deleted file mode 100755
index 8b5545c..0000000
--- a/test/system/auto/simple/serverSideError.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# 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.
-
-from JavaTest import JavaTest
-
-import unittest
-
-class ServerSideErrorTest(JavaTest):
-    "Verify clients throw exception when there is unexpected exception on server side"
-
-    order = 30
-    testClass="org.apache.accumulo.test.functional.ServerSideErrorTest"
-
-
-def suite():
-    result = unittest.TestSuite()
-    result.addTest(ServerSideErrorTest())
-    return result

http://git-wip-us.apache.org/repos/asf/accumulo/blob/aea43136/test/system/auto/simple/shutdown.py
----------------------------------------------------------------------
diff --git a/test/system/auto/simple/shutdown.py b/test/system/auto/simple/shutdown.py
deleted file mode 100755
index 43807fb..0000000
--- a/test/system/auto/simple/shutdown.py
+++ /dev/null
@@ -1,108 +0,0 @@
-# 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.
-
-import os
-
-import logging
-import unittest
-import sleep
-import signal
-import socket
-from subprocess import PIPE
-
-from TestUtils import TestUtilsMixin, ROOT, ROOT_PASSWORD, FUZZ
-from simple.readwrite import SunnyDayTest
-
-log = logging.getLogger('test.auto')
-
-class ShutdownDuringIngest(SunnyDayTest):
-
-    order = SunnyDayTest.order + 1
-
-    def runTest(self):
-        self.shutdown_accumulo()
-        
-
-class ShutdownDuringQuery(SunnyDayTest):
-
-    order = SunnyDayTest.order + 1
-
-    def runTest(self):
-        self.waitForStop(self.ingester, self.waitTime())
-
-        log.info("Verifying Ingestion")
-        for i in range(10):
-            h = self.verify(self.masterHost(),
-                            self.options.rows,
-                            size=self.options.size)
-        self.shutdown_accumulo()
-
-class ShutdownDuringDelete(SunnyDayTest):
-    
-    order = SunnyDayTest.order + 1
-
-    def runTest(self):
-        self.waitForStop(self.ingester, self.waitTime())
-        h = self.runClassOn(self.masterHost(), "org.apache.accumulo.test.TestRandomDeletes",
[])
-        self.shutdown_accumulo()
-
-
-class ShutdownDuringDeleteTable(TestUtilsMixin, unittest.TestCase):
-    
-    order = SunnyDayTest.order + 1
-
-    def runTest(self):
-        ct = ''
-        dt = ''
-        for i in range(10):
-            ct += 'createtable test%02d\n' % i
-            dt += 'deletetable test%02d\n' % i
-        out, err, code = self.shell(self.masterHost(), ct)
-        handle = self.runOn(self.masterHost(),
-                            [self.accumulo_sh(),
-                             'shell', '-u', ROOT, '-p', ROOT_PASSWORD],
-                            stdin=PIPE)
-        handle.stdin.write(dt)
-        self.shutdown_accumulo()
-
-class AdminStopDuringStart(TestUtilsMixin, unittest.TestCase):
-
-    order = SunnyDayTest.order + 1
-    
-    def runTest(self):
-        self.clean_accumulo(self.masterHost())
-        self.start_accumulo()
-        handle = self.runOn(self.masterHost(),
-                            [self.accumulo_sh(),'admin','stop', socket.getfqdn() + ":%d"
% (39000 + FUZZ)])
-
-class AdminStop(SunnyDayTest):
-
-    order = SunnyDayTest.order + 1
-    
-    def runTest(self):
-        self.waitForStop(self.ingester, self.waitTime())
-        handle = self.runOn(self.masterHost(),
-                            [self.accumulo_sh(),'admin','stop', socket.getfqdn() + ":%d"
% (39000 + FUZZ)])
-        self.shutdown_accumulo()
-
-def suite():
-    result = unittest.TestSuite()
-    result.addTest(ShutdownDuringIngest())
-    result.addTest(ShutdownDuringQuery())
-    result.addTest(ShutdownDuringDelete())
-    result.addTest(ShutdownDuringDeleteTable())
-    result.addTest(AdminStopDuringStart())
-    result.addTest(AdminStop())
-    return result

http://git-wip-us.apache.org/repos/asf/accumulo/blob/aea43136/test/system/auto/simple/simpleBalancer.py
----------------------------------------------------------------------
diff --git a/test/system/auto/simple/simpleBalancer.py b/test/system/auto/simple/simpleBalancer.py
deleted file mode 100755
index 7b57d2a..0000000
--- a/test/system/auto/simple/simpleBalancer.py
+++ /dev/null
@@ -1,116 +0,0 @@
-# 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.
-
-import os
-
-import logging
-import unittest
-import time
-import sleep
-
-from TestUtils import TestUtilsMixin, ACCUMULO_DIR
-
-log = logging.getLogger('test.auto')
-
-from readwrite import SunnyDayTest, Interleaved
-from delete import DeleteTest
-
-class SimpleBalancerFairness(SunnyDayTest):
-    """Start a new table and make sure that active splits
-    are moved onto other servers"""
-
-    order = 80
-
-    settings = TestUtilsMixin.settings.copy()
-    settings.update({
-        'tserver.memory.maps.max':'10K',
-        'tserver.compaction.major.delay': 0,
-        })
-    tableSettings = SunnyDayTest.tableSettings.copy()
-    tableSettings['test_ingest'] = { 
-    	'table.split.threshold': '10K',
-        }
-    def setUp(self):
-        # ensure we have two servers
-        if len(self.options.hosts) == 1:
-            self.options.hosts.append('localhost')
-        self.options.hosts = self.options.hosts[:2]
-        
-        TestUtilsMixin.setUp(self);
-
-        # create a table with 200 splits
-        import tempfile
-        fileno, filename = tempfile.mkstemp()
-        fp = os.fdopen(fileno, "wb")
-        try:
-            for i in range(200):
-                fp.write("%08x\n" % (i * 1000))
-        finally:
-            fp.close()
-        self.createTable('unused', filename)
-
-        # create an empty table
-        self.createTable('test_ingest')
-
-    def runTest(self):
-
-        # start test ingestion
-        log.info("Starting Test Ingester")
-        self.ingester = self.ingest(self.masterHost(),
-                                    200000,
-                                    size=self.options.size)
-        self.waitForStop(self.ingester, 120)
-        self.shell(self.masterHost(), 'flush -t test_ingest')
-        self.waitForStop(self.verify(self.masterHost(), self.options.rows), 60)
-
-        # let the server split tablets and move them around
-        self.sleep(15)
-
-        # fetch the list of tablets from each server 
-        h = self.runOn(self.masterHost(),
-                       [self.accumulo_sh(),
-                        'org.apache.accumulo.test.GetMasterStats'])
-        out, err = h.communicate()
-        servers = {}
-        server = None
-        # if balanced based on ingest, the table that split due to ingest
-        # will be split evenly on both servers, not just one
-        table = ''
-        for line in out.split('\n'):
-            if line.find(' Name: ') == 0:
-                server = line[7:]
-                servers.setdefault(server, 0)
-            if line.find('Table: ') >= 0:
-                table = line.split(' ')[-1]
-            if line.find('    Tablets: ') == 0:
-                if table == '1':
-                   servers[server] += int(line.split()[-1])
-        log.info("Tablet counts " + repr(servers))
-
-        # we have two servers
-        self.assert_(len(servers.values()) == 2)
-        servers = servers.values()
-
-        # a server has more than 10 splits
-        self.assert_(servers[0] > 10)
-
-        # the ratio is roughly even
-        ratio = min(servers) / float(max(servers))
-        self.assert_(ratio > 0.5)
-        
-def suite():
-    result = unittest.TestSuite()
-    result.addTest(SimpleBalancerFairness())
-    return result

http://git-wip-us.apache.org/repos/asf/accumulo/blob/aea43136/test/system/auto/simple/sparseColumnFamily.py
----------------------------------------------------------------------
diff --git a/test/system/auto/simple/sparseColumnFamily.py b/test/system/auto/simple/sparseColumnFamily.py
deleted file mode 100755
index e5675b1..0000000
--- a/test/system/auto/simple/sparseColumnFamily.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# 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.
-
-from JavaTest import JavaTest
-
-import unittest
-
-class SparseColumnFamilyTest(JavaTest):
-    "Test sparse column familes"
-
-    order = 21
-    testClass="org.apache.accumulo.test.functional.SparseColumnFamilyTest"
-
-
-def suite():
-    result = unittest.TestSuite()
-    result.addTest(SparseColumnFamilyTest())
-    return result

http://git-wip-us.apache.org/repos/asf/accumulo/blob/aea43136/test/system/auto/simple/split.py
----------------------------------------------------------------------
diff --git a/test/system/auto/simple/split.py b/test/system/auto/simple/split.py
deleted file mode 100755
index 9d38a2a..0000000
--- a/test/system/auto/simple/split.py
+++ /dev/null
@@ -1,135 +0,0 @@
-# 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.
-
-import os
-
-import logging
-import unittest
-import time
-import sleep
-
-from TestUtils import TestUtilsMixin, ACCUMULO_DIR
-
-log = logging.getLogger('test.auto')
-
-from readwrite import SunnyDayTest, Interleaved
-from delete import DeleteTest
-
-class TabletShouldSplit(SunnyDayTest):
-
-    order = 80
-
-    settings = TestUtilsMixin.settings.copy()
-    settings.update({
-        'tserver.memory.maps.max':'5K',
-        'tserver.compaction.major.delay': 1,
-        })
-    tableSettings = SunnyDayTest.tableSettings.copy()
-    tableSettings['test_ingest'] = { 
-    	'table.split.threshold': '256K',
-      'table.file.compress.blocksize': '1K',
-        }
-    def runTest(self):
-
-        self.waitForStop(self.ingester, 60)
-        self.waitForStop(self.verify(self.masterHost(), self.options.rows), 60)
-
-        # verify that we can read all the data: give it a minute to load
-        # tablets
-        self.waitForStop(self.verify(self.masterHost(), self.options.rows),
-                         120)
-
-        # let the server split tablets and move them around
-        self.sleep(10)
-        
-        # get the metadata
-        out, err, code = self.shell(self.masterHost(), 'table !METADATA\nscan -np\n')
-        self.assert_(code == 0)
-        lines = []
-        tableID = self.getTableId('test_ingest')
-        for line in out.split('\n'):
-            if line.find(tableID+';') >= 0:
-                line = line[line.find(';') + 1 : line.find(' ')].strip()
-                if line:
-                    lines.append(line)
-        # check that the row values aren't always whole rows, but something shorter
-        for line in lines:
-          if len(line) != 14:
-            break
-        else:
-          self.fail("The split points are not being shortened")
-
-        self.assert_(len(lines) > 10)
-
-        h = self.runOn(self.masterHost(), [self.accumulo_sh(),
-                                           'org.apache.accumulo.server.util.CheckForMetadataProblems',
-                                           '-u', 'root',
-                                           '-p', 'secret'])
-        out, err = h.communicate()
-        self.assert_(h.returncode == 0)
-        
-
-
-class InterleaveSplit(Interleaved):
-    order = 80
-
-    settings = TestUtilsMixin.settings.copy()
-    settings.update({
-        'tserver.memory.maps.max':'5K',
-        'tserver.compaction.major.delay': 1,
-        })
-    tableSettings = SunnyDayTest.tableSettings.copy()
-    tableSettings['test_ingest'] = { 
-    	'table.split.threshold': '10K',
-        }
-
-    def waitTime(self):
-        return Interleaved.waitTime(self) * 10
-
-    def runTest(self):
-        Interleaved.runTest(self)
-        handle = self.runOn(self.masterHost(), [
-            'hadoop', 'fs', '-ls', '%s/tables/%s' % (ACCUMULO_DIR,self.getTableId('test_ingest'))
-            ])
-        out, err = handle.communicate()
-        self.assert_(len(out.split('\n')) > 30)
-
-class DeleteSplit(DeleteTest):
-    order = 80
-        
-    settings = TestUtilsMixin.settings.copy()
-    settings.update({
-        'tserver.memory.maps.max': '50K',
-        'tserver.compaction.major.delay': 1,
-        })
-    tableSettings = SunnyDayTest.tableSettings.copy()
-    tableSettings['test_ingest'] = { 
-    	'table.split.threshold': '80K',
-        }
-
-    def runTest(self):
-        DeleteTest.runTest(self)
-        handle = self.runOn(self.masterHost(), [
-            'hadoop', 'fs', '-ls', '%s/tables/%s' % (ACCUMULO_DIR,self.getTableId('test_ingest'))
-            ])
-        out, err = handle.communicate()
-        self.assert_(len(out.split('\n')) > 20)
-
-def suite():
-    result = unittest.TestSuite()
-    result.addTest(DeleteSplit())
-    result.addTest(TabletShouldSplit())
-    result.addTest(InterleaveSplit())
-    return result

http://git-wip-us.apache.org/repos/asf/accumulo/blob/aea43136/test/system/auto/simple/start.py
----------------------------------------------------------------------
diff --git a/test/system/auto/simple/start.py b/test/system/auto/simple/start.py
deleted file mode 100755
index bbf3fdf..0000000
--- a/test/system/auto/simple/start.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# 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.
-
-import unittest
-
-import os
-from TestUtils import TestUtilsMixin, ROOT, ROOT_PASSWORD, ACCUMULO_DIR
-from subprocess import PIPE
-
-class Start(TestUtilsMixin, unittest.TestCase):
-
-    order = 21
-
-    def start(self, *args):
-        handle = self.runOn(self.masterHost(),
-                            [self.accumulo_sh(), 'org.apache.accumulo.start.TestMain'] +
list(args), stdin=PIPE)
-        out, err = handle.communicate('')
-        return handle.returncode
-
-    def runTest(self):
-        assert self.start() != 0
-        assert self.start('success') == 0
-        assert self.start('exception') != 0
-        
-def suite():
-    result = unittest.TestSuite()
-    result.addTest(Start())
-    return result

http://git-wip-us.apache.org/repos/asf/accumulo/blob/aea43136/test/system/auto/simple/table.py
----------------------------------------------------------------------
diff --git a/test/system/auto/simple/table.py b/test/system/auto/simple/table.py
deleted file mode 100755
index 89f346f..0000000
--- a/test/system/auto/simple/table.py
+++ /dev/null
@@ -1,120 +0,0 @@
-# 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.
-
-import os
-
-import logging
-import unittest
-import time
-import re
-
-from TestUtils import TestUtilsMixin, ROOT, ROOT_PASSWORD, ACCUMULO_DIR
-
-log = logging.getLogger('test.auto')
-
-import readwrite
-
-class TableTest(readwrite.SunnyDayTest):
-    "Make a table, use it, delete it, make it again"
-
-    order = 25
-
-    def createTable(self, table):
-        
-        import tempfile
-        fileno, filename = tempfile.mkstemp()
-        fp = os.fdopen(fileno, "wb") 
-        try:
-            for i in range(0, 999999, 1000):
-                fp.write("%08x\n" % i)
-            fp.flush()
-            fp.close()
-            readwrite.SunnyDayTest.createTable(self, table, filename)
-        finally:
-            os.unlink(filename)
-
-    def sshell(self, msg):
-        return self.rootShell(self.masterHost(), msg)
-
-    def runTest(self):
-        waitTime = 120 * self.options.rows / 1e6 + 60
-
-        self.waitForStop(self.ingester, 90)
-        self.waitForStop(self.verify(self.masterHost(), self.options.rows),
-                         waitTime)
-        
-        #grab the table id before the table is deleted
-        firstTID = self.getTableId('test_ingest')
-
-        #verify things exist before as we expect them to before deleting
-        #since after deleting we check for their absence... this will help
-        #detect changes in system behavior that might require test changes
-
-        #ensure entries in !METADATA
-        out, err, code = self.sshell("table !METADATA\nscan -np\n")
-        self.assert_(code == 0)
-        self.assert_(re.search('^'+firstTID, out, re.MULTILINE))
-
-        #ensure dir in hdfs
-        handle = self.runOn(self.masterHost(),
-                            ['hadoop', 'fs', '-ls', '%s/tables' % ACCUMULO_DIR])
-        out, err = handle.communicate()
-        self.assert_(out.find('%s/tables/%s' % (ACCUMULO_DIR,firstTID)) >= 0)
-
-        #delete the table
-        out, err, code = self.sshell("deletetable test_ingest\nyes\n")
-        self.assert_(code == 0)
-        self.shutdown_accumulo()
-        self.start_accumulo()
-   
-        #ensure no entries in !METADATA 
-        out, err, code = self.sshell("table !METADATA\nscan\n")
-        self.assert_(code == 0)
-        self.assert_(re.search('^'+firstTID, out, re.MULTILINE) == None)
-
-        #ensure no dir in HDFS
-        handle = self.runOn(self.masterHost(),
-                            ['hadoop', 'fs', '-ls', '%s/tables' % ACCUMULO_DIR])
-        out, err = handle.communicate()
-        self.assert_(out.find('%s/tables/%s' % (ACCUMULO_DIR,firstTID)) < 0)
-
-        out, err, code = self.sshell("table test_ingest\nscan -np\n")
-        self.assert_(code != 0)
-	self.assert_(out.find("Not in a table context.") >= 0)
-
-        self.createTable('test_ingest')
-        self.waitForStop(self.ingest(self.masterHost(), self.options.rows), 90)
-        self.waitForStop(self.verify(self.masterHost(), self.options.rows),
-                         waitTime)
-        self.shutdown_accumulo()
-        
-class CreateTableSplitFile(TableTest):
-    def createTable(self, table):
-        import tempfile
-        fileno, filename = tempfile.mkstemp()
-        fp = os.fdopen(fileno, "wb")
-        try:
-            fp.write("a\nb\nc\nd\na\nb\nc\n")
-            fp.close()
-            readwrite.SunnyDayTest.createTable(self, table, filename)
-        finally:
-            os.unlink(filename)
-
-
-def suite():
-    result = unittest.TestSuite()
-    result.addTest(TableTest())
-    result.addTest(CreateTableSplitFile())
-    return result

http://git-wip-us.apache.org/repos/asf/accumulo/blob/aea43136/test/system/auto/simple/tablets.py
----------------------------------------------------------------------
diff --git a/test/system/auto/simple/tablets.py b/test/system/auto/simple/tablets.py
deleted file mode 100755
index e3e952d..0000000
--- a/test/system/auto/simple/tablets.py
+++ /dev/null
@@ -1,55 +0,0 @@
-# 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.
-
-import os
-
-import logging
-import unittest
-import time
-from subprocess import PIPE
-
-from TestUtils import TestUtilsMixin
-
-log = logging.getLogger('test.auto')
-
-N = 10000    # rows to insert, 100 rows per tablet
-WAIT = (N / 1000. + 1) * 60
-
-class LotsOfTablets(TestUtilsMixin, unittest.TestCase):
-
-    order = 80
-
-    settings = TestUtilsMixin.settings.copy()
-    settings.update({
-    	'table.split.threshold':200,
-        'tserver.memory.maps.max':'128M'
-        })
-
-    def runTest(self):
-
-        # initialize the database
-        handle = self.runClassOn(self.masterHost(), 
-		               'org.apache.accumulo.test.CreateTestTable', 
-		               [str(N)])
-	self.waitForStop(handle, WAIT)
-        handle = self.runClassOn(self.masterHost(), 
-		               'org.apache.accumulo.test.CreateTestTable', 
-		               ['-readonly', str(N)])
-        self.waitForStop(handle, WAIT)
-
-def suite():
-    result = unittest.TestSuite()
-    result.addTest(LotsOfTablets())
-    return result

http://git-wip-us.apache.org/repos/asf/accumulo/blob/aea43136/test/system/auto/simple/timeout.py
----------------------------------------------------------------------
diff --git a/test/system/auto/simple/timeout.py b/test/system/auto/simple/timeout.py
deleted file mode 100755
index 6d7765c..0000000
--- a/test/system/auto/simple/timeout.py
+++ /dev/null
@@ -1,29 +0,0 @@
-# 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.
-
-from JavaTest import JavaTest
-
-import unittest
-
-class TimeoutTest(JavaTest):
-    "Test time out"
-
-    order = 91
-    testClass="org.apache.accumulo.test.functional.TimeoutTest"
-
-def suite():
-    result = unittest.TestSuite()
-    result.addTest(TimeoutTest())
-    return result


Mime
View raw message