quantcast/qfs

How to watch QFS directory?

Closed this issue · 13 comments

hi ,I have a question.
some process write data to directory,how to watch this directory is new files?

Hello,

You can use "qfs" tool, which is in /bin/tools/ folder, to list the content of a directory, while the write is in progress. For example,

./build/debug/bin/tools/qfs -fs 127.0.0.1:20000 -ls /mydir

will list the content of /mydir on a local filesystem instance.

I mean ,I used qfsc interface.how to watch some directory?
if i write some file to /qfs/tmp/myfile01....myfile100.
I can auto check directory.

I see. Currently we don't have a watch service API, but we do have an open ticket for it; https://quantcast.atlassian.net/browse/QFS-217

Please watch the ticket for any news.

Let me know if I misinterpreted your question.

Best,

Mehmet

yes,You can't misinterpreted my question.
but,https://quantcast.atlassian.net/browse/QFS-217 is unresolved.
Now,we can waitting Quantcast Dev fixed this problem?

hi,if i write files,I can't run qfs_close(qfs,fd). why not read this files?

Currently, https://quantcast.atlassian.net/browse/QFS-217 is not in our high priority list, but let me see if we can do something about that.

As for "qfs_close" problem, is it the case that you're writing data, but qfs_close doesn't succeed? If you share your qfs calls, I'll try it myself.

about watch directory question. if not qfs_add_watch API, I can't get new files. eg:my program write so many files to directory,others program need read this files .but now ,I can't notify read program,I need use dead loop every second check this directory,I thinks is stupid.

In timeliness fast system,I need first time get new files.

about "qfs_close", I know ,write & read just one process work ,if diff process is OK.
I have a question about QFS *qfs struct, I default this struct, I think is not really get ,I think QFS is save stack, is right? some time ,i call qfs_close API is segment fault . i find *qfs address is NULL. maybe i write bad memory address .

I think read & write is used system API work in QFS file system.

For "segmentation fault", it is really hard for me to tell what went wrong without seeing the code. If you provide a simplified version, I can have a look.

Also, until we implement watch service API: if you don't want to spend time on polling, you can have an external program do the check and send a signal to your main program notifying that there are new files to read in the directory you're watching.

Hi, I'm closing this issue. Please re-open if needed. You can also post your questions to https://groups.google.com/forum/#!forum/qfs-devel.

OK,I will goto google qfs-devel groups if I have question.