-
Notifications
You must be signed in to change notification settings - Fork 72
On-demand namespace fetch support #2045
Conversation
|
Please consider multiple dirs in fetch list and what if there is dependency among these dirs. |
smart-common/src/main/java/org/smartdata/conf/SmartConfKeys.java
Outdated
Show resolved
Hide resolved
| Collection<String> fetchDirs = | ||
| conf.getTrimmedStringCollection(SmartConfKeys.SMART_NAMESPACE_FETCHER_DIRS_KEY); | ||
| fetchList = new ArrayList<>(fetchDirs.size()); | ||
| for (String dir : fetchDirs) { |
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.
Can we access the item in fetchDirs by for each?
|
Please update the doc accordingly with the explanation for "ignore" property in deployment guide. |
|
Inotify issue for the ignored or fetched dirs. |
smart-common/src/main/java/org/smartdata/conf/SmartConfKeys.java
Outdated
Show resolved
Hide resolved
| deque.add(ROOT); | ||
| } else { | ||
| for (String dir : fetchList) { | ||
| for (String dir : fetchDirs) { |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
| pendingParent = parent; | ||
| } | ||
| } else { | ||
| LOG.warn("Configured directory does not exist"); |
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.
Should not tackle unexisted dir in this section..
It seems that startAfter == null doesn't mean that the configured directory does not exist.
|
Please cover some cases in unit test. |
8e9e69e to
0c78a2f
Compare
...upport/smart-hadoop/src/main/java/org/smartdata/hdfs/metric/fetcher/InotifyEventApplier.java
Show resolved
Hide resolved
9cc232d to
496b328
Compare
43af9e4 to
30f4815
Compare
5950a84 to
1908815
Compare
18e7b78 to
af5d1aa
Compare
...p-support/smart-hadoop/src/main/java/org/smartdata/hdfs/metric/fetcher/NamespaceFetcher.java
Outdated
Show resolved
Hide resolved
| HdfsFetchTask.init(); | ||
| } | ||
|
|
||
| public void startFetch(String dir) { |
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.
Add javadoc for this function.
| * Namespace, access info and other info only related to files under these dirs will be tackled. | ||
| * For more than one directories, they should be separated by ",". | ||
| */ | ||
| public static final String SMART_NAMESPACE_FETCHER_DIRS_KEY = "smart.fetch.dirs"; |
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.
smart.cover.dirs
| public void apply(List<Event> events) throws IOException, MetaStoreException { | ||
| private void initialize(){ | ||
| SmartConf conf = new SmartConf(); | ||
| Collection<String> ignoreDirs = conf.getTrimmedStringCollection( |
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.
move this piece of code to SmartConf
ece8432 to
058aea0
Compare
No description provided.