/** * Get content source for input server. * @param conf job configuration. * @return ContentSource for input server. * @throws URISyntaxException * @throws XccConfigException * @throws IOException */ public static ContentSource getInputContentSource(Configuration conf) throws URISyntaxException, XccConfigException, IOException { String host = conf.getStrings(INPUT_HOST)[0]; if (host == null || host.isEmpty()) { throw new IllegalArgumentException(INPUT_HOST + " is not specified."); } return getInputContentSource(conf, host); }
static void setQueryTimestamp(Configuration conf) throws IOException { try { ContentSource cs = InternalUtilities.getInputContentSource(conf); Session session = cs.newSession(); conf.set(MarkLogicConstants.INPUT_QUERY_TIMESTAMP, session.getCurrentServerPointInTime().toString()); } catch (Exception ex) { throw new IOException("Error getting query timestamp", ex); } }
ContentSource auditCs = null; try { auditCs = InternalUtilities.getInputContentSource(conf); auditSession = auditCs.newSession(); RequestOptions options = new RequestOptions();
ContentSource auditCs = null; try { auditCs = InternalUtilities.getInputContentSource(conf); auditSession = auditCs.newSession(); RequestOptions options = new RequestOptions();
curHostName = replicas.get(curForest).getHostName(); ContentSource cs = InternalUtilities.getInputContentSource(conf, curHostName); session = cs.newSession("#"+curForestName);
while (hostIdx < inputHosts.length) { try { ContentSource cs = InternalUtilities.getInputContentSource(jobConf, inputHosts[hostIdx]); session = cs.newSession();
curHostName = replicas.get(curForest).getHostName(); ContentSource cs = InternalUtilities.getInputContentSource(conf, curHostName); session = cs.newSession("#"+curForestName);