addition of demo endpoint based on java spark, refactor hotspot