{"id":16388587,"url":"https://github.com/phact/streaming-ml-predictive-maintenence","last_synced_at":"2026-06-18T04:31:13.587Z","repository":{"id":71205843,"uuid":"91116884","full_name":"phact/streaming-ml-predictive-maintenence","owner":"phact","description":null,"archived":false,"fork":false,"pushed_at":"2017-05-12T19:58:06.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-22T15:58:18.768Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phact.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-12T17:58:37.000Z","updated_at":"2017-05-12T19:58:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"def55099-ca27-43b7-a2b1-79349d360ab6","html_url":"https://github.com/phact/streaming-ml-predictive-maintenence","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/phact/streaming-ml-predictive-maintenence","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phact%2Fstreaming-ml-predictive-maintenence","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phact%2Fstreaming-ml-predictive-maintenence/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phact%2Fstreaming-ml-predictive-maintenence/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phact%2Fstreaming-ml-predictive-maintenence/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phact","download_url":"https://codeload.github.com/phact/streaming-ml-predictive-maintenence/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phact%2Fstreaming-ml-predictive-maintenence/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34476727,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T04:29:27.561Z","updated_at":"2026-06-18T04:31:13.543Z","avatar_url":"https://github.com/phact.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StreamingMLPredictiveMaintenence\n\nExample for using DSE Streaming analytics for predictive maintenence \n\n## Startup Script\n\nThis Asset leverages\n[simple-startup](https://github.com/jshook/simple-startup). To start the entire\nasset run `./startup all` for other options run `./startup`\n\n## Manual Usage:\n\n### Prep the files:\n\nMake sure dsefs is turned on `dse.yaml` \n\n    dsefs_option\n        enabled: true\n\nAnd push the raw data file into the root directory of dsefs:\n\n```\ndse fs / \u003e put file:///maintenance_data.csv maintenance_data.csv\ndse fs / \u003e ls sales_observations\nmaintenance_data.csv\n```\n\n### Streaming Job:\nTo run this on your local machine, you need to first run a Netcat server\n\n    $ nc -lk 9999\n\nBuild:\n\n    mvn package\n\nand then run the example:\n\n    $ dse spark-submit --deploy-mode cluster --supervise  --class\n    com.datastax.powertools.analytics.SparkMLPredictiveMaintenenceStreamingJob\n    ./target/StreamingMLPredictiveMaintenence-0.1.jar localhost 9999\n\nTo run the  model, predict via streaming, and serve results via JDBC, run the\nServeJDBC class\n\n    $ dse spark-submit --class\n    com.datastax.powertools.analytics.SparkMLPredictiveMaintenenceServeJDBC\n    ./target/StreamingMLPredictiveMaintenence-0.1.jar localhost 9999\n\n\n    $ dse beeline\n\n    \u003e !connect jdbc:hive2://localhost:10000\n\n    \u003e select * from recommendations.predictions where user=10277 order by prediction desc;\n\n\nInto the `nc` prompt paste a few records and see the change in beeline:\n\n```\n29,0,140.3729067,104.5390305,82.25351215,TeamA,Provider1,TeamA-Provider1\n58,0,95.30752801,97.49013516,102.3134457,TeamA,Provider3,TeamA-Provider3\n66,1,76.76990774,110.1044455,76.71751602,TeamB,Provider3,TeamB-Provider3\n36,0,119.0339468,120.1119323,70.32511371,TeamA,Provider1,TeamA-Provider1\n88,1,113.7665009,88.42367648,110.0930537,TeamB,Provider4,TeamB-Provider4\n67,0,109.7687115,93.37811705,122.1599585,TeamB,Provider2,TeamB-Provider2\n45,0,125.7018715,101.9967219,58.30095817,TeamA,Provider2,TeamA-Provider2\n30,0,93.88255716,103.1290149,110.2320489,TeamB,Provider3,TeamB-Provider3\n65,1,86.98757582,123.6561241,106.6508842,TeamA,Provider3,TeamA-Provider3\n76,0,87.85255835,94.28668724,114.1031517,TeamC,Provider2,TeamC-Provider2\n```\n\nAlternatively, you can run `./socketstream` to write a record per second to the stream from bash\n\n\n### Docs\n\npull in your submodules\n\n    git submodule update --init\n    git submodule sync\n\nthen run the server\n\n    hugo server ./content\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphact%2Fstreaming-ml-predictive-maintenence","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphact%2Fstreaming-ml-predictive-maintenence","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphact%2Fstreaming-ml-predictive-maintenence/lists"}