commit | 11f6604f88c3577e406d78197d5a4bf763d9e14d | [log] [tgz] |
---|---|---|
author | buyingyi <buyingyi@gmail.com> | Fri Oct 18 00:34:16 2013 -0700 |
committer | buyingyi <buyingyi@gmail.com> | Fri Oct 18 00:34:16 2013 -0700 |
tree | c48a42425029196bb7b403650c1d6e2f625abacd | |
parent | 04f685e138b6df997a962d9205055f5ecd37c426 [diff] |
use in-place update for smaller sized updates
diff --git a/pregelix/pregelix-dataflow-std/src/main/java/edu/uci/ics/pregelix/dataflow/util/CopyUpdateUtil.java b/pregelix/pregelix-dataflow-std/src/main/java/edu/uci/ics/pregelix/dataflow/util/CopyUpdateUtil.java index 58ec8ab..c71da7a 100644 --- a/pregelix/pregelix-dataflow-std/src/main/java/edu/uci/ics/pregelix/dataflow/util/CopyUpdateUtil.java +++ b/pregelix/pregelix-dataflow-std/src/main/java/edu/uci/ics/pregelix/dataflow/util/CopyUpdateUtil.java
@@ -37,7 +37,7 @@ int srcStart = fieldEndOffsets[0]; int srcLen = fieldEndOffsets[1] - fieldEndOffsets[0]; // the updated vertex size int frSize = frameTuple.getFieldLength(1); // the vertex binary size in the leaf page - if (srcLen == frSize) { + if (srcLen <= frSize) { System.arraycopy(cloneUpdateTb.getByteArray(), srcStart, frameTuple.getFieldData(1), frameTuple.getFieldStart(1), srcLen); cloneUpdateTb.reset();