Author: rangadi
Date: Tue Sep  1 19:10:56 2009
New Revision: 810177

URL: http://svn.apache.org/viewvc?rev=810177&view=rev
Log:
PIG-918 Fix infinite loop only columns in first column group are
specified. (Yan Zhou via rangadi)

Modified:
    hadoop/pig/trunk/contrib/zebra/CHANGES.txt
    
hadoop/pig/trunk/contrib/zebra/src/java/org/apache/hadoop/zebra/io/BasicTable.java

Modified: hadoop/pig/trunk/contrib/zebra/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/contrib/zebra/CHANGES.txt?rev=810177&r1=810176&r2=810177&view=diff
==============================================================================
--- hadoop/pig/trunk/contrib/zebra/CHANGES.txt (original)
+++ hadoop/pig/trunk/contrib/zebra/CHANGES.txt Tue Sep  1 19:10:56 2009
@@ -2,4 +2,8 @@
 
 Trunk (unreleased changes)
 
+  BUG FIXES
 
+    PIG-918 Fix infinite loop only columns in first column group are
+    specified. (Yan Zhou via rangadi)
+  

Modified: 
hadoop/pig/trunk/contrib/zebra/src/java/org/apache/hadoop/zebra/io/BasicTable.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/contrib/zebra/src/java/org/apache/hadoop/zebra/io/BasicTable.java?rev=810177&r1=810176&r2=810177&view=diff
==============================================================================
--- 
hadoop/pig/trunk/contrib/zebra/src/java/org/apache/hadoop/zebra/io/BasicTable.java
 (original)
+++ 
hadoop/pig/trunk/contrib/zebra/src/java/org/apache/hadoop/zebra/io/BasicTable.java
 Tue Sep  1 19:10:56 2009
@@ -697,7 +697,7 @@
 
         while (true)
         {
-          int index = random.nextInt(cgScanners.length - 1) + 1;
+          int index = random.nextInt(cgScanners.length);
           if (cgScanners[index] != null) {
             if (cgScanners[index].atEnd() != ret) {
               throw new IOException(
@@ -734,7 +734,7 @@
 
         while (true)
         {
-          int index = random.nextInt(cgScanners.length - 1) + 1;
+          int index = random.nextInt(cgScanners.length);
           if (cgScanners[index] != null)
           {
             BytesWritable key2 = new BytesWritable();


Reply via email to