HBASE-11716 LoadTestDataGeneratorWithVisibilityLabels should handle Delete mutations (Anoop Sam John)
This commit is contained in:
parent
886ae4691f
commit
cc5024e6fc
|
@ -19,7 +19,6 @@ package org.apache.hadoop.hbase.security.visibility;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import org.apache.hadoop.classification.InterfaceAudience;
|
import org.apache.hadoop.classification.InterfaceAudience;
|
||||||
import org.apache.hadoop.hbase.client.Delete;
|
|
||||||
import org.apache.hadoop.hbase.client.Get;
|
import org.apache.hadoop.hbase.client.Get;
|
||||||
import org.apache.hadoop.hbase.client.Mutation;
|
import org.apache.hadoop.hbase.client.Mutation;
|
||||||
import org.apache.hadoop.hbase.util.MultiThreadedAction.DefaultDataGenerator;
|
import org.apache.hadoop.hbase.util.MultiThreadedAction.DefaultDataGenerator;
|
||||||
|
@ -78,10 +77,8 @@ public class LoadTestDataGeneratorWithVisibilityLabels extends DefaultDataGenera
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Mutation beforeMutate(long rowkeyBase, Mutation m) throws IOException {
|
public Mutation beforeMutate(long rowkeyBase, Mutation m) throws IOException {
|
||||||
if (!(m instanceof Delete)) {
|
m.setCellVisibility(new CellVisibility(this.visibilityExps[(int) rowkeyBase
|
||||||
m.setCellVisibility(new CellVisibility(this.visibilityExps[(int) rowkeyBase
|
% this.visibilityExps.length]));
|
||||||
% this.visibilityExps.length]));
|
|
||||||
}
|
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue