All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.dstream.DStreamExecutionGraph Maven / Gradle / Ivy

The newest version!
/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package io.dstream;

import java.util.List;

/**
 * Represents an execution graph built from the invocations on
 * the {@link DStream}.
* Execution graph is a sort of an abstract syntax tree (AST) * of finalized {@link DStreamOperation}s ready to be mapped to the * target system for execution with minimal to no modifications.
* */ public final class DStreamExecutionGraph { private final List operations; private final Class sourceElementType; private final String executioniGraphName; /** * */ DStreamExecutionGraph(Class sourceElementType, String executioniGraphName, List operations){ this.sourceElementType = sourceElementType; this.executioniGraphName = executioniGraphName; this.operations = operations; } /** * Returns immutable {@link List} of {@link DStreamOperation}s. */ public List getOperations() { return this.operations; } /** * Returns the type of element of this execution graph. The type derives from the * type declared by the {@link DStream} during its initial construction. */ public Class getSourceElementType() { return this.sourceElementType; } /** * Returns the name of this execution graph. The name derives from the name * given to the {@link DStream} during its initial construction. */ public String getName() { return this.executioniGraphName; } /** * */ @Override public String toString(){ return "OPERATIONS: {" + this.operations.stream().map(s -> s.toString()).reduce("", (a,b) -> a.concat(b + "")) + "}"; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy