Source:
<code><START> private void initBuilderAndWriter(RegionCoprocessorEnvironment env) { <END> try { this.builder = new IndexBuildManager(env); } catch (IOException e) { LOG.warn("failed to new index build manager", e); } Configuration clonedConfig = PropertiesUtil.cloneConfig(env.getConfiguration()); clonedConfig.setClass(RpcControllerFactory.CUSTOM_CONTROLLER_CONF_KEY, InterRegionServerIndexRpcControllerFactory.class, RpcControllerFactory.class); clonedConfig.setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, env.getConfiguration().getInt(INDEX_WRITER_RPC_RETRIES_NUMBER, DEFAULT_INDEX_WRITER_RPC_RETRIES_NUMBER)); clonedConfig.setInt(HConstants.HBASE_CLIENT_PAUSE, env.getConfiguration() .getInt(INDEX_WRITER_RPC_PAUSE, DEFAULT_INDEX_WRITER_RPC_PAUSE)); DelegateRegionCoprocessorEnvironment indexWriterEnv = new DelegateRegionCoprocessorEnvironment(clonedConfig, env); String serverName = env.getRegionServerServices().getServerName().getServerName(); try { this.writer = new IndexWriter(indexWriterEnv, serverName + "-index-writer"); } catch (IOException e) { LOG.warn("Failed to init index writer ", e); } try { Class<? extends IndexFailurePolicy> policyClass = env.getConfiguration().getClass(INDEX_RECOVERY_FAILURE_POLICY_KEY, StoreFailuresInCachePolicy.class, IndexFailurePolicy.class); IndexFailurePolicy policy = policyClass.getConstructor(PerRegionIndexWriteCache.class).newInstance(failedIndexEdits); LOG.debug("Setting up recovery writter with failure policy: " + policy.getClass()); recoveryWriter = new RecoveryIndexWriter(policy, indexWriterEnv, serverName + "-recovery-writer"); } catch (Exception e) { LOG.warn("Failed to init recovery writer ", e); } this.stopped = false; LOG.info("Init writer finished"); }</code><technical_language>This functions similar start(). explain do need a new function</technical_language>

Target:
private void initBuilderAndWriter(RegionCoprocessorEnvironment env) throws IOException { this.builder = new IndexBuildManager(env); Configuration clonedConfig = PropertiesUtil.cloneConfig(env.getConfiguration()); clonedConfig.setClass(RpcControllerFactory.CUSTOM_CONTROLLER_CONF_KEY, InterRegionServerIndexRpcControllerFactory.class, RpcControllerFactory.class); clonedConfig.setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, env.getConfiguration().getInt(INDEX_WRITER_RPC_RETRIES_NUMBER, DEFAULT_INDEX_WRITER_RPC_RETRIES_NUMBER)); clonedConfig.setInt(HConstants.HBASE_CLIENT_PAUSE, env.getConfiguration() .getInt(INDEX_WRITER_RPC_PAUSE, DEFAULT_INDEX_WRITER_RPC_PAUSE)); DelegateRegionCoprocessorEnvironment indexWriterEnv = new DelegateRegionCoprocessorEnvironment(clonedConfig, env); String serverName = env.getRegionServerServices().getServerName().getServerName(); this.writer = new IndexWriter(indexWriterEnv, serverName + "-index-writer"); try { Class<? extends IndexFailurePolicy> policyClass = env.getConfiguration().getClass(INDEX_RECOVERY_FAILURE_POLICY_KEY, StoreFailuresInCachePolicy.class, IndexFailurePolicy.class); IndexFailurePolicy policy = policyClass.getConstructor(PerRegionIndexWriteCache.class).newInstance(failedIndexEdits); LOG.debug("Setting up recovery writter with failure policy: " + policy.getClass()); recoveryWriter = new RecoveryIndexWriter(policy, indexWriterEnv, serverName + "-recovery-writer"); } catch (Exception e) { LOG.warn("Failed to init recovery writer ", e); throw new IOException("Could not instantiate recovery failure policy!", e); } this.stopped = false; LOG.info("Init writer finished"); }