Created
December 12, 2016 05:43
-
-
Save skavyas/d6e97d6e8b83d04db6f307d3a0134bad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DirectoryScanner scanner = new DirectoryScanner(); | |
scanner.setIncludes(new String[] { "/home/y/heimdall/data/projects/yamas2/dh/complete/yamasraw/yamasBatch/201612080700/0.0.1/*20161212052*.avro" }); | |
//log.info("Data:\n " + dir + fiveMinFolder + "/0.0.1/*/*" + avroFile + "*.avro"); | |
scanner.setCaseSensitive(false); | |
scanner.scan(); | |
scanner.setErrorOnMissingDir(false); | |
ArrayList<String> files = new ArrayList<String>(); | |
if (scanner.getIncludedFilesCount() > 0) { | |
files.addAll(new ArrayList<String>(Arrays.asList(scanner.getIncludedFiles()))); | |
log.info("number of files :"+files.size()); | |
log.info("Files :"+files); | |
} | |
String[] pathArr = new String[files.size()]; | |
String[] pathAvro = new String[files.size()]; | |
pathArr = files.toArray(pathArr); | |
int i=0; | |
for(String arr:pathArr){ | |
String p = "file:///".concat(arr); | |
pathAvro[i] = p; | |
i++; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment