Skip to content
This repository has been archived by the owner on Mar 11, 2022. It is now read-only.

Sample usage #21

Open
sann3 opened this issue Apr 17, 2017 · 10 comments
Open

Sample usage #21

sann3 opened this issue Apr 17, 2017 · 10 comments

Comments

@sann3
Copy link

sann3 commented Apr 17, 2017

Thanks for sharing the scheduler.

I like to use in our application. I am new to Scala, so if you give me an the Sample main class to run this scheduler it will be very helpful for us.

Also some of the docs are private, is it possible to make as public. For example https://docs.pd-internal.com/scala/scheduler

@dvgica
Copy link
Contributor

dvgica commented Apr 18, 2017

Hey @sann3, thanks for your interest in this project.

We are hoping to publish our Scaladocs externally, but haven't quite got around to it yet. In the meantime, I've replaced all the private links with links to code/docs available in GitHub (see #22).

Regarding sample usage, you're right that we should have something. Below is the general idea, however:

val scheduler = new SchedulerImpl(
      schedulerSettings,
      typesafeConfig,
      schedulerMetrics,
      cassCluster,
      schedulerKeyspace,
      CassandraTaskExecutorService.factory(workersPerSchedulerPartition, taskRunner)
    )(
      schedulerLogging
    )

scheduler.start()

val schedulerClient = new SchedulerClient(
    kafkaProducer,
    schedulerSettings.kafkaTopic,
    schedulerSettings.schedulingGraceWindow,
    schedulerMetrics
  )(schedulerClientLogging)

val task = Task("some-ordering-id", Instant.now(), "some-uniqueness-key", Map("taskName" -> "my-task")

schedulerClient.scheduleTask(task)

Admittedly, you'll have to dig on how to build some of these dependencies like taskRunner. I will make a TODO for us to build a more comprehensive example project.

@sann3
Copy link
Author

sann3 commented Apr 19, 2017

Hi @DWvanGeest thanks for the sample code. I saw your speech in the Strange Loop. It was very good speech and very clear, so only I start exploring this project.

Thanks for sharing this great project as open source.

@kumar-asista
Copy link

Hi @DWvanGeest any sample application available. thanks

@kumar-asista
Copy link

Hi @sann3 you did any sample application.

@sann3
Copy link
Author

sann3 commented Jul 31, 2017

No @kumar-cherry, I didn't created. Just waiting for long time.

@dvgica
Copy link
Contributor

dvgica commented Aug 3, 2017

Sorry for the late response here, I was on vacation. We do not have a sample application available yet, unfortunately, but it's still on the to-do list.

@kumar-asista
Copy link

kumar-asista commented Aug 3, 2017 via email

@dvgica
Copy link
Contributor

dvgica commented Aug 3, 2017

No, we don't have an expected time to deliver a sample application. As a team we have plenty of other priorities at the moment. You would be welcome to contribute a sample application, which we could review and link to.

@kumar-asista
Copy link

kumar-asista commented Aug 3, 2017 via email

@noorul
Copy link

noorul commented Mar 24, 2018

@DWvanGeest Is it possible to create a how-to document to start using this library? Or a reference app will be even better.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants