HBASE-4685 TestDistributedLogSplitting.testOrphanLogCreation failing because of ArithmeticException: / by zero.
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1190048 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
421ae8504c
commit
1a78bd8828
|
@ -410,6 +410,8 @@ Release 0.92.0 - Unreleased
|
|||
HBASE-4634 "test.build.data" property overused leading to write data at the
|
||||
wrong place (nkeywal)
|
||||
HBASE-4388 Second start after migration from 90 to trunk crashes
|
||||
HBASE-4685 TestDistributedLogSplitting.testOrphanLogCreation failing because
|
||||
of ArithmeticException: / by zero.
|
||||
|
||||
TESTS
|
||||
HBASE-4450 test for number of blocks read: to serve as baseline for expected
|
||||
|
|
|
@ -360,20 +360,22 @@ public class TestDistributedLogSplitting {
|
|||
int n = hris.size();
|
||||
int[] counts = new int[n];
|
||||
int j = 0;
|
||||
for (int i = 0; i < num_edits; i += 1) {
|
||||
WALEdit e = new WALEdit();
|
||||
byte [] row = Bytes.toBytes("r" + Integer.toString(i));
|
||||
byte [] family = Bytes.toBytes("f");
|
||||
byte [] qualifier = Bytes.toBytes("c" + Integer.toString(i));
|
||||
e.add(new KeyValue(row, family, qualifier,
|
||||
System.currentTimeMillis(), value));
|
||||
// LOG.info("Region " + i + ": " + e);
|
||||
j++;
|
||||
log.append(hris.get(j % n), table, e, System.currentTimeMillis(), htd);
|
||||
counts[j % n] += 1;
|
||||
// if ((i % 8096) == 0) {
|
||||
if (n > 0) {
|
||||
for (int i = 0; i < num_edits; i += 1) {
|
||||
WALEdit e = new WALEdit();
|
||||
byte [] row = Bytes.toBytes("r" + Integer.toString(i));
|
||||
byte [] family = Bytes.toBytes("f");
|
||||
byte [] qualifier = Bytes.toBytes("c" + Integer.toString(i));
|
||||
e.add(new KeyValue(row, family, qualifier,
|
||||
System.currentTimeMillis(), value));
|
||||
// LOG.info("Region " + i + ": " + e);
|
||||
j++;
|
||||
log.append(hris.get(j % n), table, e, System.currentTimeMillis(), htd);
|
||||
counts[j % n] += 1;
|
||||
// if ((i % 8096) == 0) {
|
||||
// log.sync();
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
log.sync();
|
||||
log.close();
|
||||
|
|
Loading…
Reference in New Issue