Open dttlgotv opened 4 years ago
The default cpu config is 1 for each component. Container requires some overhead hence there is no way to schedule instances into containers. To fix the problem, you need to config the cpu requirement for each component to be less than 1.
I have created a PR to show how to config. https://github.com/apache/incubator-heron/pull/3496 For now we have to use the low level config because the it is not convenient to config components with the Streamlet config class.
After I write a very simple example , a error is hint when I submit it like below:
org.apache.heron.scheduler.SubmitterMain: Exception when submitting topology org.apache.heron.spi.packing.PackingException: Invalid packing plan generated. No enough CPU to allocate for unspecified instances at org.apache.heron.packing.roundrobin.RoundRobinPacking.calculateInstancesResourceMapInContainer(RoundRobinPacking.java:355) at org.apache.heron.packing.roundrobin.RoundRobinPacking.packInternal(RoundRobinPacking.java:173) at org.apache.heron.packing.roundrobin.RoundRobinPacking.pack(RoundRobinPacking.java:143) at org.apache.heron.scheduler.utils.LauncherUtils.createPackingPlan(LauncherUtils.java:71) at org.apache.heron.scheduler.SubmitterMain.submitTopology(SubmitterMain.java:444) at org.apache.heron.scheduler.SubmitterMain.main(SubmitterMain.java:334)
[2020-03-21 11:51:43 +0800] [ERROR]: Invalid packing plan generated. No enough CPU to allocate for unspecified instances [2020-03-21 11:51:43 +0800] [ERROR]: Failed to launch topology 'Test2Topology'
This topology is : public static void main(String[] args) throws Exception { Builder builder = Builder.newBuilder();
} }