Found issue with hidden files attempting to be indexed when mappings being loaded. This allows mappings to skip hidden files.
failed to read / parse mapping [] from location [/opt/elastic/current/config/mappings/n233/.svn], ignoring... java.io.FileNotFoundException: /opt/elastic/current/config/mappings/n233/.svn (Is a directory) at java.io.FileInputStream.open(Native Method)
This commit is contained in:
parent
3e6a6ffd35
commit
d299672545
|
@ -367,6 +367,9 @@ public class MetaDataCreateIndexService extends AbstractComponent {
|
|||
private void addMappings(Map<String, Map<String, Object>> mappings, File mappingsDir) {
|
||||
File[] mappingsFiles = mappingsDir.listFiles();
|
||||
for (File mappingFile : mappingsFiles) {
|
||||
if (mappingFile.isHidden()) {
|
||||
continue;
|
||||
}
|
||||
String mappingType = mappingFile.getName().substring(0, mappingFile.getName().lastIndexOf('.'));
|
||||
try {
|
||||
String mappingSource = Streams.copyToString(new FileReader(mappingFile));
|
||||
|
|
Loading…
Reference in New Issue