Tag: java
51 articles
Deploying Spring Boot on K8s: 5 Pitfalls I Encountered
Documenting real issues encountered when migrating Spring Boot microservices to Kubernetes: health checks, ConfigMap hot-reload, JVM memory, graceful shutdown, and log collection.
Spring Cloud Gateway Rate Limiting and Circuit Breaker Practice
Recording the complete process of configuring Spring Cloud Gateway rate limiting (Redis token bucket) and circuit breaker (Resilience4j) in production, including pitfalls and tuning experience.
AI Research #134: Java 2025 - Will It Decline?
In 2025, Java remains the enterprise backend and critical industry workhorse. Key keywords: Java 25 LTS, Java 21 LTS, Spring Boot, MicroProfile, Kubernetes, Serverless, Project Loom, GraalVM Native Image, CRaC, Project Leyden, Panama.
AI Research #133: Java vs Kotlin/Go/Rust/Python/Node 2025
Comprehensive comparison of Java 21/23 (Virtual Threads/Loom) with Kotlin 2.x, Go 1.22/1.23, Rust 1.7x, Python (PyTorch 2.x/TensorFlow 2.x), Node.js 20/22. Covers ecosystem, performance, and application scenarios. Java maintains best overall value in enterprise backend and high-concurrency services.
AI Research #132: Java Ecosystem 2025 - Spring, Quarkus, GraalVM, CRaC
Spring Framework 6, Spring Boot 3.x (minimum JDK 17, supports Java 21 Virtual Threads), GraalVM Native Image AOT, Quarkus and Micronaut cloud-native...
AI Research #131: Java 17/21/25 Complete Comparison
Java 17 (2021), Java 21 (2023), Java 25 (2025) language and JVM changes, covering Virtual Threads (Project Loom), Records/Pattern Matching (Project Amber),...
Spark Super WordCount: Text Cleaning & MySQL Persistence
Implement complete production-ready word frequency pipeline: lowercase conversion, punctuation removal, stop word filtering, word frequency counting, finally efficiently write to MySQL via foreachPartition, comparing row-by-row insert vs partition batch write performance.
Elasticsearch 7.3 Java Practice: Index & Document CRUD Full Process Examples
elasticsearch-rest-high-level-client implements index and document CRUD, including: create index via JSON and XContentBuilder two ways, config shards and replicas, delete index, insert single document, query document by ID and use match_all to query all data.
Spark RDD Deep Dive: Five Key Features
Comprehensive analysis of Spark core data abstraction RDD's five key features (partitions, compute function, dependencies, partitioner, preferred locations), lazy evaluation, fault tolerance, and narrow/wide dependency principles.
Spark RDD Creation & Transformation Operations
Detailed explanation of three RDD creation methods (parallelize, textFile, transform from existing RDD), and usage of common Transformation operators like map, filter, flatMap, groupBy, sortBy with lazy evaluation principles.
Kafka Topic Management: Commands & Java API
Comprehensive introduction to Kafka Topic operations, including kafka-topics.sh commands, replica assignment strategy principles, and KafkaAdminClient Java API core usage.
Kafka Producer Interceptor & Interceptor Chain
Introduction to Kafka 0.10 Producer interceptor mechanism, covering onSend and onAcknowledgement interception points, interceptor chain execution order and error isolation, with complete custom interceptor implementation.
Kafka Consumer: Consumption Flow, Heartbeat & Parameter Tuning
Detailed explanation of Kafka Consumer Group consumption model, partition assignment strategy, heartbeat keep-alive mechanism, and tuning practices for key parameters like session.timeout.ms, heartbeat.interval.ms, max.poll.interval.ms.
Java Access Apache Kudu: Table Creation to CRUD (Including KuduSession Flush Mode & Multi-Master Config)
Java client (kudu-client 1.4.0) connects to Apache Kudu with multiple Masters (example ports 7051/7151/7251), completes full process of table creation, insert,...
Kafka Producer Message Sending Flow & Core Parameters
Deep analysis of Kafka Producer initialization, message interception, serialization, partition routing, buffer batch sending, ACK confirmation and complete sending chain, with key parameter tuning suggestions.
Kafka Serialization & Partitioning: Custom Implementation
Deep dive into Kafka message serialization and partition routing, including complete code for custom Serializer and Partitioner, mastering precise message routing and efficient transmission.
Kafka Operations: Shell Commands & Java Client Examples
Covers Kafka daily operations: daemon startup, Shell topic management commands, and Java client programming (complete Producer/Consumer code) with key configuration parameters and ConsumerRebalanceListener usage.
Spring Boot Integration with Kafka
Detailed guide on integrating Kafka in Spring Boot projects, including dependency configuration, KafkaTemplate sync/async message sending, and complete @KafkaListener consumption practice.
Flink CEP Practice: 24 Hours ≥5 Transactions & 10 Minutes Unpaid Detection Cases
Flink CEP (Complex Event Processing) complex event processing mechanism, combined with actual cases to deeply explain its application principles and practical...
Flink SQL Quick Start | Table API + SQL in 3 Minutes with toChangelogStream
Engineering perspective to quickly run Flink SQL: Provides modern dependencies (no longer using blink planner), minimum runnable example (MRE), Table API and...
Flink CEP Deep Dive: Complex Event Processing Complete Guide
Flink CEP is the core component for real-time analysis of complex event streams in Flink, providing a complete pattern matching framework, supporting...
Flink CEP Timeout Event Extraction: Complete Guide with Malicious Login Detection Case
Flink CEP timeout event extraction is a key环节 in stream processing, used to capture partial matching events that exceed the window time (within) during pattern...
Flink StateBackend Deep Dive: Memory, Fs, RocksDB & OperatorState Management
ManagedOperatorState is used to manage non-keyed state, achieving state consistency when operators recover from faults or scale. Developers can use ManagedOperatorState by implementing CheckpointedFunction interface, supporting ListState and BroadcastState two data structures.
Flink Parallelism Deep Dive: From Concepts to Best Practices
In Flink, Parallelism is the core parameter measuring task concurrent processing capability, determining the number of tasks that can run simultaneously for...
Flink Broadcast State: Dynamic Logic Updates in Real-time Stream Computing
Broadcast State is an important mechanism in Apache Flink that supports dynamic logic updates in streaming applications, widely used in real-time risk control,...
Flink State Backend: Memory, Fs, RocksDB & Performance Differences
State Storage (State Backend) is the core mechanism for implementing stateful stream computing in Flink, determining data reliability, performance and fault...
Flink Parallelism Setting Priority: Principles, Configuration & Best Practices
A Flink program consists of multiple Operators (Source, Transformation, Sink). An Operator is executed by multiple parallel Tasks (threads), and the number of...
Flink State: Keyed State, Operator State & KeyGroups Working Principles
Based on whether intermediate state is needed, Flink computation can be divided into stateful and stateless: Stateless computation like Map, Filter, FlatMap...
Redis Distributed Lock: Optimistic Lock, WATCH and SETNX with Lua and Java
Redis optimistic lock in practice: WATCH/MULTI/EXEC mechanism explained, Lua scripts for atomic operations, SETNX+EXPIRE distributed lock from basics to Redisson, with complete Java code examples.
Flink Time Semantics: EventTime, ProcessingTime, IngestionTime & Watermark Mechanism
Watermark is a special marker used to tell Flink the progress of events in the data stream. Simply put, Watermark is the 'current time' estimated by Flink in...
Flink Watermark Complete Guide: Event Time Window, Out-of-Order & Late Data
Flink's Watermark mechanism is one of the most core concepts in event time window computation, used for handling out-of-order events and ensuring accurate...
Flink Window Complete Guide: Tumbling, Sliding, Session
Flink's Window mechanism is the core bridge between stream processing and unified batch processing architecture. Flink treats batch as a special case of stream processing, using time windows (Tumbling, Sliding, Session) and count windows to split infinite streams into finite datasets.
Flink Sliding Window Deep Dive: Principles, Use Cases & Implementation Examples
Sliding Window is one of the core mechanisms in Apache Flink stream processing, more flexible than fixed windows, widely used in real-time monitoring, anomaly...
Flink JDBC Sink Deep Dive: MySQL Real-time Write, Batch Optimization & Best Practices
JDBC Sink is one of the most commonly used data output components, often used to write stream and batch processing results to relational databases like MySQL,...
Flink Batch Processing DataSet API: Use Cases, Code Examples & Optimization Mechanisms
Flink's DataSet API is the core programming interface for batch processing, designed for processing static, bounded datasets, supporting TB to PB scale big...
Flink DataStream Transformation: Map, FlatMap, Filter to Window Complete Guide
Flink provides rich operators for DataStream to support flexible data stream processing in different scenarios. Common operators include Map, FlatMap and...
Flink Sink Usage Guide: Types, Fault Tolerance Semantics & Use Cases
Flink's Sink is the final output endpoint for data stream processing, used to write processed results to external systems or storage media. It is the endpoint of streaming applications, determining how data is saved, transmitted or consumed.
Flink Source Operator Deep Dive: Non-Parallel Source Principles & Use Cases
Non-Parallel Source is a source operation in Flink with fixed parallelism of 1. It can only run in a single instance regardless of cluster scale, ensuring tasks are processed sequentially.
Flink SourceFunction to RichSourceFunction: Enhanced Source Functions & Practical Examples
RichSourceFunction and RichParallelSourceFunction are enhanced source functions suitable for scenarios requiring complex logic and resource management.
Flink on YARN Deployment: Environment Variables, Configuration & Resource Application
Deploying Flink in YARN mode requires completing a series of environment configuration and cluster management operations. First, configure environment...
Flink DataStream API: DataSource, Transformation & Sink Complete Guide
DataSource, Transformation and Sink. DataSource provides diverse data input methods including file systems, message queues, databases and custom data sources.
Redis Lua Scripts: EVAL, redis.call and Atomic Operations in Practice
Systematic explanation of Redis Lua script EVAL command syntax, differences between redis.call and redis.pcall, and four typical practical cases: atomic counter, CAS (Compare-And-Swap), batch operations, and distributed lock implementation using Lua scripts.
HBase Java API: Complete CRUD Code with Table Creation, Insert, Delete and Scan
Using HBase Java Client API to implement table creation, insert, delete, Get query, full table scan, and range scan. Includes complete Maven dependencies and runnable code examples covering all common HBase operations.
ZooKeeper Distributed Lock Java Implementation Details
Implement distributed lock based on ZooKeeper ephemeral sequential nodes, with complete Java code, covering lock competition, predecessor node monitoring, CountDownLatch synchronization, and recursive retry complete flow.
ZooKeeper Watcher Principle and Command Line Practice Guide
Complete analysis of Watcher registration-trigger-notification flow from client, WatchManager to ZooKeeper server, and zkCli command line practice demonstrating node CRUD and monitoring.
ZooKeeper Java API Practice: Node CRUD and Monitoring
Use ZkClient library to operate ZooKeeper via Java code, complete practical examples of session establishment, persistent node CRUD, child node change monitoring, and data change monitoring.
MapReduce JOIN Four Implementation Strategies
Deep dive into four JOIN strategies in MapReduce: Reduce-Side Join, Map-Side Join, Semi-Join, and Bloom Join principles and Java implementations, with analysis of applicable scenarios and performance characteristics.
HDFS Java Client Practice: Upload/Download Files, Directory Scan
Using Hadoop HDFS Java Client API for file operations: Maven dependency configuration, FileSystem/Path/Configuration core classes, implement file upload, download, delete, list scan and progress bar display.
Java Implementation MapReduce WordCount Complete Code
Implement Hadoop MapReduce WordCount from scratch: Hadoop serialization mechanism detailed explanation, writing Mapper, Reducer, Driver three components, Maven project configuration, local and cluster run complete code.
Basic Environment Setup: Hadoop Cluster
Detailed tutorial on setting up Hadoop cluster environment on 3 cloud servers (2C4G configuration), including HDFS, MapReduce, YARN components introduction, Java and Hadoop environment configuration steps.
Docker + Harbor Private Registry: Setup and Image Push Guide
Step-by-step guide to installing Docker and Harbor private registry, configuring insecure registries, building custom Docker images, and pushing them to Harbor.