Class SparkResource


  • @Path("/spark")
    @ApplicationScoped
    public class SparkResource
    extends Object
    • Field Detail

      • context

        @Inject
        org.apache.camel.CamelContext context
      • sparkDataFrameUri

        String sparkDataFrameUri
      • sparkHiveUri

        String sparkHiveUri
      • template

        @Inject
        org.apache.camel.ProducerTemplate template
    • Constructor Detail

      • SparkResource

        public SparkResource()
    • Method Detail

      • init

        @PostConstruct
        void init()
      • testFileRdd

        @Produces
        @Named
        org.apache.spark.api.java.JavaRDD<String> testFileRdd()
      • jsonCars

        @Produces
        @Named
        org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> jsonCars()
      • countLinesTransformation

        @Produces
        @Named
        org.apache.camel.component.spark.RddCallback countLinesTransformation()
      • hiveContext

        @Produces
        @Named
        org.apache.spark.sql.hive.HiveContext hiveContext()
      • rddCount

        @Path("/rdd/count")
        @GET
        @Produces("text/plain")
        public Long rddCount()
                      throws Exception
        Throws:
        Exception
      • dataframeCount

        @Path("/dataframe/{model}/count")
        @GET
        @Produces("text/plain")
        public Long dataframeCount​(@PathParam("model")
                                   String model)
                            throws Exception
        Throws:
        Exception
      • hiveCount

        @Path("/hive/count")
        @GET
        @Produces("text/plain")
        public Long hiveCount()
                       throws Exception
        Throws:
        Exception