-
Notifications
You must be signed in to change notification settings - Fork 682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SOLR-17548: Switch all public Java APIs from File to Path #2907
Changes from all commits
1ee430d
ac5f63e
58d52b7
45b2712
f851b1f
e7f9be1
5035793
562263d
1c1a315
4e43fed
b4937aa
02201b4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,6 @@ | |
*/ | ||
package org.apache.solr.cloud; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
import java.io.Reader; | ||
import java.lang.invoke.MethodHandles; | ||
|
@@ -51,10 +50,10 @@ public class SolrZkServer { | |
|
||
private Thread zkThread; // the thread running a zookeeper server, only if zkRun is set | ||
|
||
private File dataHome; // o.a.zookeeper.**.QuorumPeerConfig needs a File not a Path | ||
private Path dataHome; // o.a.zookeeper.**.QuorumPeerConfig needs a File not a Path | ||
private String confHome; | ||
|
||
public SolrZkServer(String zkRun, String zkHost, File dataHome, String confHome, int solrPort) { | ||
public SolrZkServer(String zkRun, String zkHost, Path dataHome, String confHome, int solrPort) { | ||
this.zkRun = zkRun; | ||
this.zkHost = zkHost; | ||
this.dataHome = dataHome; | ||
|
@@ -277,8 +276,8 @@ public static boolean hasServers(Properties props) { | |
return false; | ||
} | ||
|
||
public void setDataDir(File dataDir) { | ||
this.dataDir = dataDir; | ||
public void setDataDir(Path dataDir) { | ||
this.dataDir = dataDir.toFile(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this an example of where you felt changing things got out of hand? Otherwise, seems like if There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah this one is setting |
||
} | ||
|
||
/** | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -339,6 +339,8 @@ public String getDataHome(CoreDescriptor cd) throws IOException { | |
|
||
public void cleanupOldIndexDirectories( | ||
final String dataDirPath, final String currentIndexDirPath, boolean afterCoreReload) { | ||
|
||
// TODO SOLR-8282 move to PATH | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Your stepwise logic is probably much better than a "lets change it all in one fell swoop!" |
||
File dataDir = new File(dataDirPath); | ||
if (!dataDir.isDirectory()) { | ||
log.debug( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
love seeing the changed version is shorter and simpler than the original one!