incubator-accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject svn commit: r1230280 - in /incubator/accumulo/branches/1.4: docs/examples/README.isolation src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/isolation/InterferenceTest.java
Date Wed, 11 Jan 2012 22:11:26 GMT
Author: kturner
Date: Wed Jan 11 22:11:26 2012
New Revision: 1230280

URL: http://svn.apache.org/viewvc?rev=1230280&view=rev
Log:
ACCUMULO-284 ACCUMULO-308 Added example readme for isolation.  Fixed isolation example.

Added:
    incubator/accumulo/branches/1.4/docs/examples/README.isolation
Modified:
    incubator/accumulo/branches/1.4/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/isolation/InterferenceTest.java

Added: incubator/accumulo/branches/1.4/docs/examples/README.isolation
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/docs/examples/README.isolation?rev=1230280&view=auto
==============================================================================
--- incubator/accumulo/branches/1.4/docs/examples/README.isolation (added)
+++ incubator/accumulo/branches/1.4/docs/examples/README.isolation Wed Jan 11 22:11:26 2012
@@ -0,0 +1,50 @@
+Title: Isolation Example
+Notice:    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.
+
+
+Accumulo has an isolated scanners that ensures partial changes to rows are not
+seen.  Isolation is documented in ../docs/isolation.html and the user manual.  
+
+InterferenceTest is a simple example that shows the effects of scanning with
+and without isolation.  This program starts two threads.  One threads
+continually upates all of the values in a row to be the same thing, but
+different from what it used to be.  The other thread continually scans the
+table and checks that all values in a row are the same.  Without isolation the
+scanning thread will sometimes see different values, which is the result of
+reading the row at the same time a mutation is changing the row.
+
+Below, Interference Test is run without isolation enabled for 5000 iterations
+and it reports problems.
+
+    $ ./bin/accumulo org.apache.accumulo.examples.simple.isolation.InterferenceTest instance
zookeepers username password isotest 5000 false
+    ERROR Columns in row 053 had multiple values [53, 4553]
+    ERROR Columns in row 061 had multiple values [561, 61]
+    ERROR Columns in row 070 had multiple values [570, 1070]
+    ERROR Columns in row 079 had multiple values [1079, 1579]
+    ERROR Columns in row 088 had multiple values [2588, 1588]
+    ERROR Columns in row 106 had multiple values [2606, 3106]
+    ERROR Columns in row 115 had multiple values [4615, 3115]
+    finished
+
+Below, Interference Test is run with isolation enabled for 5000 iterations and
+it reports no problems.
+
+    $ ./bin/accumulo org.apache.accumulo.examples.simple.isolation.InterferenceTest instance
zookeepers username password isotest 5000 true
+    finished
+
+

Modified: incubator/accumulo/branches/1.4/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/isolation/InterferenceTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/isolation/InterferenceTest.java?rev=1230280&r1=1230279&r2=1230280&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/isolation/InterferenceTest.java
(original)
+++ incubator/accumulo/branches/1.4/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/isolation/InterferenceTest.java
Wed Jan 11 22:11:26 2012
@@ -98,7 +98,7 @@ public class InterferenceTest {
     
     @Override
     public void run() {
-      while (stop) {
+      while (!stop) {
         ByteSequence row = null;
         int count = 0;
         



Mime
View raw message