Closed yaochitc closed 8 years ago
Hey @yaochitc, it is generally intended that most users would not use realtime index tasks directly, but would instead go through a higher-level API like Tranquility or the Kafka indexing service.
In particular there are some critical differences between realtime tasks and realtime nodes that mean that firehoses and plumbers designed to work with realtime nodes might not work properly with tasks.
I will close this since even though the API is not the most amazing API in the world, it actually isn't intended to be used directly, so maybe that's okay.
Got it!
We found a problem while using RealtimeIndexTask. As we didn't found any document for configuration of this task, we checked the code, and found that this task uses the FireDepartment for configuration. It seems that the same class is also used in Realtime node, so we just copy the configuration from our realtime node. As we submitted the task, a exception was thrown:
Finally we found the reason. As the RealtimeIndexTask doesn't read the plumberschool information from the FireDepartment(it creates a new plumberschool in run method instead), so the "plumber" option under RealtimeConfig should not be used, otherwise the plumberschool will be instantiated when the json of a task is submitted. This would never succeed because the plumberschool depends on the the QueryRunnerFactoryConglomerate, which could not be created on nodes such as the overlord in our example.
I think the FireDepartment used in the RealtimeIndexTask is quite confusing. Maybe it is better to use another class for holding the configuration for tasks like this, and adding more detailed documentation for indexing-service will make it easier to use(we are glad to help with this:) ).