final Http2SolrClient.Builder scb = new Http2SolrClient.Builder(RequiredOpts.sourceUrl); final Http2SolrClient.Builder thb = new Http2SolrClient.Builder(); if (!sourceH2) { scb.useHttp1_1(true); } if (!targetH2) { thb.useHttp1_1(true); } if (sourceUser != null && !sourceUser.equals("")) { log.info("Setting source credentials"); scb.withBasicAuthCredentials(sourceUser, sourcePass); } if (targetUser != null && !targetUser.equals("")) { log.info("Setting target credentials"); thb.withBasicAuthCredentials(targetUser, targetPass); } final CloudHttp2SolrClient.Builder tcb = new CloudHttp2SolrClient.Builder(targetZkHosts, chroot); log.info("Building Http2SolrClient for target CloudHttp2SolrClient"); final Http2SolrClient thc = thb.build(); tcb.sendDirectUpdatesToShardLeadersOnly().withHttpClient(thc); final long nanoStart; final ArrayBlockingQueue queue; log.info("Building remaining SolrClients"); final SolrClient sourceClient = scb.build(); final SolrClient targetClient = tcb.build();