ServiceComponent sc1 = serviceComponentFactory.createNew(s1, "DATANODE");
s1.addServiceComponent(sc1);
sc1.setDesiredState(State.UNINSTALLED);
sc1.persist();
ServiceComponentHost sch1 = serviceComponentHostFactory.createNew(sc1, "h1");
sc1.addServiceComponentHost(sch1);
sch1.setDesiredState(State.INSTALLED);
sch1.setState(State.INSTALLING);
sch1.setDesiredStackVersion(new StackId("HDP-1.1.0"));
sch1.setStackVersion(new StackId("HDP-0.1"));