Hi, I haven't looked at the issue with the builder ignoring the settings you added, but as a working example of adding custom flags to Kudu master and tablet servers you can take a look at: https://github.com/apache/kudu/blob/90aa4fa7d1527f376803440a4642668e3d798748/java/kudu-client/src/test/java/org/apache/kudu/client/TestNegotiation.java#L48-L52 and https://github.com/apache/kudu/blob/90aa4fa7d1527f376803440a4642668e3d798748/java/kudu-client/src/test/java/org/apache/kudu/client/TestTimeouts.java#L94 (I guess in this context a custom MiniKuduClusterBuilder isn't necessary).
It seems in case of running tests at machines with less memory it's worth setting --block_cache_type to something low for both master and tablet servers (like 128MB: --block_cache_type=134217728) because master and tserver will eat up some memory once started. An alternative option is to add --force_block_cache_capacity flag to both master's and tserver's flags. HTH, Alexey On Wed, Oct 7, 2020 at 4:14 AM <stephen.hindma...@bt.com> wrote: > I am trying to follow the guide to using the KuduTestHarness in the > Getting Started guide. I have created the following simple test case. > > === > import org.apache.kudu.test.KuduTestHarness; > > import static org.junit.Assert.assertTrue; > import org.junit.Rule; > import org.junit.Test; > > public class DemoTest{ > @Rule > public KuduTestHarness harness=new KuduTestHarness(); > > @Test > public void testDemo(){ > assertTrue(true); > } > } > === > > But I get the following errors in the console log. > > === > 2020-10-07 11:50:01,060 [cluster stderr printer] INFO > org.apache.kudu.test.cluster.MiniKuduCluster - E1007 11:50:01.059237 17257 > block_cache.cc:99] Block cache capacity exceeds the memory pressure > threshold (536870912 bytes vs. 498776800 bytes). This will cause > instability and harmful flushing behavior. Lower --block_cache_capacity_mb > or raise --memory_limit_hard_bytes. > > 2020-10-07 11:50:01,060 [cluster stderr printer] INFO > org.apache.kudu.test.cluster.MiniKuduCluster - E1007 11:50:01.059262 17257 > flags.cc:441] Detected inconsistency in command-line flags; exiting > > 2020-10-07 11:50:01,100 [main] DEBUG > org.apache.kudu.test.cluster.MiniKuduCluster - Response: error { > code: RUNTIME_ERROR > message: "failed to start masters: Unable to start Master at index 0: > /tmp/kudu-binary-jar1893943400146501302/kudu-binary-1.13.0-linux-x86_64/bin/kudu-master: > process exited with non-zero status 1" > } > === > > I tried adding a flag to the base builder, but it does not have any > affect. The new flag does not show up in the list of flags in the logs. > > === > import org.apache.kudu.test.cluster.MiniKuduCluster.MiniKuduClusterBuilder; > > ... > > static{ > MiniKuduClusterBuilder > builder=KuduTestHarness.getBaseClusterBuilder(); > builder.addMasterServerFlag("--block_cache_capacity_mb=498776800"); > } > ... > === > > Can someone point me in the right direction for solving this problem. > > Thanks > Steve Hindmarch >