fluo
fluo copied to clipboard
Improve 'fluo list' command to print Fluo application start time
Improve upon the basic output of the fluo list
command below by adding the start time of the Fluo application. Below is the output of current list
$ fluo list
Fluo instance (localhost/fluo) contains 2 application(s)
Application Status # Workers
----------- ------ ---------
test1 RUNNING 1
test2 STOPPED 0
One way to implement this to create a getStartTime()
method in FluoAdminImpl that determines minimum creation time of Zookeeper paths (ZookeeperPath.ORACLE_SERVER
and all children of ZookeeperPath.FINDERS
) to determine when the Fluo application was started. The existence of these paths in Zookeeper are currently used in FluoAdminImpl
to determine if oracle and workers are running. In FluoList, the getStartTime()
could be called if the application is running and the time printed out in a new column.
Hey mikewalch , i am interested to work on this issue .
@mikewalch will you be able to provide @srikailash with assistance on this issue? If not, I may be able to.
@srikailash, I updated the description with some more information that will hopefully get you started.
@mikewalch working on this . Information seems fine , will update here if any thing is needed .
I know this issue is very old but I was just doing some work on fluo list and oracles/workers so I wanted to give it a look. I was looking at the proposed solution and I think it has the following problem. Imagine you start a worker at 10:05 and then you start an oracle at 10:15. If you call fluo list it will show that the application is running and the start time is 10:05. If you then stop the worker and call fluo list again, it will show that the application is still running but the start time has changed to 10:15. So for any application whenever the oldest worker/oracle is stopped the start time would change.
Another possible solution I was thinking of was storing start time as metadata in a ZNode under the app's root path. However I think this is full of concurrency issues around starting and stopping oracle/nodes at the same time. Basically there would be no good way of dealing with the scenario where there is 1 worker/oracle up, and it is stopped around the same time another oracle/worker is started.
There are definitely alot of concurrency issues with trying to keep an accurate start time. It would probably be possible to work out an algorithm using Zookeeper atomic compare and set features to maintain this information. However I do no think its worthwhile. May want to consider closing the issue or reframing it to listing the oldest running process start time instead of the app start time.