Source:
<code>private OlapClient initializeOlapClient(SConfiguration config,Clock clock) { int timeoutMillis = config.getOlapClientWaitTime(); int retries = config.getOlapClientRetries(); int maxRetries = config.getMaxRetries(); HBaseConnectionFactory hbcf = HBaseConnectionFactory.getInstance(config); OlapServerProvider osp = queue -> { try { if (config.getOlapServerExternal()) { String serverName = hbcf.getMasterServer().getServerName(); byte[] bytes = null; int tries = 0; IOException catched = null; while (tries < maxRetries) { tries++; try { bytes = ZkUtils.getData(HConfiguration.getConfiguration().getSpliceRootPath() + HBaseConfiguration.OLAP_SERVER_PATH + "/" + serverName + ":" + queue); } catch (IOException e) { catched = e; if (e.getCause() instanceof KeeperException.NoNodeException) { try { long pause = PipelineUtils.getPauseTime(tries, 10); LOG.warn("Couldn't find OlapServer znode after " + tries+ " retries, sleeping for " +pause + " ms", e); clock.sleep(pause, TimeUnit.MILLISECONDS); } catch (InterruptedException ie) { throw new IOException(ie); } } else { throw e; } } } if (bytes == null) throw catched; String hostAndPort = Bytes.toString(bytes); return HostAndPort.fromString(hostAndPort); } else { return HostAndPort.fromParts(hbcf.getMasterServer().getHostname(), config.getOlapServerBindPort()); } } catch (SQLException e) { Throwable cause = e.getCause(); if (cause instanceof IOException) throw (IOException) cause; else throw new IOException(e); } }; Map<String, JobExecutor> executorMap = new HashMap<>(); for (String queue : config.getOlapServerIsolatedRoles().values()) { JobExecutor onl = new AsyncOlapNIOLayer(osp, queue, retries); executorMap.put(queue, onl); } <START> JobExecutor onl = new AsyncOlapNIOLayer(osp, "default", retries); <END> executorMap.put("default", onl); return new TimedOlapClient(executorMap,timeoutMillis); }</code><technical_language>default a constant twice</technical_language>

Target:
private OlapClient initializeOlapClient(SConfiguration config,Clock clock) { int timeoutMillis = config.getOlapClientWaitTime(); int retries = config.getOlapClientRetries(); int maxRetries = config.getMaxRetries(); HBaseConnectionFactory hbcf = HBaseConnectionFactory.getInstance(config); OlapServerProvider osp = queue -> { try { if (config.getOlapServerExternal()) { String serverName = hbcf.getMasterServer().getServerName(); byte[] bytes = null; int tries = 0; IOException catched = null; while (tries < maxRetries) { tries++; try { bytes = ZkUtils.getData(HConfiguration.getConfiguration().getSpliceRootPath() + HBaseConfiguration.OLAP_SERVER_PATH + "/" + serverName + ":" + queue); break; } catch (IOException e) { catched = e; if (e.getCause() instanceof KeeperException.NoNodeException) { try { long pause = PipelineUtils.getPauseTime(tries, 10); LOG.warn("Couldn't find OlapServer znode after " + tries+ " retries, sleeping for " +pause + " ms", e); clock.sleep(pause, TimeUnit.MILLISECONDS); } catch (InterruptedException ie) { throw new IOException(ie); } } else { throw e; } } } if (bytes == null) throw catched; String hostAndPort = Bytes.toString(bytes); return HostAndPort.fromString(hostAndPort); } else { return HostAndPort.fromParts(hbcf.getMasterServer().getHostname(), config.getOlapServerBindPort()); } } catch (SQLException e) { Throwable cause = e.getCause(); if (cause instanceof IOException) throw (IOException) cause; else throw new IOException(e); } }; Map<String, JobExecutor> executorMap = new HashMap<>(); for (String queue : config.getOlapServerIsolatedRoles().values()) { JobExecutor onl = new AsyncOlapNIOLayer(osp, queue, retries); executorMap.put(queue, onl); } JobExecutor onl = new AsyncOlapNIOLayer(osp, SIConstants.OLAP_DEFAULT_QUEUE_NAME, retries); executorMap.put(SIConstants.OLAP_DEFAULT_QUEUE_NAME, onl); return new TimedOlapClient(executorMap,timeoutMillis); }