### Eclipse Workspace Patch 1.0 #P hama-trunk Index: src/java/org/apache/hama/Constants.java =================================================================== --- src/java/org/apache/hama/Constants.java (revision 684720) +++ src/java/org/apache/hama/Constants.java (working copy) @@ -19,20 +19,18 @@ */ package org.apache.hama; -import org.apache.hadoop.io.Text; - /** * Some constants used in the hama */ public class Constants { /** Meta-columnfamily to store the matrix-info */ - public final static Text METADATA = new Text("metadata:"); + public final static String METADATA = "metadata:"; /** The number of the matrix rows */ - public final static Text METADATA_ROWS = new Text("metadata:rows"); + public final static String METADATA_ROWS = "metadata:rows"; /** The number of the matrix columns */ - public final static Text METADATA_COLUMNS = new Text("metadata:columns"); + public final static String METADATA_COLUMNS = "metadata:columns"; /** The type of the matrix */ - public final static Text METADATA_TYPE = new Text("metadata:type"); + public final static String METADATA_TYPE = "metadata:type"; /** Default columnfamily name */ public final static String COLUMN = "column:"; Index: src/java/org/apache/hama/AbstractMatrix.java =================================================================== --- src/java/org/apache/hama/AbstractMatrix.java (revision 684717) +++ src/java/org/apache/hama/AbstractMatrix.java (working copy) @@ -49,10 +49,6 @@ protected HTable table; /** Matrix attribute description */ protected HTableDescriptor tableDesc; - /** The parallel degree of map function */ - protected int mapper; - /** The parallel degree of reduce function */ - protected int reducer; /** * Sets the job configuration @@ -66,8 +62,6 @@ } catch (MasterNotRunningException e) { LOG.info(e); } - mapper = conf.getInt("mapred.map.tasks", 1); - reducer = conf.getInt("mapred.reduce.tasks", 1); } /** @@ -85,8 +79,8 @@ /** {@inheritDoc} */ public double get(int i, int j) { - Text row = new Text(String.valueOf(i)); - Text column = new Text(Constants.COLUMN + String.valueOf(j)); + String row = String.valueOf(i); + String column = Constants.COLUMN + String.valueOf(j); Cell c; double result = -1; try { @@ -105,8 +99,7 @@ try { return new Vector(row, table.getRow(String.valueOf(row))); } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); + LOG.error(e, e); } return null; } @@ -116,7 +109,7 @@ try { return new Vector(bytesToInt(row), table.getRow(row)); } catch (IOException e) { - e.printStackTrace(); + LOG.error(e, e); } return null; } @@ -156,7 +149,7 @@ } /** {@inheritDoc} */ - public void add(int i, int j, double d) { + public void add(int i, int j, double value) { // TODO Auto-generated method stub }