HDFS-554. Use System.arraycopy in BlockInfo.ensureCapacity. (harsh)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1226239 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Harsh J 2012-01-01 12:06:49 +00:00
parent 11905517f1
commit 8e8203f3c5
2 changed files with 3 additions and 3 deletions

View File

@ -131,6 +131,8 @@ Trunk (unreleased changes)
HDFS-2476. More CPU efficient data structure for under-replicated,
over-replicated, and invalidated blocks. (Tomasz Nykiel via todd)
HDFS-554. Use System.arraycopy in BlockInfo.ensureCapacity. (harsh)
BUG FIXES
HDFS-2299. TestOfflineEditsViewer is failing on trunk. (Uma Maheswara Rao G
via atm)

View File

@ -173,9 +173,7 @@ public class BlockInfo extends Block implements LightWeightGSet.LinkedElement {
* happen only when replication is manually increased by the user. */
Object[] old = triplets;
triplets = new Object[(last+num)*3];
for(int i=0; i < last*3; i++) {
triplets[i] = old[i];
}
System.arraycopy(old, 0, triplets, 0, last*3);
return last;
}