dsmiley commented on code in PR #2491:
URL: https://github.com/apache/solr/pull/2491#discussion_r1628628606


##########
solr/modules/hdfs/src/java/org/apache/solr/hdfs/update/HdfsUpdateLog.java:
##########
@@ -81,31 +77,15 @@ public void init(PluginInfo info) {
     log.info("Initializing HdfsUpdateLog: tlogDfsReplication={}", 
tlogDfsReplication);
   }
 
-  private Configuration getConf(Path path) {
-    Configuration conf = new Configuration();
-    if (confDir != null) {
-      HdfsUtil.addHdfsResources(conf, confDir);
-    }
-
-    String fsScheme = path.toUri().getScheme();
-    if (fsScheme != null) {
-      conf.setBoolean("fs." + fsScheme + ".impl.disable.cache", true);
-    }
-    return conf;
-  }
-
   @Override
-  public void init(UpdateHandler uhandler, SolrCore core) {
-
-    // ulogDir from CoreDescriptor overrides
-    String ulogDir = core.getCoreDescriptor().getUlogDir();
-
-    this.uhandler = uhandler;
-
+  protected boolean initCheckRepoen(SolrCore core) {
     synchronized (fsLock) {
       // just like dataDir, we do not allow
       // moving the tlog dir on reload
       if (fs == null) {
+        // ulogDir from CoreDescriptor overrides
+        String ulogDir = core.getCoreDescriptor().getUlogDir();

Review Comment:
   A _rote_ refactor is safe no matter if the code was buggy or not; no?  Any 
way, if you're doing different things here such that the two methods I pulled 
out are not needed (yes / no?) then I should not do this change at this time.  
I saw code duplication and aimed to address it.  It's at the end of the init 
method; same code, albeit not char-for-char.  This PR isn't super important to 
me; no rush.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to