From 1a7b1597c2e5a4f5e5bd2687593b62aeec2b5952 Mon Sep 17 00:00:00 2001 From: Yicong Huang <17627829+Yicong-Huang@users.noreply.github.com> Date: Sun, 29 Dec 2024 10:13:20 -0800 Subject: [PATCH] remove unused --- .../uci/ics/texera/workflow/LogicalPlan.scala | 7 ------ .../uci/ics/texera/workflow/LogicalPort.scala | 25 ------------------- .../workflow/SinkInjectionTransformer.scala | 1 - .../ics/amber/compiler/WorkflowCompiler.scala | 2 +- .../operator/hashJoin/HashJoinOpDesc.scala | 2 +- .../sentiment/SentimentAnalysisOpDesc.scala | 4 +-- 6 files changed, 4 insertions(+), 37 deletions(-) delete mode 100644 core/amber/src/main/scala/edu/uci/ics/texera/workflow/LogicalPort.scala delete mode 100644 core/amber/src/main/scala/edu/uci/ics/texera/workflow/SinkInjectionTransformer.scala diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/workflow/LogicalPlan.scala b/core/amber/src/main/scala/edu/uci/ics/texera/workflow/LogicalPlan.scala index 8e7c70948fe..f91d9e8533d 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/workflow/LogicalPlan.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/workflow/LogicalPlan.scala @@ -3,9 +3,7 @@ package edu.uci.ics.texera.workflow import com.typesafe.scalalogging.LazyLogging import edu.uci.ics.amber.core.storage.FileResolver import edu.uci.ics.amber.core.tuple.Schema -import edu.uci.ics.amber.core.workflow.WorkflowContext import edu.uci.ics.amber.operator.LogicalOp -import edu.uci.ics.amber.operator.source.SourceOperatorDescriptor import edu.uci.ics.amber.operator.source.scan.ScanSourceOpDesc import edu.uci.ics.amber.virtualidentity.OperatorIdentity import edu.uci.ics.amber.workflow.PortIdentity @@ -14,7 +12,6 @@ import org.jgrapht.graph.DirectedAcyclicGraph import org.jgrapht.util.SupplierUtil import java.util -import scala.collection.mutable import scala.collection.mutable.ArrayBuffer import scala.jdk.CollectionConverters.SetHasAsScala import scala.util.{Failure, Success, Try} @@ -64,7 +61,6 @@ case class LogicalPlan( def getTopologicalOpIds: util.Iterator[OperatorIdentity] = jgraphtDag.iterator() - def getOperator(opId: String): LogicalOp = operatorMap(OperatorIdentity(opId)) def getOperator(opId: OperatorIdentity): LogicalOp = operatorMap(opId) @@ -76,9 +72,6 @@ case class LogicalPlan( .filter(op => jgraphtDag.outDegreeOf(op) == 0) .toList - def getAncestorOpIds(opId: OperatorIdentity): Set[OperatorIdentity] = { - jgraphtDag.getAncestors(opId).asScala.toSet - } def getUpstreamOps(opId: OperatorIdentity): List[LogicalOp] = { jgraphtDag diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/workflow/LogicalPort.scala b/core/amber/src/main/scala/edu/uci/ics/texera/workflow/LogicalPort.scala deleted file mode 100644 index c33f29aa729..00000000000 --- a/core/amber/src/main/scala/edu/uci/ics/texera/workflow/LogicalPort.scala +++ /dev/null @@ -1,25 +0,0 @@ -package edu.uci.ics.texera.workflow - -import edu.uci.ics.amber.virtualidentity.OperatorIdentity - -case object LogicalPort { - def apply(operatorIdentity: OperatorIdentity, portOrdinal: Integer): LogicalPort = { - LogicalPort(operatorIdentity.id, portOrdinal) - } - - def apply( - operatorIdentity: OperatorIdentity, - portOrdinal: Integer, - portName: String - ): LogicalPort = { - LogicalPort(operatorIdentity.id, portOrdinal, portName) - } -} - -case class LogicalPort( - operatorID: String, - portOrdinal: Integer = 0, - portName: String = "" -) { - def operatorId: OperatorIdentity = OperatorIdentity(operatorID) -} diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/workflow/SinkInjectionTransformer.scala b/core/amber/src/main/scala/edu/uci/ics/texera/workflow/SinkInjectionTransformer.scala deleted file mode 100644 index 8b137891791..00000000000 --- a/core/amber/src/main/scala/edu/uci/ics/texera/workflow/SinkInjectionTransformer.scala +++ /dev/null @@ -1 +0,0 @@ - diff --git a/core/workflow-compiling-service/src/main/scala/edu/uci/ics/amber/compiler/WorkflowCompiler.scala b/core/workflow-compiling-service/src/main/scala/edu/uci/ics/amber/compiler/WorkflowCompiler.scala index 59e4849e32d..4a50f33f806 100644 --- a/core/workflow-compiling-service/src/main/scala/edu/uci/ics/amber/compiler/WorkflowCompiler.scala +++ b/core/workflow-compiling-service/src/main/scala/edu/uci/ics/amber/compiler/WorkflowCompiler.scala @@ -165,7 +165,7 @@ class WorkflowCompiler( // 1. convert the pojo to logical plan val logicalPlan: LogicalPlan = LogicalPlan(logicalPlanPojo) - // - resolve the file name in each scan source operator + // 2. resolve the file name in each scan source operator logicalPlan.resolveScanSourceOpFileName(Some(errorList)) // 3. expand the logical plan to the physical plan diff --git a/core/workflow-operator/src/main/scala/edu/uci/ics/amber/operator/hashJoin/HashJoinOpDesc.scala b/core/workflow-operator/src/main/scala/edu/uci/ics/amber/operator/hashJoin/HashJoinOpDesc.scala index 3bb144b70a8..c40d736d135 100644 --- a/core/workflow-operator/src/main/scala/edu/uci/ics/amber/operator/hashJoin/HashJoinOpDesc.scala +++ b/core/workflow-operator/src/main/scala/edu/uci/ics/amber/operator/hashJoin/HashJoinOpDesc.scala @@ -121,7 +121,7 @@ class HashJoinOpDesc[K] extends LogicalOp { ) ) - new PhysicalPlan( + PhysicalPlan( operators = Set(buildPhysicalOp, probePhysicalOp), links = Set( PhysicalLink( diff --git a/core/workflow-operator/src/main/scala/edu/uci/ics/amber/operator/sentiment/SentimentAnalysisOpDesc.scala b/core/workflow-operator/src/main/scala/edu/uci/ics/amber/operator/sentiment/SentimentAnalysisOpDesc.scala index a77c67b9143..27a988d9f37 100644 --- a/core/workflow-operator/src/main/scala/edu/uci/ics/amber/operator/sentiment/SentimentAnalysisOpDesc.scala +++ b/core/workflow-operator/src/main/scala/edu/uci/ics/amber/operator/sentiment/SentimentAnalysisOpDesc.scala @@ -57,8 +57,8 @@ class SentimentAnalysisOpDesc extends MapOpDesc { ) } - override def operatorInfo = - new OperatorInfo( + override def operatorInfo: OperatorInfo = + OperatorInfo( "Sentiment Analysis", "analysis the sentiment of a text using machine learning", OperatorGroupConstants.MACHINE_LEARNING_GROUP,