lilyService.stop();
System.out.println("Lily stopped");
// Clear HBase tables
System.out.println("Clearing HBase tables");
CleanupUtil cleanupUtil = new CleanupUtil(hadoopService.getConf(), "localhost:2181");
cleanupUtil.cleanTables();
HConnectionManager.deleteConnection(hadoopService.getConf(), true);
// Clear Lily ZooKeeper state
System.out.println("Clearing Lily's ZooKeeper state");
cleanupUtil.cleanZooKeeper();
// Clear replication stat
List<String> peerIds = cleanupUtil.cleanHBaseReplicas();
for (String peerId : peerIds) {
new ReplicationPeerUtil().waitOnReplicationPeerStopped(peerId);
}
// Clear Blobs on hdfs blobstore
String dfsUri = "hdfs://localhost:8020/lily/blobs";
System.out.println("Clearing HDFS Blob Store on " + dfsUri);
cleanupUtil.cleanBlobStore(new URI(dfsUri));
// Clear Solr state
clearSolrState();
// The following is useful to observe what threads were not stopped properly after stopping Lily