Guidelines for Organizing Data Files (from old wiki) #3968
Closed
chenlica
started this conversation in
archived-wiki
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
From the wiki page https://github.com/apache/texera/wiki/Guidelines-for-Organizing-Data-Files (may be dangling)
=====
Authors(s): Kishore Narendran, Shiladitya Sen
Here are some guidelines on where to put data files.
src/main/resourcesorsrc/test/resources. Please create them if they are not already present. By default these folders are made into source folders when maven build happens. Please create the directories inside these source folders so that the files are organized properly.src/test/resourcesfolder. If the data files are used by the main classes, put them insrc/main/resourcesfolder.DictionaryMatcheris using a filedictionary.txt, then the file should be put insrc/main/resources/dictionatyMatcherfolder. IfDictionaryMatcherTestis reading some sample data fromdmTest.txt, then that file should go tosrc/test/resources/dictionaryMatcherfolder.Notice that maven doesn't preserve the structure of
src/main/resourcesorsrc/main/javawhen it packages the files into jar or war. So it is important not to use the path "src/main/resources" while opening the files. The relative path should start from the classpath. We can use the methodsgetResource()orgetResourceAsStream()present injava.util.Classfor reading the files.Beta Was this translation helpful? Give feedback.
All reactions