You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hama.apache.org by ch...@apache.org on 2008/08/20 23:48:26 UTC
svn commit: r687479 -
/incubator/hama/trunk/src/java/org/apache/hama/io/VectorWritable.java
Author: chanwit
Date: Wed Aug 20 14:48:26 2008
New Revision: 687479
URL: http://svn.apache.org/viewvc?rev=687479&view=rev
Log:
refactored
Modified:
incubator/hama/trunk/src/java/org/apache/hama/io/VectorWritable.java
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=687479&r1=687478&r2=687479&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 Wed Aug 20 14:48:26 2008
@@ -39,24 +39,22 @@
import org.apache.hama.Vector;
import org.apache.log4j.Logger;
-public class VectorWritable extends AbstractBase implements Writable,
- Map<byte[], Cell> {
- static final Logger LOG = Logger.getLogger(VectorWritable.class);
+public class VectorWritable extends AbstractBase implements Writable, Map<byte[], Cell> {
+
+ private static final Logger LOG = Logger.getLogger(VectorWritable.class);
+
public byte[] row;
public HbaseMapWritable<byte[], Cell> cells;
- public Cell put(@SuppressWarnings("unused")
- byte[] key, @SuppressWarnings("unused")
- Cell value) {
+ public Cell put(byte[] key, Cell value) {
throw new UnsupportedOperationException("VectorDatum is read-only!");
}
public Cell get(Object key) {
- return (Cell) this.cells.get(key);
+ return this.cells.get(key);
}
- public Cell remove(@SuppressWarnings("unused")
- Object key) {
+ public Cell remove(Object key) {
throw new UnsupportedOperationException("VectorDatum is read-only!");
}
@@ -64,8 +62,7 @@
return cells.containsKey(key);
}
- public boolean containsValue(@SuppressWarnings("unused")
- Object value) {
+ public boolean containsValue(Object value) {
throw new UnsupportedOperationException("Don't support containsValue!");
}
@@ -108,13 +105,11 @@
}
public VectorWritable addition(byte[] bs, Vector v2) {
- // TODO Auto-generated method stub
- return null;
+ throw new UnsupportedOperationException("Not implemented yet");
}
public void putAll(Map<? extends byte[], ? extends Cell> m) {
- // TODO Auto-generated method stub
-
+ throw new UnsupportedOperationException("Not implemented yet");
}
/**
@@ -177,9 +172,12 @@
}
/**
- * Row entry.
- */
+ *
+ * The inner class for an entry of row.
+ *
+ **/
public class Entries implements Map.Entry<byte[], Cell> {
+
private final byte[] column;
private final Cell cell;
@@ -188,8 +186,7 @@
this.cell = cell;
}
- public Cell setValue(@SuppressWarnings("unused")
- Cell c) {
+ public Cell setValue(Cell c) {
throw new UnsupportedOperationException("VectorDatum is read-only!");
}
@@ -200,5 +197,7 @@
public Cell getValue() {
return cell;
}
+
}
+
}