0

I am running gcsfuse on a GCE(Debian Jessie) instance and successfully mounted my GCS bucket. If someone drops a file into my bucket, I'd like for it to trigger an event and publish to a topic using cloud pub/sub. I'd have a subscriber listening to the topic and kick off a dataflow job to process the file. If this was a normal folder, I could use something like Java's WatchService API or if it was a VFS, I could use Apache VFS. I assumed VFS would work but it doesn't. The create/edit/delete events trigger directory events. I looked for the /etc/fstab and etc/mstab commands and nothing looks like the bucket that I've mounted. Is this even possible to do? My preference is not to poll a directory as these files could be large and I'd either have to keep track of what I've processed or move them into a /processed folder which could be somewhat expensive transferring data between GCS buckets.

1 Answers1

1

gcsfuse doesn't push information about object changes to the kernel. You are probably best off looking into the GCS API's support for object change notifications.

jacobsa
  • 439
  • 3
  • 11