StaticbuilderExecutes a Spark plan and returns all response chunks.
The Spark execution plan to run
Promise that resolves with array of all ExecutePlanResponse chunks
This method creates a server-streaming gRPC call to execute a Spark plan.
Stream Resource Management Pattern:
// 1. Stream Creation
const call = client.makeServerStreamRequest(...);
// 2. Event Handler Registration
call.on('data', handler); // Collects responses
call.on('error', handler); // Handles errors
call.on('status', handler); // Checks final status
call.on('end', handler); // Completes promise
// 3. Automatic Cleanup
// - On 'end': listeners removed, promise resolved
// - On 'error': listeners removed, promise rejected
// - Stream closed by gRPC automatically
Resource Lifecycle:
Memory Management:
Error Handling:
Closes the underlying gRPC client and releases resources.
This method should be called when the client is no longer needed to ensure proper cleanup of gRPC connections and prevent resource leaks.
Resource Disposal:
Important Notes:
gRPC client for Spark Connect protocol.
Remarks
This class manages the gRPC connection to a Spark Connect server and provides methods for executing plans, analyzing plans, and managing configuration.
Resource Management:
Stream Lifecycle:
Error Handling:
Example
Since
1.0.0