import com.sun.org.apache.xerces.internal.impl.dtd.models.CMAny;
import com.sun.org.apache.xerces.internal.impl.dv.util.Base64;
-public class MirrorMakerAgent {
+public class MirrorMakerAgent {/*
static final Logger logger = Logger.getLogger(MirrorMakerAgent.class);
Properties mirrorMakerProperties = new Properties();
ListMirrorMaker mirrorMakers = null;
loadProperties();
input = null;
try {
- /*input = new FileInputStream(kafkahome + "/bin/kafka-run-class.sh");*/
+ input = new FileInputStream(kafkahome + "/bin/kafka-run-class.sh");
if(false) {
throw new IOException();
}
out.close();
} catch (IOException e) {
e.printStackTrace();
- logger.error("IOException" + e);
+ logger.error("Exception is : "+e);
}
}
}
}
} catch (Exception e) {
- logger.error("Exception is : " +e);
+ logger.error("Exception at readAgentTopic : " + e);
}
}
} else if (exists == false && mirrorMakers == null) {
mirrorMakers = new ListMirrorMaker();
ArrayList<MirrorMaker> list = mirrorMakers.getListMirrorMaker();
- list = new ArrayList<MirrorMaker>();
+ list = new ArrayList();
list.add(newMirrorMaker);
mirrorMakers.setListMirrorMaker(list);
}
out = new FileOutputStream(mmagenthome + "/etc/mmagent.config");
mirrorMakerProperties.store(out, "");
} catch (IOException ex) {
- ex.printStackTrace();
+ logger.error(" IOException Occered " + ex);
} finally {
if (out != null) {
try {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
+ logger.log(Level.WARN, "Interrupted!", e);
+ Thread.currentThread().interrupt();
}
} catch (IOException ex) {
- ex.printStackTrace();
+ logger.error("Exception at updateWhiteList : " + ex);
} finally {
if (out != null) {
try {
}
}
-}
+*/}