incubator-hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edwardy...@apache.org
Subject svn commit: r688944 - in /incubator/hama/trunk: CHANGES.txt src/java/org/apache/hama/DenseVector.java src/java/org/apache/hama/io/VectorWritable.java src/java/org/apache/hama/mapred/DenseMap.java src/java/org/apache/hama/mapred/MatrixInputFormatBase.java
Date Tue, 26 Aug 2008 03:02:53 GMT
Author: edwardyoon
Date: Mon Aug 25 20:02:52 2008
New Revision: 688944

URL: http://svn.apache.org/viewvc?rev=688944&view=rev
Log:
Remove findbugs warnings.

Modified:
    incubator/hama/trunk/CHANGES.txt
    incubator/hama/trunk/src/java/org/apache/hama/DenseVector.java
    incubator/hama/trunk/src/java/org/apache/hama/io/VectorWritable.java
    incubator/hama/trunk/src/java/org/apache/hama/mapred/DenseMap.java
    incubator/hama/trunk/src/java/org/apache/hama/mapred/MatrixInputFormatBase.java

Modified: incubator/hama/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/CHANGES.txt?rev=688944&r1=688943&r2=688944&view=diff
==============================================================================
--- incubator/hama/trunk/CHANGES.txt (original)
+++ incubator/hama/trunk/CHANGES.txt Mon Aug 25 20:02:52 2008
@@ -19,6 +19,7 @@
     
   IMPROVEMENTS
   
+    HAMA-44: Remove findbugs warnings (edwardyoon)
     HAMA-40: Rename MatrixInterface to Matrix (edwardyoon)
     HAMA-14: Using Java 6 (edwardyoon)
     HAMA-22: Add IRC channel information to website (edwardyoon)

Modified: incubator/hama/trunk/src/java/org/apache/hama/DenseVector.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/java/org/apache/hama/DenseVector.java?rev=688944&r1=688943&r2=688944&view=diff
==============================================================================
--- incubator/hama/trunk/src/java/org/apache/hama/DenseVector.java (original)
+++ incubator/hama/trunk/src/java/org/apache/hama/DenseVector.java Mon Aug 25 20:02:52 2008
@@ -38,7 +38,8 @@
   }
 
   public DenseVector(final byte[] row, final HbaseMapWritable<byte[], Cell> m) {
-    this.row = row;
+    byte[] key = row;
+    this.row = key;
     this.cells = m;
   }
 
@@ -54,7 +55,8 @@
    * Get the row for this Vector
    */
   public byte[] getRow() {
-    return row;
+    byte[] key = row;
+    return key;
   }
 
   public HbaseMapWritable<byte[], Cell> getCells() {

Modified: incubator/hama/trunk/src/java/org/apache/hama/io/VectorWritable.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/java/org/apache/hama/io/VectorWritable.java?rev=688944&r1=688943&r2=688944&view=diff
==============================================================================
--- incubator/hama/trunk/src/java/org/apache/hama/io/VectorWritable.java (original)
+++ incubator/hama/trunk/src/java/org/apache/hama/io/VectorWritable.java Mon Aug 25 20:02:52
2008
@@ -160,7 +160,7 @@
           sb.append(ioe.toString());
         }
       } else {
-        sb.append(value);
+        sb.append(Bytes.toString(value));
       }
       sb.append(")");
     }
@@ -188,13 +188,12 @@
     }
 
     public byte[] getKey() {
-      return column;
+      byte[] key = column;
+      return key;
     }
 
     public Cell getValue() {
       return cell;
     }
-
   }
-
 }

Modified: incubator/hama/trunk/src/java/org/apache/hama/mapred/DenseMap.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/java/org/apache/hama/mapred/DenseMap.java?rev=688944&r1=688943&r2=688944&view=diff
==============================================================================
--- incubator/hama/trunk/src/java/org/apache/hama/mapred/DenseMap.java (original)
+++ incubator/hama/trunk/src/java/org/apache/hama/mapred/DenseMap.java Mon Aug 25 20:02:52
2008
@@ -40,7 +40,7 @@
 public abstract class DenseMap<K extends WritableComparable, V extends Writable>
     extends MapReduceBase implements
     Mapper<ImmutableBytesWritable, DenseVector, K, V> {
-  public static Matrix MATRIX_B;
+  protected static Matrix MATRIX_B;
 
   public static void initJob(String matrixA, String matrixB,
       Class<? extends DenseMap> mapper,

Modified: incubator/hama/trunk/src/java/org/apache/hama/mapred/MatrixInputFormatBase.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/java/org/apache/hama/mapred/MatrixInputFormatBase.java?rev=688944&r1=688943&r2=688944&view=diff
==============================================================================
--- incubator/hama/trunk/src/java/org/apache/hama/mapred/MatrixInputFormatBase.java (original)
+++ incubator/hama/trunk/src/java/org/apache/hama/mapred/MatrixInputFormatBase.java Mon Aug
25 20:02:52 2008
@@ -98,14 +98,16 @@
      * @param inputColumns the columns to be placed in {@link DenseVector}.
      */
     public void setInputColumns(final byte[][] inputColumns) {
-      this.trrInputColumns = inputColumns;
+      byte[][] columns = inputColumns;
+      this.trrInputColumns = columns;
     }
 
     /**
      * @param startRow the first row in the split
      */
     public void setStartRow(final byte[] startRow) {
-      this.startRow = startRow;
+      byte[] sRow = startRow;
+      this.startRow = sRow;
     }
 
     /**
@@ -113,7 +115,8 @@
      * @param endRow the last row in the split
      */
     public void setEndRow(final byte[] endRow) {
-      this.endRow = endRow;
+      byte[] eRow = endRow;
+      this.endRow = eRow;
     }
 
     /**
@@ -225,7 +228,11 @@
    *      int)
    */
   public InputSplit[] getSplits(JobConf job, int numSplits) throws IOException {
-    byte[][] startKeys = this.table.getStartKeys();
+    byte[][] startKeys = null;
+    try {
+      startKeys = this.table.getStartKeys();
+    } catch (NullPointerException ne) {}
+    
     if (startKeys == null || startKeys.length == 0) {
       throw new IOException("Expecting at least one region");
     }



Mime
View raw message