{"id":24426267,"url":"https://github.com/thusithz/spring-boot-data-processing-batch","last_synced_at":"2025-07-24T08:33:32.393Z","repository":{"id":272690761,"uuid":"917436181","full_name":"thusithz/spring-boot-data-processing-batch","owner":"thusithz","description":"This Spring Batch application processes server metrics data from Datadog logs and generates performance summaries. It includes scheduled jobs for processing server metrics and generating analytical reports.","archived":false,"fork":false,"pushed_at":"2025-01-16T02:42:25.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T15:43:57.403Z","etag":null,"topics":["spring-backend","spring-batch","spring-batch-application","spring-batch-example","spring-batch-jobs","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","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/thusithz.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":"2025-01-16T01:25:52.000Z","updated_at":"2025-01-18T02:24:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"7e4c9eab-badb-4772-9c65-eb2321967eb1","html_url":"https://github.com/thusithz/spring-boot-data-processing-batch","commit_stats":null,"previous_names":["thusithz/spring-boot-data-processing-batch"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thusithz/spring-boot-data-processing-batch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thusithz%2Fspring-boot-data-processing-batch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thusithz%2Fspring-boot-data-processing-batch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thusithz%2Fspring-boot-data-processing-batch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thusithz%2Fspring-boot-data-processing-batch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thusithz","download_url":"https://codeload.github.com/thusithz/spring-boot-data-processing-batch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thusithz%2Fspring-boot-data-processing-batch/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266815183,"owners_count":23988559,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"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":["spring-backend","spring-batch","spring-batch-application","spring-batch-example","spring-batch-jobs","spring-boot"],"created_at":"2025-01-20T11:16:38.049Z","updated_at":"2025-07-24T08:33:32.245Z","avatar_url":"https://github.com/thusithz.png","language":"Java","readme":"\n# Data Processing Batch Application\n\nThis Spring Batch application processes server metrics data from Datadog logs and generates performance summaries. It includes scheduled jobs for processing server metrics and generating analytical reports.\n\n## Features\n\n1. **Server Metrics Processing**\n   - Processes Datadog log files for server performance metrics\n   - Monitors CPU and memory usage with configurable thresholds\n   - Tracks request counts and response times\n   - Generates performance summaries in CSV format\n\n2. **Alert Monitoring**\n   - Automatic alerts for high resource usage\n   - CPU Usage threshold \u003e 90%\n   - Memory Usage threshold \u003e 85%\n\n3. **Batch Processing**\n   - Chunk-based processing with configurable batch sizes\n   - Efficient file reading with FlatFileItemReader\n   - JSON parsing for Datadog log format\n   - CSV output generation\n\n## Project Structure\n\n```\nsrc/main/java/com/tk/batch/data_processing_batch/\n├── config/\n│   ├── BatchConfig.java         # Batch job configurations\n│   ├── MetricProcessor.java     # Server metrics processor\n│   └── DatadogLogReader.java    # Datadog log reader\n├── controller/\n│   └── BatchController.java     # REST endpoints\n├── model/\n│   ├── ServerMetric.java        # Server metric model\n│   └── MetricSummary.java       # Processed summary model\n└── DataProcessingBatchApplication.java\n```\n\n## Configuration\n\n### Application Properties\n```properties\nspring.batch.jdbc.initialize-schema=always\nspring.batch.job.enabled=false\nspring.task.scheduling.pool.size=2\n```\n\n### Required Files\n1. `datadog.log` - Place in `src/main/resources/`\n2. `datadog_metrics.csv` - Place in `src/main/resources/`\n\n## REST Endpoints\n\n1. **Start Batch Processing**\n   ```\n   POST /start-batch\n   ```\n\n## Dependencies\n\n- Spring Boot 3.1.0\n- Spring Batch\n- Spring Web\n- H2 Database\n- Lombok\n- Jackson Databind\n\n## Output\n\nThe application generates a `metric_summary.csv` file containing:\n- Server ID\n- Average CPU Usage\n- Average Memory Usage\n- Total Request Count\n- Average Response Time\n\n## Error Handling\n\n- Failed jobs are automatically retried\n- Job execution history maintained in H2 database\n- Detailed logs generated for debugging\n- Exception handling for JSON parsing errors\n\n## Support\n\nFor issues and support:\n1. Check application logs\n2. Review job execution history\n3. Verify input file formats (Datadog log format)\n4. Monitor batch processing status\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthusithz%2Fspring-boot-data-processing-batch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthusithz%2Fspring-boot-data-processing-batch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthusithz%2Fspring-boot-data-processing-batch/lists"}