use of org.apache.accumulo.test.VerifyIngest.VerifyParams in project accumulo by apache.
the class ReadWriteIT method verify.
private static void verify(AccumuloClient accumuloClient, ClientInfo info, int rows, int cols, int width, int offset, String colf, String tableName) throws Exception {
VerifyParams params = new VerifyParams(info.getProperties(), tableName, rows);
params.rows = rows;
params.dataSize = width;
params.startRow = offset;
params.columnFamily = colf;
params.cols = cols;
VerifyIngest.verifyIngest(accumuloClient, params);
}
use of org.apache.accumulo.test.VerifyIngest.VerifyParams in project accumulo by apache.
the class RestartIT method killedTabletServer.
@Test
public void killedTabletServer() throws Exception {
try (AccumuloClient c = Accumulo.newClient().from(getClientProps()).build()) {
String tableName = getUniqueNames(1)[0];
c.tableOperations().create(tableName);
VerifyParams params = new VerifyParams(getClientProps(), tableName, 10_000);
TestIngest.ingest(c, params);
VerifyIngest.verifyIngest(c, params);
cluster.getClusterControl().stopAllServers(ServerType.TABLET_SERVER);
cluster.start();
VerifyIngest.verifyIngest(c, params);
}
}
use of org.apache.accumulo.test.VerifyIngest.VerifyParams in project accumulo by apache.
the class RestartIT method shutdownDuringCompactingSplitting.
@Test
public void shutdownDuringCompactingSplitting() throws Exception {
try (AccumuloClient c = Accumulo.newClient().from(getClientProps()).build()) {
String tableName = getUniqueNames(1)[0];
VerifyParams params = new VerifyParams(getClientProps(), tableName, 10_000);
c.tableOperations().create(tableName);
c.tableOperations().setProperty(tableName, Property.TABLE_SPLIT_THRESHOLD.getKey(), "10K");
String splitThreshold = null;
for (Entry<String, String> entry : c.tableOperations().getProperties(tableName)) {
if (entry.getKey().equals(Property.TABLE_SPLIT_THRESHOLD.getKey())) {
splitThreshold = entry.getValue();
break;
}
}
assertNotNull(splitThreshold);
try {
c.tableOperations().setProperty(MetadataTable.NAME, Property.TABLE_SPLIT_THRESHOLD.getKey(), "20K");
TestIngest.ingest(c, params);
c.tableOperations().flush(tableName, null, null, false);
VerifyIngest.verifyIngest(c, params);
getCluster().stop();
} finally {
if (getClusterType() == ClusterType.STANDALONE) {
getCluster().start();
c.tableOperations().setProperty(MetadataTable.NAME, Property.TABLE_SPLIT_THRESHOLD.getKey(), splitThreshold);
}
}
}
}
use of org.apache.accumulo.test.VerifyIngest.VerifyParams in project accumulo by apache.
the class RestartIT method restartManager.
@Test
public void restartManager() throws Exception {
try (AccumuloClient c = Accumulo.newClient().from(getClientProps()).build()) {
final String tableName = getUniqueNames(1)[0];
c.tableOperations().create(tableName);
final ClusterControl control = getCluster().getClusterControl();
VerifyParams params = new VerifyParams(getClientProps(), tableName, 10_000);
Future<Integer> ret = svc.submit(() -> {
try {
return control.exec(TestIngest.class, new String[] { "-c", cluster.getClientPropsPath(), "--rows", "" + params.rows, "--table", tableName });
} catch (IOException e) {
log.error("Error running TestIngest", e);
return -1;
}
});
control.stopAllServers(ServerType.MANAGER);
control.startAllServers(ServerType.MANAGER);
assertEquals(0, ret.get().intValue());
VerifyIngest.verifyIngest(c, params);
}
}
use of org.apache.accumulo.test.VerifyIngest.VerifyParams in project accumulo by apache.
the class ChaoticBalancerIT method test.
@Test
public void test() throws Exception {
try (AccumuloClient c = Accumulo.newClient().from(getClientProps()).build()) {
String[] names = getUniqueNames(1);
String tableName = names[0];
NewTableConfiguration ntc = new NewTableConfiguration();
ntc.setProperties(Stream.of(new Pair<>(Property.TABLE_SPLIT_THRESHOLD.getKey(), "10K"), new Pair<>(Property.TABLE_FILE_COMPRESSED_BLOCK_SIZE.getKey(), "1K")).collect(Collectors.toMap(Pair::getFirst, Pair::getSecond)));
c.tableOperations().create(tableName, ntc);
VerifyParams params = new VerifyParams(getClientProps(), tableName, 20_000);
TestIngest.ingest(c, params);
c.tableOperations().flush(tableName, null, null, true);
VerifyIngest.verifyIngest(c, params);
}
}
Aggregations