public static ContentSource getOutputContentSource(Configuration conf,
String hostName)
throws XccConfigException, IOException {
String user = conf.get(OUTPUT_USERNAME, "");
String password = conf.get(OUTPUT_PASSWORD, "");
String port = conf.get(OUTPUT_PORT,"8000");
String db = conf.get(OUTPUT_DATABASE_NAME);
int portInt = Integer.parseInt(port);
boolean useSsl = conf.getBoolean(OUTPUT_USE_SSL, false);
if (useSsl) {
return getSecureContentSource(hostName, portInt, user, password,
db, getOutputSslOptions(conf));
}
return ContentSourceFactory.newContentSource(hostName, portInt,
user, password, db);
}