You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by bi...@apache.org on 2011/12/01 23:49:17 UTC

svn commit: r1209290 - in /incubator/accumulo/trunk: ./ test/system/auto/simple/shell.py

Author: billie
Date: Thu Dec  1 22:49:17 2011
New Revision: 1209290

URL: http://svn.apache.org/viewvc?rev=1209290&view=rev
Log:
ACCUMULO-200 merged to trunk

Modified:
    incubator/accumulo/trunk/   (props changed)
    incubator/accumulo/trunk/test/system/auto/simple/shell.py

Propchange: incubator/accumulo/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec  1 22:49:17 2011
@@ -1,2 +1,2 @@
 /incubator/accumulo/branches/1.3:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031,1209124
-/incubator/accumulo/branches/1.4:1201902-1209272
+/incubator/accumulo/branches/1.4:1201902-1209288

Modified: incubator/accumulo/trunk/test/system/auto/simple/shell.py
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/test/system/auto/simple/shell.py?rev=1209290&r1=1209289&r2=1209290&view=diff
==============================================================================
--- incubator/accumulo/trunk/test/system/auto/simple/shell.py (original)
+++ incubator/accumulo/trunk/test/system/auto/simple/shell.py Thu Dec  1 22:49:17 2011
@@ -36,6 +36,7 @@ class ShellTest(TestUtilsMixin,unittest.
         TestUtilsMixin.setUp(self)
         
     def runTest(self):
+        self.setIterTest()
         self.aggTest()
         self.iteratorsTest()
         self.createtableTestSplits()
@@ -56,8 +57,37 @@ class ShellTest(TestUtilsMixin,unittest.
         self.getauthsTest()
         
         
+    def setIterTest(self):
+        input = 'setiter -t setitertest -n mymax -scan -p 10 -class org.apache.accumulo.core.iterators.user.MaxCombiner\ncf\nSTRING\n'
+        out,err,code = self.rootShell(self.masterHost(),input)
+        self.failUnless(out.find("TableNotFoundException") >= 0,
+                        "Was able to setiter a table that didn't exist")
+        input = 'createtable setitertest\n'
+        out,err,code = self.rootShell(self.masterHost(),input)
+        self.processResult(out, err, code)
+        input = 'setiter -t setitertest -n mymax -scan -p 10 -class org.apache.accumulo.core.iterators.user.MaxCombiner\ncf1\nSTRING\n'
+        out,err,code = self.rootShell(self.masterHost(),input)
+        self.processResult(out, err, code)
+        input = 'setiter -t setitertest -n mymax -scan -p 10 -class org.apache.accumulo.core.iterators.user.MinCombiner\ncf2\nSTRING\n'
+        out,err,code = self.rootShell(self.masterHost(),input)
+        self.failUnless(out.find("IllegalArgumentException") >= 0,
+                        "Was able to configure same iter name twice")
+        input = 'setiter -t setitertest -n mymin -scan -p 10 -class org.apache.accumulo.core.iterators.user.MinCombiner\ncf2\nSTRING\n'
+        out,err,code = self.rootShell(self.masterHost(),input)
+        self.failUnless(out.find("IllegalArgumentException") >= 0,
+                        "Was able to configure same prioritytwice")
+        input = 'setiter -t setitertest -n mymin -scan -p 11 -class org.apache.accumulo.core.iterators.user.MinCombiner\ncf2\nSTRING\n'
+        out,err,code = self.rootShell(self.masterHost(),input)
+        self.processResult(out, err, code)
+        input = 'table setitertest\ninsert row1 cf1 cq 10\ninsert row1 cf1 cq 30\ninsert row1 cf1 cq 20\ninsert row1 cf2 cq 10\ninsert row1 cf2 cq 30\nscan -np\n'
+        out,err,code = self.rootShell(self.masterHost(),input)
+        self.processResult(out, err, code)
+        self.failIf(out.find("row1 cf1:cq []    30") == -1 or out.find("row1 cf2:cq []    10") == -1,
+                        "Config Failed:  combining failed")
+
+        
     def aggTest(self):
-        input = 'createtable aggtest\nsetiter -t aggtest -agg -n myagg -scan -p 10\ns org.apache.accumulo.core.iterators.aggregation.StringSummation\n\nquit\n'
+        input = 'createtable aggtest\nsetiter -t aggtest -n myagg -scan -p 10 -class org.apache.accumulo.core.iterators.user.SummingCombiner\ns\nSTRING\n\nquit\n'
         out,err,code = self.rootShell(self.masterHost(),input)
         self.processResult(out, err, code)
         input = 'table aggtest\ninsert row1 s c 10\ninsert row1 s c 30\nscan -np\n'