Class SparkDistributedContext
java.lang.Object
org.episteme.core.distributed.SparkDistributedContext
- All Implemented Interfaces:
DistributedContext
Apache Spark-based implementation of DistributedContext.
This class integrates Episteme with Apache Spark for large-scale distributed computing.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Nested Class Summary
Nested classes/interfaces inherited from interface DistributedContext
DistributedContext.Priority -
Constructor Summary
ConstructorsConstructorDescriptionCreates a Spark distributed context with default configuration.SparkDistributedContext(Object sparkConf) Creates a Spark distributed context. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of available processing nodes or cores.<T extends Serializable>
List<Future<T>> Submits a collection of tasks for execution.voidshutdown()Shuts down the context.<T extends Serializable>
Future<T> Submits a task for execution with NORMAL priority.
-
Constructor Details
-
SparkDistributedContext
public SparkDistributedContext()Creates a Spark distributed context with default configuration. -
SparkDistributedContext
Creates a Spark distributed context.- Parameters:
sparkConf- Spark configuration
-
-
Method Details
-
submit
Description copied from interface:DistributedContextSubmits a task for execution with NORMAL priority.- Specified by:
submitin interfaceDistributedContext- Type Parameters:
T- Result type- Parameters:
task- Task to execute- Returns:
- Future representing the result
-
invokeAll
Description copied from interface:DistributedContextSubmits a collection of tasks for execution.- Specified by:
invokeAllin interfaceDistributedContext- Type Parameters:
T- Result type- Parameters:
tasks- List of tasks- Returns:
- List of Futures
-
getParallelism
public int getParallelism()Description copied from interface:DistributedContextReturns the number of available processing nodes or cores.- Specified by:
getParallelismin interfaceDistributedContext
-
shutdown
public void shutdown()Description copied from interface:DistributedContextShuts down the context.- Specified by:
shutdownin interfaceDistributedContext
-